Add wallpaper picker, screenshot menu, cheatsheet, waybar hw drawer

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 23:49:08 +05:00
co-authored by Claude Sonnet 5.5
parent fc4a744e12
commit 91bd6ededf
14 changed files with 58 additions and 4 deletions
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
# Shows all sway keybindings in rofi
cat ~/.config/sway/config ~/.config/sway/config.d/*.conf | grep -E '^\s*bindsym' | grep -v -- '--locked' \
| sed -E 's/^\s*bindsym\s+//; s/\$mod/Super/g; s/^(\S+)\s+/\1\t→ /' \
| column -t -s $'\t' | rofi -dmenu -i -p "Keys" -theme ~/.config/rofi/catppuccin.rasi \
-theme-str 'window {width: 900px;} listview {lines: 14;} entry {placeholder: "Filter...";}' >/dev/null
+1 -1
View File
@@ -50,5 +50,5 @@ workspace_auto_back_and_forth yes
bindsym $mod+Shift+p exec ~/.config/rofi/powermenu.sh
# Wallpaper + idle/lock
output * bg ~/Pictures/wallpapers/mono-glow.jpg fill
output * bg ~/Pictures/wallpapers/current fill
exec_always ~/.config/sway/idle.sh
+1 -1
View File
@@ -36,7 +36,7 @@ layer_effects "notifications" blur enable; blur_ignore_transparent enable; corne
layer_effects "swaynag" blur enable; blur_ignore_transparent enable; corner_radius 12
# Translucent terminals, glass shows through
for_window [app_id="kitty"] opacity 0.88
# kitty opacity/blur is set in kitty.conf
for_window [app_id="scratch"] opacity 0.82
for_window [app_id="(?i)thunar|org.gnome.Nautilus"] opacity 0.92
for_window [app_id="pavucontrol|nm-connection-editor|blueman-manager"] opacity 0.92
+7
View File
@@ -25,3 +25,10 @@ for_window [app_id="mpv"] floating enable, dim_inactive 0
# Mirror internal screen to HDMI/TV on hotplug
exec_always ~/.config/sway/mirror.sh
# Rice helpers
bindsym $mod+Shift+w exec ~/.config/sway/wallpaper.sh
bindsym $mod+Shift+s exec ~/.config/sway/screenshot-menu.sh
bindsym $mod+F1 exec ~/.config/sway/cheatsheet.sh
# Performance mode: toggle blur + shadows
bindsym $mod+Shift+b blur toggle; shadows toggle
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
choice=$(printf '%s\n' ' Area → clipboard' ' Area → file' ' Screen → clipboard' ' Screen → file' \
| rofi -dmenu -i -p "Screenshot" -theme ~/.config/rofi/catppuccin.rasi \
-theme-str 'window {width: 380px;} listview {lines: 4;} entry {enabled: false;}')
dir=$HOME/Pictures/Screenshots; mkdir -p "$dir"
f=$dir/$(date +%F_%H-%M-%S).png
case "$choice" in
*"Area → clipboard") ~/.config/sway/screenshot.sh clip ;;
*"Area → file") ~/.config/sway/screenshot.sh file ;;
*"Screen → clipboard") sleep 0.3; grim - | wl-copy ;;
*"Screen → file") sleep 0.3; grim "$f" ;;
*) exit 0 ;;
esac
notify-send -t 2000 "Screenshot" "Saved"
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# Wallpaper picker with previews. Also used by sway at start (arg: apply).
dir=$HOME/Pictures/wallpapers
cur=$dir/current
if [ "$1" != apply ]; then
pick=$(find "$dir" -maxdepth 1 -type f \( -name '*.jpg' -o -name '*.png' \) | sort | while read -r f; do
printf '%s\0icon\x1f%s\n' "$(basename "$f" | sed 's/\.[^.]*$//')" "$f"
done | rofi -dmenu -i -p "Wallpaper" -show-icons -theme ~/.config/rofi/catppuccin.rasi \
-theme-str 'window {width: 760px;} listview {columns: 3; lines: 2;} element {orientation: vertical; padding: 10px;} element-icon {size: 9em;} element-text {horizontal-align: 0.5;} entry {enabled: false;}')
[ -n "$pick" ] || exit 0
file=$(find "$dir" -maxdepth 1 -type f -name "$pick.*" | head -1)
ln -sf "$file" "$cur"
fi
swaymsg output '*' bg "$cur" fill >/dev/null