feat(sway): init screenshot 581c65a3
Steve · 2026-10-15 23:10 3 file(s) · +29 −6
config.scm +4 −5
10 10
                     terminals version-control ncurses admin
11 11
                     compton lxde ssh golang docker containers xdisorg
12 12
                     rsync emacs base shells image-viewers librewolf
13 -
                     tmux python)
13 +
                     tmux python video image)
14 14
15 15
(operating-system
16 16
 (host-name "benson")
60 60
                    ;; terminal emulator
61 61
                    kitty
62 62
                    ;; utils
63 -
                    git btop ncurses openssh rsync fastfetch tmux
63 +
                    git btop ncurses openssh rsync
64 +
                    fastfetch tmux ffmpeg grim slurp
64 65
                    ;; dev
65 -
                    go
66 -
                    python
67 -
                    docker-cli
66 +
                    go  python docker-cli
68 67
                    (specification->package "cloudflared")) ; from Rosenthal channel
69 68
                   %base-packages))
70 69
scripts/screenshot.sh (added) +24 −0
1 +
#!/usr/bin/env bash
2 +
3 +
# wayshot — screenshot on Wayland using grim
4 +
# deps: grim (capture); optional: slurp (region select), wl-clipboard, libnotify
5 +
6 +
set -euo pipefail
7 +
8 +
DIR="${SCREENSHOT_DIR:-$HOME/Pictures/screenshots}"
9 +
mkdir -p "$DIR"
10 +
FILE="$DIR/screenshot_$(date +%Y%m%d_%H%M%S).png"
11 +
12 +
# Pass "-r" or "-f" for full screen, default is region-select
13 +
GEO=()
14 +
if [[ "${1:-}" != "-f" ]]; then
15 +
    GEO=(-g "$(slurp)")   # Ctrl+C or Esc to cancel
16 +
fi
17 +
18 +
grim -t png "${GEO[@]}" "$FILE"
19 +
20 +
# Optional: copy to clipboard + notify
21 +
command -v wl-copy   >/dev/null && wl-copy < "$FILE"
22 +
command -v notify-send >/dev/null && notify-send "Screenshot saved" "$FILE"
23 +
24 +
echo "$FILE"
sway/config +1 −1
37 37
# Window actions
38 38
bindsym $mod+w kill
39 39
bindsym $mod+f fullscreen toggle
40 -
bindsym $mod+s sticky toggle
40 +
bindsym $mod+s exec /home/stevedylandev/guix-dotfiles/scripts/screenshot.sh
41 41
bindsym $mod+t splith
42 42
bindsym $mod+v splitv
43 43
bindsym $mod+e layout toggle split