diff options
author | Franck Cuny <franck@fcuny.net> | 2022-05-16 19:16:43 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-05-16 19:16:43 -0700 |
commit | 2248ef11957e881573ce0a2e001074362a5b5558 (patch) | |
tree | d30026e083943bec3c6544a58f58f57a6a18c6b3 /home/wm/sway | |
parent | swaybar: clean up description for bluetooth (diff) | |
download | world-2248ef11957e881573ce0a2e001074362a5b5558.tar.gz |
sway: comments and floating windows configuration
Diffstat (limited to 'home/wm/sway')
-rw-r--r-- | home/wm/sway/default.nix | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/home/wm/sway/default.nix b/home/wm/sway/default.nix index 5a69d75..ba70992 100644 --- a/home/wm/sway/default.nix +++ b/home/wm/sway/default.nix @@ -37,6 +37,7 @@ in { size = 10.0; }; keybindings = lib.mkOptionDefault { + # control the volume "XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioLowerVolume" = @@ -45,20 +46,40 @@ in { "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle"; + + # control brightness "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"; "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%"; + + # logout "${modifier}+Escape" = "exec ${pkgs.wlogout}/bin/wlogout"; + + # screenshot "${modifier}+s" = "exec ${pkgs.grim}/bin/grim $(xdg-user-dir DOCUMENTS)/screenshots/$(date +'%Y-%m-%d-%H%M%S_screenshot.png')"; "${modifier}+Shift+s" = "exec ${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - $(xdg-user-dir DOCUMENTS)/screenshots/$(date +'%Y-%m-%d-%H%M%S_screenshot.png')"; + + # File Manager + "${modifier}+p" = "exec ${pkgs.pcmanfm}/bin/pcmanfm"; }; - window.commands = [{ - command = "floating enable"; - criteria.app_id = "pavucontrol"; - }]; + + # use `swaymsg -t get_tree' to get the title/name/ID of the applications + window = { + commands = [ + { + criteria.class = ".blueman-manager-wrapped"; + command = "floating enable"; + } + { + criteria.class = "Pavucontrol"; + command = "floating enable"; + } + ]; + }; + input = { "*" = { "xkb_layout" = "us,fr"; @@ -66,12 +87,14 @@ in { "xkb_options" = "ctrl:nocaps,grp:shift_caps_toggle"; }; }; + assigns = { "1" = [{ app_id = "emacs"; }]; "2" = [{ app_id = "Alacritty"; }]; "3" = [{ app_id = "firefox"; }]; "4" = [{ class = "Element"; }]; }; + output = { "*" = { scale = "1.5"; |