{ config, inputs, lib, pkgs, ... }: let inherit (config) wayland; inherit (lib) mkOptionDefault; DOCK_R = "Lenovo Group Limited T23d-10 V90B7ALM"; DOCK_L = "Lenovo Group Limited T23d-10 V90B7AL8"; ws_2 = "'2: code'"; ws_3 = "'3: librewolf'"; ws_4 = "'4: matrix'"; inherit (wayland.windowManager.sway.config) modifier; in { config = { home = { packages = with pkgs; [ grim pulseaudio # for pactl slurp wl-clipboard ]; sessionVariables = { WLR_RENDERER = "vulkan"; # Fixes element-desktop flickering }; }; programs = { feh.enable = true; }; wayland.windowManager.sway = { enable = true; extraConfig = '' exec element-desktop ''; extraOptions = [ "--unsupported-gpu" ]; config = { assigns = { "${ws_2}" = [ { "app_id" = "code"; } ]; "${ws_3}" = [ { "app_id" = "librewolf"; } ]; "${ws_4}" = [ { "app_id" = "Element"; } ]; }; bars = [ { command = "waybar"; mode = "hide"; } ]; gaps = { inner = 8; outer = 3; }; input."*" = { xkb_layout = "de"; }; keybindings = mkOptionDefault { "${modifier}+2" = "workspace ${ws_2}"; "${modifier}+3" = "workspace ${ws_3}"; "${modifier}+4" = "workspace ${ws_4}"; "${modifier}+Shift+2" = "move container to workspace ${ws_2}"; "${modifier}+Shift+3" = "move container to workspace ${ws_3}"; "${modifier}+Shift+4" = "move container to workspace ${ws_4}"; "${modifier}+Shift+Delete" = "exec 'swaymsg exit'"; "${modifier}+L" = "exec 'swaylock -f --grace 0'"; "XF86MonBrightnessDown" = "exec brightnessctl 10%-"; "XF86MonBrightnessUp" = "exec brightnessctl +10%"; "XF86AudioRaiseVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%'"; "XF86AudioLowerVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%'"; "XF86AudioMute" = "exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'"; }; modifier = "Mod4"; output."*" = { bg = "${inputs.self.resources.void.background} fill"; }; terminal = "kitty"; window.titlebar = false; workspaceOutputAssign = ( (map (n: { output = DOCK_L; workspace = n; }) [ "6" "7" "8" "9" "10" ] ) ++ map (n: { output = DOCK_R; workspace = n; }) [ "1" ws_2 ws_3 ws_4 "5" ] ); }; wrapperFeatures.gtk = true; }; }; }