home: sway: minimize workspace binds
This commit is contained in:
parent
f9161573ff
commit
20b8ce733c
1 changed files with 52 additions and 61 deletions
|
@ -79,72 +79,63 @@
|
||||||
setBrightness = "/home/guanranwang/.local/bin/wrapped-brightnessctl";
|
setBrightness = "/home/guanranwang/.local/bin/wrapped-brightnessctl";
|
||||||
setVolume = "/home/guanranwang/.local/bin/wrapped-pamixer";
|
setVolume = "/home/guanranwang/.local/bin/wrapped-pamixer";
|
||||||
screenshot = "/home/guanranwang/.local/bin/screenshot";
|
screenshot = "/home/guanranwang/.local/bin/screenshot";
|
||||||
in {
|
in
|
||||||
### Sway itself
|
{
|
||||||
# Window
|
### Sway itself
|
||||||
"${modifier}+s" = "split toggle";
|
# Window
|
||||||
"${modifier}+v" = "floating toggle";
|
"${modifier}+s" = "split toggle";
|
||||||
"${modifier}+f" = "fullscreen";
|
"${modifier}+v" = "floating toggle";
|
||||||
"${modifier}+q" = "kill";
|
"${modifier}+f" = "fullscreen";
|
||||||
"${modifier}+Shift+e" = "exec ${pkgs.sway}/bin/swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' '${pkgs.sway}/bin/swaymsg exit'";
|
"${modifier}+q" = "kill";
|
||||||
|
"${modifier}+Shift+e" = "exec ${pkgs.sway}/bin/swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' '${pkgs.sway}/bin/swaymsg exit'";
|
||||||
|
|
||||||
# Move around
|
# Move around
|
||||||
"${modifier}+h" = "focus left";
|
"${modifier}+h" = "focus left";
|
||||||
"${modifier}+j" = "focus down";
|
"${modifier}+j" = "focus down";
|
||||||
"${modifier}+k" = "focus up";
|
"${modifier}+k" = "focus up";
|
||||||
"${modifier}+l" = "focus right";
|
"${modifier}+l" = "focus right";
|
||||||
|
|
||||||
# Workspaces
|
### Execute other stuff
|
||||||
# Switch to workspace
|
# Launch applications
|
||||||
"${modifier}+1" = "workspace 1";
|
"${modifier}+Return" = "exec ${terminal}";
|
||||||
"${modifier}+2" = "workspace 2";
|
"${modifier}+w" = "exec ${pkgs.xdg-utils}/bin/xdg-open http:";
|
||||||
"${modifier}+3" = "workspace 3";
|
"${modifier}+e" = "exec ${pkgs.xdg-utils}/bin/xdg-open ~";
|
||||||
"${modifier}+4" = "workspace 4";
|
|
||||||
"${modifier}+5" = "workspace 5";
|
|
||||||
"${modifier}+6" = "workspace 6";
|
|
||||||
"${modifier}+7" = "workspace 7";
|
|
||||||
"${modifier}+8" = "workspace 8";
|
|
||||||
"${modifier}+9" = "workspace 9";
|
|
||||||
# Move focused Window to workspace
|
|
||||||
"${modifier}+Shift+1" = "move container to workspace 1";
|
|
||||||
"${modifier}+Shift+2" = "move container to workspace 2";
|
|
||||||
"${modifier}+Shift+3" = "move container to workspace 3";
|
|
||||||
"${modifier}+Shift+4" = "move container to workspace 4";
|
|
||||||
"${modifier}+Shift+5" = "move container to workspace 5";
|
|
||||||
"${modifier}+Shift+6" = "move container to workspace 6";
|
|
||||||
"${modifier}+Shift+7" = "move container to workspace 7";
|
|
||||||
"${modifier}+Shift+8" = "move container to workspace 8";
|
|
||||||
"${modifier}+Shift+9" = "move container to workspace 9";
|
|
||||||
|
|
||||||
### Execute other stuff
|
# Rofi
|
||||||
# Launch applications
|
"${modifier}+d" = "exec ${menu} -show drun -show-icons -icon-theme ${config.gtk.iconTheme.name}";
|
||||||
"${modifier}+Return" = "exec ${terminal}";
|
"${modifier}+Shift+d" = "exec ${lib.getExe pkgs.cliphist} list | ${menu} -dmenu | ${lib.getExe pkgs.cliphist} decode | ${pkgs.wl-clipboard}/bin/wl-copy";
|
||||||
"${modifier}+w" = "exec ${pkgs.xdg-utils}/bin/xdg-open http:";
|
"${modifier}+Shift+l" = ''exec ${menu} -modi "power-menu:rofi-power-menu --confirm=reboot/shutdown" -show power-menu'';
|
||||||
"${modifier}+e" = "exec ${pkgs.xdg-utils}/bin/xdg-open ~";
|
|
||||||
|
|
||||||
# Rofi
|
# Screenshot
|
||||||
"${modifier}+d" = "exec ${menu} -show drun -show-icons -icon-theme ${config.gtk.iconTheme.name}";
|
"${modifier}+Shift+s" = "exec ${screenshot} region";
|
||||||
"${modifier}+Shift+d" = "exec ${lib.getExe pkgs.cliphist} list | ${menu} -dmenu | ${lib.getExe pkgs.cliphist} decode | ${pkgs.wl-clipboard}/bin/wl-copy";
|
"Print" = "exec ${screenshot} fullscreen";
|
||||||
"${modifier}+Shift+l" = ''exec ${menu} -modi "power-menu:rofi-power-menu --confirm=reboot/shutdown" -show power-menu'';
|
"Print+Control" = "exec ${screenshot} swappy";
|
||||||
|
|
||||||
# Screenshot
|
# Fn keys
|
||||||
"${modifier}+Shift+s" = "exec ${screenshot} region";
|
"XF86MonBrightnessUp" = "exec ${setBrightness} up";
|
||||||
"Print" = "exec ${screenshot} fullscreen";
|
"XF86MonBrightnessDown" = "exec ${setBrightness} down";
|
||||||
"Print+Control" = "exec ${screenshot} swappy";
|
"XF86AudioRaiseVolume" = "exec ${setVolume} up";
|
||||||
|
"XF86AudioLowerVolume" = "exec ${setVolume} down";
|
||||||
# Fn keys
|
"XF86AudioMute" = "exec ${setVolume} mute";
|
||||||
"XF86MonBrightnessUp" = "exec ${setBrightness} up";
|
"XF86AudioPlay" = "exec ${lib.getExe pkgs.playerctl} play";
|
||||||
"XF86MonBrightnessDown" = "exec ${setBrightness} down";
|
"XF86AudioPause" = "exec ${lib.getExe pkgs.playerctl} pause";
|
||||||
"XF86AudioRaiseVolume" = "exec ${setVolume} up";
|
"XF86AudioPrev" = "exec ${lib.getExe pkgs.playerctl} previous";
|
||||||
"XF86AudioLowerVolume" = "exec ${setVolume} down";
|
"XF86AudioNext" = "exec ${lib.getExe pkgs.playerctl} next";
|
||||||
"XF86AudioMute" = "exec ${setVolume} mute";
|
"XF86AudioStop" = "exec ${lib.getExe pkgs.playerctl} stop";
|
||||||
"XF86AudioPlay" = "exec ${lib.getExe pkgs.playerctl} play-pause";
|
"XF86AudioMedia" = "exec ${lib.getExe pkgs.playerctl} play-pause";
|
||||||
"XF86AudioPause" = "exec ${lib.getExe pkgs.playerctl} play-pause";
|
}
|
||||||
"XF86AudioPrev" = "exec ${lib.getExe pkgs.playerctl} previous";
|
//
|
||||||
"XF86AudioNext" = "exec ${lib.getExe pkgs.playerctl} next";
|
# workspace binds
|
||||||
"XF86AudioStop" = "exec ${lib.getExe pkgs.playerctl} stop";
|
builtins.listToAttrs (builtins.concatMap (x: [
|
||||||
"XF86AudioMedia" = "exec ${lib.getExe pkgs.playerctl} play-pause";
|
{
|
||||||
};
|
name = "${modifier}+${x}";
|
||||||
|
value = "workspace ${x}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "${modifier}+Shift+${x}";
|
||||||
|
value = "move container to workspace ${x}";
|
||||||
|
}
|
||||||
|
]) (builtins.genList (x: toString (x + 1)) 9));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue