{ config, lib, pkgs, ... }: let closer = pkgs.writeShellApplication { name = "closer"; runtimeInputs = with pkgs; [jq xdotool]; text = '' if [ "$(hyprctl activewindow -j | jq -r ".class")" = "Steam" ]; then xdotool getactivewindow windowunmap else sway killactive "" fi ''; }; mod = "Mod4"; hyper = "Control+Shift+Mod1"; in { wayland.windowManager.sway = { enable = true; config = { input = { "*" = { xkb_layout = "gb"; xkb_options= "caps:escape"; } }; output = { eDP-1 = { scale = "1.33"; }; }; keybindings = { "${mod}+Return" = "exec kitty"; "${mod}+q" = "${closer}/bin/closer"; "${mod}+d" = "exec tofi-drun --drun-launch=true"; "${mod}+h" = "focus left"; "${mod}+j" = "focus down"; "${mod}+k" = "focus up"; "${mod}+l" = "focus right"; "${mod}+Left" = "movewindow left"; "${mod}+Up" = "movewindow up"; "${mod}+Down" = "movewindow down"; "${mod}+Right" = "movewindow right"; "${mod}+Shift+h" = "move window workspace prev"; "${mod}+Shift+l" = "move window workspace next"; "${mod}+Control+h" = "workspace prev"; "${mod}+Control+l" = "workspace next"; "${hyper}+y" = "move left"; "${hyper}+o" = "move right"; "${mod}+Tab" = "workspace back_and_forth"; "${hyper}+Tab" = "workspace back_and_forth"; "${mod}+b" = "split h"; "${mod}+v" = "split v"; "${hyper}+b" = "split h"; "${hyper}+v" = "split v"; "${mod}+Control+Return" = "exec --no-startup-id i3utils workspace new"; "${mod}+Control+Shift+Return" = "exec --no-startup-id i3utils workspace new -b"; "${mod}+Shift+Return" = "exec --no-startup-id i3utils workspace new -n, move next"; # "${mod}+Control+j" = "exec --no-startup-id $HOME/bin/scripts/godown"; # "${mod}+Control+k" = "exec --no-startup-id $HOME/bin/scripts/goup"; # "${mod}+Control+u" = "exec --no-startup-id $HOME/bin/scripts/godown"; # "${mod}+Control+i" = "exec --no-startup-id $HOME/bin/scripts/goup"; # "${mod}+Control+h" = "exec --no-startup-id i3utils workspace new -b"; "${hyper}+m" = "exec --no-startup-id $HOME/bin/scripts/godown"; "${hyper}+comma" = "exec --no-startup-id $HOME/bin/scripts/goup"; "${mod}+Shift+k" = "exec --no-startup-id i3utils window move prev"; "${mod}+Shift+j" = "exec --no-startup-id i3utils window move next"; "${hyper}+i" = "exec --no-startup-id i3utils window move prev"; "${hyper}+u" = "exec --no-startup-id i3utils window move next"; "${mod}+p" = "scratchpad show, resize set 80 ppt 80ppt, move position center"; "${hyper}+p" = "scratchpad show, resize set 80 ppt 80ppt, move position center"; "${mod}+Escape" = "exec loginctl lock-session"; "${hyper}+Escape" = "exec loginctl lock-session"; "${hyper}+f" = "fullscreen toggle"; "XF86MonBrightnessUp" = "exec xbacklight -inc 10"; "XF86MonBrightnessDown" = "exec xbacklight -dec 10"; "XF86AudioMute" = "exec pamixer -t"; "XF86AudioLowerVolume" = "exec pamixer -d 5"; "XF86AudioRaiseVolume" = "exec pamixer -i 5"; "XF86AudioPrev" = "exec playerctl previous"; "XF86AudioPlay" = "exec playerctl play-pause"; "XF86AudioNext" = "exec playerctl next"; }; }; }; }