diff options
| author | Craig Jennings <c@cjennings.net> | 2026-01-28 06:18:25 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-01-28 06:18:25 -0600 |
| commit | 2028fe36fe9650f043b6b6ba84b0db7afdaa2cb0 (patch) | |
| tree | 5d6f769616b165bc479f3e70bdfe066a561192f5 /dotfiles/hyprland/.local/bin/toggle-scratchpad | |
| parent | cac207e5746ed549dfad3bb98fcf783ca3d6af57 (diff) | |
| download | archsetup-2028fe36fe9650f043b6b6ba84b0db7afdaa2cb0.tar.gz archsetup-2028fe36fe9650f043b6b6ba84b0db7afdaa2cb0.zip | |
fix(hyprland): add persistent logging and fix waybar/script issues
- Add persistent logging for waybar, dunst, hypridle, gammastep to ~/.local/var/log/
- Create start-hyprland wrapper script for Hyprland logging
- Fix waybar-layout and toggle-scratchpad to auto-detect Hyprland socket
- Add swap-icon-label: false to waybar group, remove height setting
- Fix GTK CSS margin units (1 → 1px) to silence deprecation warning
- Add battery detection in archsetup to exclude module on desktops
- Update cursor theme to Bibata-Modern-Ice size 24
Diffstat (limited to 'dotfiles/hyprland/.local/bin/toggle-scratchpad')
| -rwxr-xr-x | dotfiles/hyprland/.local/bin/toggle-scratchpad | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dotfiles/hyprland/.local/bin/toggle-scratchpad b/dotfiles/hyprland/.local/bin/toggle-scratchpad index bb10ef7..b3da6b4 100755 --- a/dotfiles/hyprland/.local/bin/toggle-scratchpad +++ b/dotfiles/hyprland/.local/bin/toggle-scratchpad @@ -9,6 +9,17 @@ if [ -z "$NAME" ]; then exit 1 fi +# Auto-detect current Hyprland socket if env var is stale +if ! hyprctl version >/dev/null 2>&1; then + # Find the most recent Hyprland instance with a socket + for dir in /run/user/"$(id -u)"/hypr/*/; do + if [ -S "${dir}.socket.sock" ]; then + export HYPRLAND_INSTANCE_SIGNATURE="$(basename "$dir")" + break + fi + done +fi + STATEFILE="/tmp/scratchpad-$NAME-open" NOW=$(date +%s) |
