Regenerated
This commit is contained in:
+333
-324
File diff suppressed because it is too large
Load Diff
+13
-4
@@ -3575,12 +3575,21 @@ These are config files for waybar
|
|||||||
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hypr-workspaces.sh :noweb yes :mkdirp yes :eval never
|
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hypr-workspaces.sh :noweb yes :mkdirp yes :eval never
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Get the focused monitor's active workspace
|
# Get the focused monitor name
|
||||||
focused_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
focused_monitor=$(hyprctl activeworkspace -j | jq -r '.monitor')
|
||||||
|
|
||||||
# Get clients in focused workspace
|
# Hide if this bar's monitor is not the focused one
|
||||||
|
if [ "$WAYBAR_OUTPUT" != "$focused_monitor" ]; then
|
||||||
|
jq -c -n '{text:"", class:"hidden"}'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get active workspace ID
|
||||||
|
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||||
|
|
||||||
|
# Get clients in active workspace
|
||||||
clients=$(hyprctl clients -j | jq -r \
|
clients=$(hyprctl clients -j | jq -r \
|
||||||
".[] | select(.workspace.id==$focused_ws) | \"\(.title)\"")
|
".[] | select(.workspace.id==$active_ws) | \"\(.title)\"")
|
||||||
|
|
||||||
# Count clients (only non-empty lines)
|
# Count clients (only non-empty lines)
|
||||||
count=$(echo "$clients" | grep -c '\S')
|
count=$(echo "$clients" | grep -c '\S')
|
||||||
|
|||||||
@@ -1,11 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Get the focused monitor's active workspace
|
# Get the focused monitor name
|
||||||
focused_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
focused_monitor=$(hyprctl activeworkspace -j | jq -r '.monitor')
|
||||||
|
|
||||||
# Get clients in focused workspace
|
# Hide if this bar's monitor is not the focused one
|
||||||
|
if [ "$WAYBAR_OUTPUT" != "$focused_monitor" ]; then
|
||||||
|
jq -c -n '{text:"", class:"hidden"}'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get active workspace ID
|
||||||
|
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||||
|
|
||||||
|
# Get clients in active workspace
|
||||||
clients=$(hyprctl clients -j | jq -r \
|
clients=$(hyprctl clients -j | jq -r \
|
||||||
".[] | select(.workspace.id==$focused_ws) | \"\(.title)\"")
|
".[] | select(.workspace.id==$active_ws) | \"\(.title)\"")
|
||||||
|
|
||||||
# Count clients (only non-empty lines)
|
# Count clients (only non-empty lines)
|
||||||
count=$(echo "$clients" | grep -c '\S')
|
count=$(echo "$clients" | grep -c '\S')
|
||||||
|
|||||||
Reference in New Issue
Block a user