diff options
Diffstat (limited to 'mixins/sway.nix')
-rw-r--r-- | mixins/sway.nix | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/mixins/sway.nix b/mixins/sway.nix index dd8a44c..fe9e217 100644 --- a/mixins/sway.nix +++ b/mixins/sway.nix @@ -17,18 +17,10 @@ app_id=menu chooser="${pkgs.fzf}/bin/fzf <$in_pipe >$out_pipe" - foot -W40x40 --app-id "$app_id" -- sh -c "$chooser" & + ${pkgs.foot}/bin/foot -W40x40 --app-id "$app_id" -- sh -c "$chooser" & cat >"$in_pipe" cat <"$out_pipe" ''; - sel = - pkgs.writeShellScript "sel" - '' - #!/bin/sh - swaymsg -t get_tree | \ - ${pkgs.jq}/bin/jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | \ - ${pkgs.slurp}/bin/slurp - ''; in { config = { security.pam.services.swaylock = {}; @@ -51,7 +43,7 @@ in { [[block]] block = "sound" - on_click = "pavucontrol" + on_click = "${pkgs.pavucontrol}/bin/pavucontrol" [[block]] block = "time" @@ -60,8 +52,6 @@ in { ''; services.mako.enable = true; home.packages = with pkgs; [ - grim - slurp wf-recorder font-awesome_6 waypipe @@ -149,7 +139,7 @@ in { keybindings = { "${modifier}+Return" = "exec $term"; "${modifier}+q" = "kill"; - "${modifier}+space" = "exec ${pkgs.dmenu}/bin/dmenu_path | ${menuscript} | xargs swaymsg exec --"; + "${modifier}+d" = "exec ${pkgs.dmenu}/bin/dmenu_path | ${menuscript} | xargs swaymsg exec --"; "${modifier}+Shift+c" = "reload"; "${modifier}+Shift+q" = "exit"; "${modifier}+Shift+p" = "exec systemctl poweroff"; @@ -204,6 +194,11 @@ in { "${modifier}+Shift+minus" = "move scratchpad"; "${modifier}+minus" = "scratchpad show"; "${modifier}+m" = "mode notifications"; + + "${modifier}+l" = "exec ${pkgs.swaylock}/bin/swaylock -c 070D0D"; + "Print" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area"; + "Shift+Print" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy active"; + "Ctrl+Print" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy output"; }; input = { "type:keyboard" = { @@ -275,16 +270,13 @@ in { bindsym XF86MonBrightnessUp exec ${pkgs.brightnessctl}/bin/brightnessctl s +5% bindsym XF86MonBrightnessDown exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%- - bindsym Print exec ${pkgs.grim}/bin/grim - | tee $(xdg-user-dir PICTURES)/$(date +'%s_grim.png') | wl-copy - bindsym Shift+Print exec ${pkgs.grim}/bin/grim -g "$(${sel})" - | tee $(xdg-user-dir PICTURES)/$(date +'%s_grim.png') | wl-copy - bindsym Ctrl+Print exec ${pkgs.grim}/bin/grim -g "$(swaymsg -t get_tree | jq -j '.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"')" - |tee $(xdg-user-dir PICTURES)/$(date +'%s_grim.png') | wl-copy - - bindsym $mod+l exec ${pkgs.swaylock}/bin/swaylock -c 070D0D - exec ${pkgs.mako}/bin/mako >/tmp/mako.log 2>&1 exec_always ${pkgs.kanshi}/bin/kanshi >/tmp/kanshi.log 2>&1 - exec foot + + default_border pixel 2 + gaps outer 5 + gaps inner 5 include /etc/sway/config.d/* ''; }; |