Regenerated

This commit is contained in:
2026-04-03 17:05:02 +02:00
parent d3e35d652a
commit 5f970b28be
3 changed files with 358 additions and 337 deletions
+322 -315
View File
File diff suppressed because it is too large Load Diff
+18 -11
View File
@@ -2998,19 +2998,26 @@ printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
These are config files for waybar 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 active workspace clients (example using hyprctl) # Get active workspace ID
active_ws=$(hyprctl activeworkspace -j | jq -r '.id') active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
clients=$(hyprctl clients -j | jq -r --argjson ws "$active_ws" '.[] | select(.workspace == $ws) | .title') # Get clients in active workspace
# If no clients, output empty string (will hide) clients=$(hyprctl clients -j | jq -r \
if [ -z "$clients" ]; then ".[] | select(.workspace.id==$active_ws) | \"\(.title)\"")
echo '{"text": ""}' # Count clients
exit 0 count=$(echo "$clients" | grep -c .)
# If no clients → hide module
if [ "$count" -eq 0 ]; then
jq -c -n '{text:"", class:"hidden"}'
exit 0
fi fi
# Output the client list as plain text (Waybar will apply CSS) # Build tooltip (newline separated)
# Replace newlines with commas if you want inline display tooltip=$(echo "$clients" | sed 's/^/• /' | paste -sd '\n' -)
client_list=$(echo "$clients" | paste -sd ", " -) # Output JSON
# Wrap in JSON with Pango markup for styling (avoid <button>!) jq -c -n \
echo "{\"text\": \"$client_list\"}" --arg text "$count" \
--arg tooltip "$tooltip" \
--arg class "active" \
'{text:$text, tooltip:$tooltip, class:$class}'
#+END_SRC #+END_SRC
** =.config/waybar/scripts/hypr-workspacesmenu.sh= ** =.config/waybar/scripts/hypr-workspacesmenu.sh=
@@ -1,14 +1,21 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Get active workspace clients (example using hyprctl) # Get active workspace ID
active_ws=$(hyprctl activeworkspace -j | jq -r '.id') active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
clients=$(hyprctl clients -j | jq -r --argjson ws "$active_ws" '.[] | select(.workspace == $ws) | .title') # Get clients in active workspace
# If no clients, output empty string (will hide) clients=$(hyprctl clients -j | jq -r \
if [ -z "$clients" ]; then ".[] | select(.workspace.id==$active_ws) | \"\(.title)\"")
echo '{"text": ""}' # Count clients
exit 0 count=$(echo "$clients" | grep -c .)
# If no clients → hide module
if [ "$count" -eq 0 ]; then
jq -c -n '{text:"", class:"hidden"}'
exit 0
fi fi
# Output the client list as plain text (Waybar will apply CSS) # Build tooltip (newline separated)
# Replace newlines with commas if you want inline display tooltip=$(echo "$clients" | sed 's/^/• /' | paste -sd '\n' -)
client_list=$(echo "$clients" | paste -sd ", " -) # Output JSON
# Wrap in JSON with Pango markup for styling (avoid <button>!) jq -c -n \
echo "{\"text\": \"$client_list\"}" --arg text "$count" \
--arg tooltip "$tooltip" \
--arg class "active" \
'{text:$text, tooltip:$tooltip, class:$class}'