feat(sway): port keybindings, modes and tweaks from dotfiles

Adapted from emmaisadev/dotfiles (sway/config.d) into the Nix config:

- Screenshots to swappy: Print = drag a region, Shift+Print = focused
  window (a writeShellScript reusing the grimshot.sh tree/jq logic).
  Replaces the old plain full-screen grim->file.
- Workspace cycle Mod+z / Mod+x (prev/next).
- Media keys (playerctl) and mic mute (wpctl source).
- Re-home `focus mode_toggle` onto Mod+Alt+space (Mod+Space is the
  launcher now).
- Clipboard history: services.clipman stores copies; Mod+c picks one
  through a Catppuccin-themed fuzzel (programs.fuzzel).
- Binding modes: a layout submenu (Mod+y -> s/w/e, which also restores
  split-toggle that Mod+e gave up to nemo) and a power menu
  (Mod+Shift+x -> lock/exit/sleep/reboot/shutdown). Mod+l still locks
  immediately.
- Touchpad tap + natural scroll (laptops; inert on desktop).
- Solid Catppuccin base as the wallpaper (output * bg, no image).
- foot: term=xterm-256color and scrollback 100000 (colours unchanged).
- swaywm.nix: add slurp/swappy/jq/playerctl to the session packages.

Skipped from the dotfiles: named workspaces + app auto-assign, the foot
--server/footclient setup, and pactl/MX-Master/lxqt device-specific bits.
All in the shared files, so every Sway host gets it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Emma Thorpe
2026-06-09 20:49:36 +01:00
parent 2cbcc3d7f1
commit b04391809e
2 changed files with 122 additions and 1 deletions
+4
View File
@@ -37,6 +37,10 @@ in
brightnessctl
foot
grim
slurp # region selection for screenshots
swappy # screenshot annotation/save
jq # used by the focused-window screenshot bind
playerctl # MPRIS media keys
sway-launcher-desktop
pavucontrol
];