aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/hyprland/.local/bin/waybar-layout
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/hyprland/.local/bin/waybar-layout')
-rwxr-xr-xdotfiles/hyprland/.local/bin/waybar-layout36
1 files changed, 0 insertions, 36 deletions
diff --git a/dotfiles/hyprland/.local/bin/waybar-layout b/dotfiles/hyprland/.local/bin/waybar-layout
deleted file mode 100755
index 083e9ef..0000000
--- a/dotfiles/hyprland/.local/bin/waybar-layout
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# Hyprland layout indicator for waybar
-# Shows current layout with nerd font icons
-# Layouts: master -> scrolling -> monocle -> floating
-
-# 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
-
-# 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 2>/dev/null | jq -r '.rules // []')
-
-# Determine icon and tooltip
-if [ "$LAYOUT" = "master" ] && echo "$WSRULES" | grep -q "allfloat"; then
- ICON="󰖲"
- TOOLTIP="Floating"
-elif [ "$LAYOUT" = "scrolling" ]; then
- ICON="󰯍"
- TOOLTIP="Scrolling"
-elif [ "$LAYOUT" = "monocle" ]; then
- ICON="󰊓"
- TOOLTIP="Monocle"
-elif [ "$LAYOUT" = "master" ]; then
- ICON="󰕰"
- TOOLTIP="Master"
-else
- ICON="󰕰"
- TOOLTIP="$LAYOUT"
-fi
-
-echo "{\"text\": \"<span size='large'>$ICON</span>\", \"tooltip\": \"$TOOLTIP\"}"