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 | ef8b2e1fcd216ce6aed21f11e011246b033a9138 (patch) | |
| tree | 5034869cb702b6d2830beb905d840060d4eff355 /dotfiles/hyprland/.local/bin/waybar-layout | |
| parent | c42e4829181fbe65985b467c23ae41351b5aef9a (diff) | |
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/waybar-layout')
| -rwxr-xr-x | dotfiles/hyprland/.local/bin/waybar-layout | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dotfiles/hyprland/.local/bin/waybar-layout b/dotfiles/hyprland/.local/bin/waybar-layout index 6c45877..62470aa 100755 --- a/dotfiles/hyprland/.local/bin/waybar-layout +++ b/dotfiles/hyprland/.local/bin/waybar-layout @@ -3,17 +3,17 @@ # Shows current layout with nerd font icons # Layouts: master -> tab group (monocle) -> scrolling -> floating -# Get current layout -LAYOUT=$(hyprctl getoption general:layout -j | jq -r '.str') - -# Check if workspace has allfloat enabled -ALLFLOAT=$(hyprctl activeworkspace -j | jq -r '.hasfullscreenwindow') +# Check if hyprctl is reachable +if ! hyprctl version >/dev/null 2>&1; then + echo '{"text": "<span size='"'"'large'"'"'></span>", "tooltip": "Hyprland not connected"}' + exit 0 +fi -# Check if active window is floating -FLOATING=$(hyprctl activewindow -j 2>/dev/null | jq -r '.floating // false') +# Get current layout (redirect stderr to suppress connection errors) +LAYOUT=$(hyprctl getoption general:layout -j 2>/dev/null | jq -r '.str // "unknown"') # Check workspace rules for allfloat -WSRULES=$(hyprctl activeworkspace -j | jq -r '.rules // []') +WSRULES=$(hyprctl activeworkspace -j 2>/dev/null | jq -r '.rules // []') # Determine icon and tooltip if [ "$LAYOUT" = "master" ] && echo "$WSRULES" | grep -q "allfloat"; then |
