diff --git a/.config/sway/cheatsheet.sh b/.config/sway/cheatsheet.sh new file mode 100755 index 0000000..5bf9b7b --- /dev/null +++ b/.config/sway/cheatsheet.sh @@ -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 diff --git a/.config/sway/config.d/10-appearance.conf b/.config/sway/config.d/10-appearance.conf index 2fc6b72..2e28f7d 100644 --- a/.config/sway/config.d/10-appearance.conf +++ b/.config/sway/config.d/10-appearance.conf @@ -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 diff --git a/.config/sway/config.d/20-swayfx.conf b/.config/sway/config.d/20-swayfx.conf index 7c8d172..546fbb7 100644 --- a/.config/sway/config.d/20-swayfx.conf +++ b/.config/sway/config.d/20-swayfx.conf @@ -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 diff --git a/.config/sway/config.d/30-workflow.conf b/.config/sway/config.d/30-workflow.conf index 78f5ae0..db1116d 100644 --- a/.config/sway/config.d/30-workflow.conf +++ b/.config/sway/config.d/30-workflow.conf @@ -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 diff --git a/.config/sway/screenshot-menu.sh b/.config/sway/screenshot-menu.sh new file mode 100755 index 0000000..62b1427 --- /dev/null +++ b/.config/sway/screenshot-menu.sh @@ -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" diff --git a/.config/sway/wallpaper.sh b/.config/sway/wallpaper.sh new file mode 100755 index 0000000..cfad776 --- /dev/null +++ b/.config/sway/wallpaper.sh @@ -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 diff --git a/.config/swaylock/config b/.config/swaylock/config index 4d6a2b3..84615c4 100644 --- a/.config/swaylock/config +++ b/.config/swaylock/config @@ -1,4 +1,4 @@ -image=~/Pictures/wallpapers/mono-glow.jpg +image=~/Pictures/wallpapers/current scaling=fill font=JetBrains Mono indicator-radius=90 diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index 76f8725..eba2b01 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -8,13 +8,15 @@ "spacing": 6, "modules-left": ["sway/workspaces", "sway/mode", "sway/window"], "modules-center": ["clock", "mpris"], - "modules-right": ["idle_inhibitor", "sway/language", "temperature", "cpu", "memory", "backlight", "pulseaudio", "network", "battery", "tray", "custom/power"], + "modules-right": ["idle_inhibitor", "sway/language", "group/hw", "backlight", "pulseaudio", "network", "battery", "tray", "custom/power"], "sway/workspaces": { "disable-scroll": true, "all-outputs": true, "format": "{icon}", "format-icons": {"1": "", "2": "", "3": "", "4": "", "5": "", "urgent": "", "default": ""} }, "sway/window": { "max-length": 45, "format": "{title}", "rewrite": { "(.*) — Mozilla Firefox": " $1", "(.*) - Chromium": " $1" } }, "sway/language": { "format": " {short}" }, "clock": { "format": " {:%H:%M}", "format-alt": " {:%A, %d %B %Y}", "tooltip-format": "{calendar}" }, "mpris": { "format": "{player_icon} {title}", "format-paused": " {title}", "player-icons": { "default": "" }, "max-length": 36, "tooltip-format": "{artist} — {title}" }, + "group/hw": { "orientation": "inherit", "drawer": { "transition-duration": 350, "transition-left-to-right": false }, "modules": ["custom/hw", "temperature", "cpu", "memory"] }, + "custom/hw": { "format": "\uf085", "tooltip": false }, "idle_inhibitor": { "format": "{icon}", "format-icons": { "activated": "", "deactivated": "" }, "tooltip-format-activated": "Idle inhibited", "tooltip-format-deactivated": "Idle allowed" }, "temperature": { "critical-threshold": 85, "format": " {temperatureC}°", "interval": 5 }, "cpu": { "format": " {usage}%", "interval": 3 }, diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 8f98a53..0c13835 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -65,3 +65,9 @@ window#waybar.empty #window { background: transparent; border-color: transparent tooltip { background: alpha(@base, 0.85); border: 1px solid alpha(@text, 0.12); border-radius: 12px; } tooltip label { color: @text; padding: 2px; } + +/* collapsible hardware drawer */ +#hw { background: alpha(@base, 0.55); border: 1px solid alpha(@text, 0.08); border-radius: 14px; padding: 0 4px; transition: all 0.25s ease; } +#hw:hover { border-color: alpha(@text, 0.25); } +#hw #custom-hw, #hw #temperature, #hw #cpu, #hw #memory { background: transparent; border: none; box-shadow: none; } +#custom-hw { color: @subtext; } diff --git a/README.md b/README.md index 077b7e5..db136ff 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,16 @@ Monochrome glass rice for SwayFX 0.6: frosted blur, rounded corners, glow on the - `.config/waybar`, `.config/rofi`, `.config/dunst`, `.config/swaylock` - `wallpapers/mono-glow.jpg` +## Keys +- `Super+Shift+W` wallpaper picker, `Super+Shift+S` screenshot menu, `Super+F1` keybinding cheatsheet +- `Super+Shift+B` performance mode (toggle blur + shadows) + ## Install Requires: swayfx, waybar, rofi, dunst, swaylock, swayidle, kitty, JetBrains Mono, Font Awesome 6. cp -r .config/* ~/.config/ mkdir -p ~/Pictures/wallpapers && cp wallpapers/* ~/Pictures/wallpapers/ + ln -sf ~/Pictures/wallpapers/mono-glow.jpg ~/Pictures/wallpapers/current swaymsg reload Waybar is started by sway itself (`/usr/share/sway/config.d/90-bar.conf`); reload its style with `pkill -SIGUSR2 waybar`. diff --git a/wallpapers/mono-dusk.jpg b/wallpapers/mono-dusk.jpg new file mode 100644 index 0000000..54a62b2 Binary files /dev/null and b/wallpapers/mono-dusk.jpg differ diff --git a/wallpapers/mono-grid.jpg b/wallpapers/mono-grid.jpg new file mode 100644 index 0000000..f9b81fd Binary files /dev/null and b/wallpapers/mono-grid.jpg differ diff --git a/wallpapers/mono-orb.jpg b/wallpapers/mono-orb.jpg new file mode 100644 index 0000000..accd60d Binary files /dev/null and b/wallpapers/mono-orb.jpg differ diff --git a/wallpapers/mono-smoke.jpg b/wallpapers/mono-smoke.jpg new file mode 100644 index 0000000..d8b752d Binary files /dev/null and b/wallpapers/mono-smoke.jpg differ