New opt-in feature for x86_64 desktops: sway + wofi + foot + swaybg +
swaylock + swayidle + grim + slurp + waybar + wl-clipboard. mako on
arch, dunst on debian (mako isn't packaged for debian).
Files:
- .chezmoi.yaml.tmpl: added data.sway flag (true on miche/byte/kaiser,
false on Pis). Override per host with ~/.config/chezmoi/features/sway
or ~/.config/chezmoi/features/no-sway marker files.
- run_once_40-install-sway.sh.tmpl: installs packages if .sway=true,
exits 0 otherwise. Sets up the marker file.
- dot_config/{sway,foot,wofi,waybar,mako}/: existing configs from miche.
Per-host toggle workflow:
# On any box, enable sway:
touch ~/.config/chezmoi/features/sway
chezmoi apply
# On a sway-enabled box, disable it:
touch ~/.config/chezmoi/features/no-sway
rm ~/.config/chezmoi/features/sway
chezmoi apply
Currently sway packages are already installed on miche (existed before
this commit). Byte will get them via the new run_once_40 script.
Pis (rye, crouton) are unaffected — install script early-returns.
34 lines
1,007 B
Bash
Executable file
34 lines
1,007 B
Bash
Executable file
#!/bin/bash
|
|
# lock-fancy.sh — fancy swaylock: snapshot the screen, dim+blur it, and use as background.
|
|
# grim + ffmpeg (both already installed). No swaylock-effects overlay needed.
|
|
|
|
set -e
|
|
|
|
TMP=/tmp/lock-bg-483833.png
|
|
DIM=/tmp/lock-bg-dim-483833.png
|
|
|
|
# Snapshot the current screen
|
|
grim -t png "$TMP" 2>/dev/null
|
|
|
|
# Dim + blur via ffmpeg (much faster than ImageMagick)
|
|
if [ -f "$TMP" ] && command -v ffmpeg >/dev/null; then
|
|
ffmpeg -loglevel error -y -i "$TMP" -vf "boxblur=12:1,eq=brightness=-0.30:saturation=0.6" -frames:v 1 "$DIM"
|
|
IMG="$DIM"
|
|
else
|
|
# Fallback to the regular wallpaper
|
|
IMG="$HOME/.local/share/wallpapers/teach-invaders-gruvbox.png"
|
|
fi
|
|
|
|
# Launch swaylock
|
|
swaylock -f -i "$IMG" \
|
|
--indicator-radius 100 \
|
|
--indicator-thickness 6 \
|
|
--ring-color ebdbb2 \
|
|
--inside-color 1d202180 \
|
|
--key-hl-color fe8019 \
|
|
--bs-hl-color fb4934 \
|
|
--text-color ebdbb2 \
|
|
--separator-color 00000000 \
|
|
--fade-in 0.3
|
|
|
|
rm -f "$TMP" "$DIM" 2>/dev/null
|