{ config, pkgs, ... }: { wayland.windowManager.sway = { enable = true; config = { # Input configuration input = { "type:touchpad" = { natural_scroll = "enabled"; tap = "enabled"; tap_button_map = "lrm"; scroll_method = "two_finger"; }; "type:pointer" = { natural_scroll = "enabled"; }; }; # Key bindings keybindings = { "Mod4+Return" = "exec alacritty"; "Mod4+Shift+q" = "kill"; "Mod4+b" = "exec vivaldi"; "Mod4+d" = "exec wofi --show drun --width 500 --height 350 --border 2 --prompt \"Apps\" --allow-images --gtk-dark"; "Mod4+Shift+d" = "exec wofi --show run --width 400 --height 200 --prompt \"Run\""; "Mod4+Tab" = "exec ~/.config/sway/scripts/window-switcher.sh"; "Mod4+Shift+c" = "reload"; "Mod4+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'"; # Focus movement "Mod4+h" = "focus left"; "Mod4+j" = "focus down"; "Mod4+k" = "focus up"; "Mod4+l" = "focus right"; "Mod4+Left" = "focus left"; "Mod4+Down" = "focus down"; "Mod4+Up" = "focus up"; "Mod4+Right" = "focus right"; # Move windows "Mod4+Shift+h" = "move left"; "Mod4+Shift+j" = "move down"; "Mod4+Shift+k" = "move up"; "Mod4+Shift+l" = "move right"; "Mod4+Shift+Left" = "move left"; "Mod4+Shift+Down" = "move down"; "Mod4+Shift+Up" = "move up"; "Mod4+Shift+Right" = "move right"; # Workspace switching "Mod4+1" = "workspace number 1"; "Mod4+2" = "workspace number 2"; "Mod4+3" = "workspace number 3"; "Mod4+4" = "workspace number 4"; "Mod4+5" = "workspace number 5"; "Mod4+6" = "workspace number 6"; "Mod4+7" = "workspace number 7"; "Mod4+8" = "workspace number 8"; "Mod4+9" = "workspace number 9"; "Mod4+0" = "workspace number 10"; # Move containers to workspaces "Mod4+Shift+1" = "move container to workspace number 1"; "Mod4+Shift+2" = "move container to workspace number 2"; "Mod4+Shift+3" = "move container to workspace number 3"; "Mod4+Shift+4" = "move container to workspace number 4"; "Mod4+Shift+5" = "move container to workspace number 5"; "Mod4+Shift+6" = "move container to workspace number 6"; "Mod4+Shift+7" = "move container to workspace number 7"; "Mod4+Shift+8" = "move container to workspace number 8"; "Mod4+Shift+9" = "move container to workspace number 9"; "Mod4+Shift+0" = "move container to workspace number 10"; "Mod4+f" = "fullscreen"; "Mod4+Shift+b" = "exec pkill waybar; waybar &"; }; # Window rules window = { commands = [ { criteria = { class = ".*"; }; command = "border pixel 2"; } { criteria = { app_id = ".*"; }; command = "border pixel 2"; } { criteria = { window_role = "dialog"; }; command = "border normal"; } { criteria = { window_type = "dialog"; }; command = "border normal"; } ]; titlebar = false; }; # Assignments assigns = { "9" = [{ class = "Vivaldi-stable"; }]; }; # Gaps gaps = { inner = 8; outer = 12; }; # Colors (Tokyo Night theme) colors = { focused = { border = "#7aa2f7"; background = "#7aa2f7"; text = "#1a1b26"; indicator = "#7aa2f7"; childBorder = "#7aa2f7"; }; focusedInactive = { border = "#24283b"; background = "#24283b"; text = "#c0caf5"; indicator = "#24283b"; childBorder = "#24283b"; }; unfocused = { border = "#24283b"; background = "#1a1b26"; text = "#9aa5ce"; indicator = "#24283b"; childBorder = "#24283b"; }; urgent = { border = "#f7768e"; background = "#f7768e"; text = "#1a1b26"; indicator = "#f7768e"; childBorder = "#f7768e"; }; }; # Output configuration output = { "*" = { #bg = "/home/jared/.config/sway/wallpapers/starters_and_pika.jpg fill"; }; }; # Seat configuration seat = { "seat0" = { xcursor_theme = "Bibata-Modern-Ice 24"; }; }; # Startup commands startup = [ { command = "waybar"; } { command = "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway"; } { command = "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"; } ]; }; }; }