commit 4d36cfe3a1b8cff98f11bd16c531dab9f0148481
parent 5d439ebf6fe601f62eac81601555cf43a858d516
Author: Vincent Demeester <vincent@sbr.pm>
Date: Mon, 3 Jul 2023 06:27:32 +0200
users/vincent: sway configuration
Move more things to use bindcode
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/users/vincent/desktop/sway.nix b/users/vincent/desktop/sway.nix
@@ -59,12 +59,8 @@ in
inherit (config.wayland.windowManager.sway.config) left down up right menu terminal;
in
{
- "${mod}+p" = "exec ${menu}";
- "${mod}+Control+p" = "exec ${pkgs.wofi-emoji}/bin/wofi-emoji -G";
"${mod}+Return" = "exec ${terminal}";
- "${mod}+Shift+q" = "kill";
-
"${mod}+Shift+Return" = "exec emacsclient -c";
"${mod}+Control+Return" = "exec emacs";
"${mod}+Control+Shift+Return" = "exec ${emacs-in-folder}";
@@ -101,27 +97,13 @@ in
# "${mod}+b" = "splith";
# "${mod}+v" = "splitv";
- "${mod}+f" = "fullscreen toggle";
- "${mod}+a" = "focus parent";
-
- "${mod}+s" = "layout stacking";
- "${mod}+w" = "layout tabbed";
- "${mod}+e" = "layout toggle split";
+ # "${mod}+f" = "fullscreen toggle";
"${mod}+Shift+space" = "floating toggle";
"${mod}+space" = "focus mode_toggle";
- "${mod}+Shift+minus" = "move scratchpad";
- "${mod}+minus" = "scratchpad show";
-
- "${mod}+Shift+c" = "reload";
- "${mod}+Shift+e" =
- "exec 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' 'swaymsg exit'";
-
- "${mod}+o" = "mode resize";
-
- "${mod}+Shift+o" = "exec ${pkgs.swaylock}/bin/swaylock -i $HOME/desktop/pictures/lockscreen";
- "${mod}+Shift+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
+ #"${mod}+Shift+minus" = "move scratchpad";
+ #"${mod}+minus" = "scratchpad show";
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 10%+";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 10%-";
@@ -192,8 +174,22 @@ in
extraConfig =
let
mod = config.wayland.windowManager.sway.config.modifier;
+ inherit (config.wayland.windowManager.sway.config) left down up right menu terminal;
in
''
+ bindcode ${mod}+33 exec "${menu}"
+ bindcode ${mod}+Control+33 exec "${pkgs.wofi-emoji}/bin/wofi-emoji -G"
+ bindcode ${mod}+Shift+24 kill
+ bindcode ${mod}+38 focus parent
+ bindcode ${mod}+39 layout stacking
+ bindcode ${mod}+25 layout tabbed
+ bindcode ${mod}+26 layout toggle split
+ bindcode ${mod}+Shift+54 reload
+ bindcode ${mod}+Shift+26 exec "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' 'swaymsg exit'"
+ bindcode ${mod}+32 mode resize
+ bindcode ${mod}+Shift+32 exec "${pkgs.swaylock}/bin/swaylock -i $HOME/desktop/pictures/lockscreen"
+ bindcode ${mod}+Shift+57 exec${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"
+
# switch to workspace
bindcode ${mod}+10 workspace number 1
bindcode ${mod}+11 workspace number 2