{ pkgs, repoRoot, lib, ... }: let commands = import ../../../../lib/commands.nix { inherit pkgs; }; inherit (commands) uwsm lock term notify nag dmenu espanso key_mod key_mod_misc key_left key_right key_up key_down; in { imports = [ ./gtk.nix ./theme.nix ./xdg.nix ./shells/default.nix ../../programs/foot.nix ../../programs/qutebrowser ../../services/espanso.nix ../../services/gnome-keyring.nix ]; wayland.windowManager.sway = { enable = true; wrapperFeatures.gtk = true; config = { modifier = key_mod; startup = [ { command = "systemctl --user start libinput-gestures"; } ]; bars = [ ]; input = { "type:keyboard" = { xkb_options = "fkeys:basic_13-24"; }; "type:touchpad" = { dwt = "enabled"; tap = "enabled"; natural_scroll = "disabled"; middle_emulation = "enabled"; click_method = "clickfinger"; clickfinger_button_map = "lrm"; scroll_factor = "0.6"; }; "type:mouse" = { natural_scroll = "disabled"; accel_profile = "flat"; pointer_accel = "0.5"; }; "*" = { xkb_layout = lib.mkDefault "se,us"; xkb_options = "grp:win_space_toggle"; }; }; keybindings = { "F13" = "exec ${notify} -t 2000 \"$(${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/toggle_mon.xsh)\""; "${key_mod}+f" = "fullscreen"; "${key_mod}+Shift+f" = "floating toggle"; "${key_mod}+1" = "workspace number 1"; "${key_mod}+2" = "workspace number 2"; "${key_mod}+3" = "workspace number 3"; "${key_mod}+4" = "workspace number 4"; "${key_mod}+5" = "workspace number 5"; "${key_mod}+6" = "workspace number 6"; "${key_mod}+7" = "workspace number 7"; "${key_mod}+8" = "workspace number 8"; "${key_mod}+9" = "workspace number 9"; "${key_mod}+0" = "scratchpad show"; "${key_mod}+Shift+1" = "move container to workspace number 1; workspace 1"; "${key_mod}+Shift+2" = "move container to workspace number 2; workspace 2"; "${key_mod}+Shift+3" = "move container to workspace number 3; workspace 3"; "${key_mod}+Shift+4" = "move container to workspace number 4; workspace 4"; "${key_mod}+Shift+5" = "move container to workspace number 5; workspace 5"; "${key_mod}+Shift+6" = "move container to workspace number 6; workspace 6"; "${key_mod}+Shift+7" = "move container to workspace number 7; workspace 7"; "${key_mod}+Shift+8" = "move container to workspace number 8; workspace 8"; "${key_mod}+Shift+9" = "move container to workspace number 9; workspace 9"; "${key_mod}+Shift+0" = "move container to scratchpad; scratchpad show"; "${key_mod}+Ctrl+1" = "move container to workspace number 1"; "${key_mod}+Ctrl+2" = "move container to workspace number 2"; "${key_mod}+Ctrl+3" = "move container to workspace number 3"; "${key_mod}+Ctrl+4" = "move container to workspace number 4"; "${key_mod}+Ctrl+5" = "move container to workspace number 5"; "${key_mod}+Ctrl+6" = "move container to workspace number 6"; "${key_mod}+Ctrl+7" = "move container to workspace number 7"; "${key_mod}+Ctrl+8" = "move container to workspace number 8"; "${key_mod}+Ctrl+9" = "move container to workspace number 9"; "${key_mod}+Ctrl+0" = "move container to scratchpad"; "${key_mod}+b" = "splith"; "${key_mod}+v" = "splitv"; "${key_mod}+r" = "layout stacking"; "${key_mod}+w" = "layout tabbed"; "${key_mod}+e" = "layout toggle split"; "${key_mod}+Ctrl+${key_left}" = "focus left"; "${key_mod}+Ctrl+${key_right}" = "focus right"; "${key_mod}+Ctrl+${key_down}" = "focus down"; "${key_mod}+Ctrl+${key_up}" = "focus up"; "${key_mod}+Shift+${key_left}" = "move left"; "${key_mod}+Shift+${key_down}" = "move down"; "${key_mod}+Shift+${key_up}" = "move up"; "${key_mod}+Shift+${key_right}" = "move right"; "${key_mod}+Tab" = "focus right"; "${key_mod}+Shift+Tab" = "focus left"; "${key_mod}+Ctrl+Tab" = "move right"; "${key_mod}+Ctrl+Shift+Tab" = "move left"; "${key_mod}+${key_mod_misc}+Tab" = "workspace next"; "${key_mod}+${key_mod_misc}+Shift+Tab" = "workspace prev"; "${key_mod}+space" = "exec ${notify} -t 2000 \"$(${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/toggle_xkb.xsh)\""; "${key_mod}+Shift+q" = "kill"; "Alt+F4" = "kill"; "${key_mod}+Return" = "exec ${uwsm} ${term}"; "${key_mod}+s" = "exec ${uwsm} ${espanso} search"; "${key_mod}+Shift+e" = "exec ${uwsm} ${espanso} toggle"; "${key_mod}+Shift+s" = "exec grimshot savecopy area"; "${key_mod}+Ctrl+s" = "exec grimshot savecopy output"; "${key_mod}+XF86AudioPlay" = "exec ${notify} -t 2000 \"$(${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/swap_sound_device.xsh)\""; }; window = { titlebar = false; commands = [ { criteria = { all = true; }; command = "inhibit_idle fullscreen"; } ]; }; assigns = { "1" = [ { app_id = "chromium"; } ]; "2" = [ { class = "steam"; } ]; "3" = [ ]; "4" = [ { class = "VSCodium"; } ]; "5" = [ { app_id = "obsidian"; } ]; "6" = [ ]; "7" = [ ]; "8" = [ { app_id = "discord"; } ]; "9" = [ { app_id = "signal"; } ]; }; }; }; }