Add bind to switch layouts
All checks were successful
Buill NixOS Configurations / Build-NixOS-Configurations (carbon) (push) Successful in 29s
Buill NixOS Configurations / Build-NixOS-Configurations (git) (push) Successful in 20s
Buill NixOS Configurations / Build-NixOS-Configurations (gospel) (push) Successful in 32s
Buill NixOS Configurations / Build-NixOS-Configurations (node) (push) Successful in 23s
All checks were successful
Buill NixOS Configurations / Build-NixOS-Configurations (carbon) (push) Successful in 29s
Buill NixOS Configurations / Build-NixOS-Configurations (git) (push) Successful in 20s
Buill NixOS Configurations / Build-NixOS-Configurations (gospel) (push) Successful in 32s
Buill NixOS Configurations / Build-NixOS-Configurations (node) (push) Successful in 23s
This commit is contained in:
parent
70e4a4d452
commit
68aa7a16f8
1 changed files with 14 additions and 0 deletions
|
|
@ -24,6 +24,14 @@ let
|
|||
emoji_picker = "${pkgs.bemoji}/bin/bemoji -t";
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
|
||||
layout_toggle_script = pkgs.writeShellScriptBin "layout-toggle" ''
|
||||
current_layout="$(${pkgs.hyprland}/bin/hyprctl getoption general:layout -j | ${pkgs.jq}/bin/jq -r .str)"
|
||||
case "$current_layout" in
|
||||
master) ${pkgs.hyprland}/bin/hyprctl -q keyword general:layout dwindle ;;
|
||||
dwindle) ${pkgs.hyprland}/bin/hyprctl -q keyword general:layout master ;;
|
||||
esac
|
||||
'';
|
||||
|
||||
generate_grim_command = target: ''
|
||||
exec mkdir -p ~/screenshots \
|
||||
&& ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" \
|
||||
|
|
@ -147,6 +155,11 @@ in
|
|||
preserve_split = true;
|
||||
};
|
||||
|
||||
# Master layout
|
||||
master = {
|
||||
orientation = "center";
|
||||
};
|
||||
|
||||
# Window rules
|
||||
windowrule = [
|
||||
"suppress_event maximize, match:class .*"
|
||||
|
|
@ -208,6 +221,7 @@ in
|
|||
"$mod SHIFT, o, movetoworkspace, 9"
|
||||
|
||||
# Layout
|
||||
"$mod, g, exec, ${layout_toggle_script}/bin/layout-toggle"
|
||||
"$mod, v, togglesplit"
|
||||
"$mod, f, fullscreen"
|
||||
"$mod SHIFT, f, togglefloating"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue