Regenerated
This commit is contained in:
+310
-318
File diff suppressed because it is too large
Load Diff
+6
-14
@@ -2940,22 +2940,14 @@ printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
|
||||
These are config files for waybar
|
||||
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hypr-workspaces.sh :noweb yes :mkdirp yes :eval never
|
||||
#!/usr/bin/env bash
|
||||
# ~/.config/waybar/scripts/active-workspace-wincount-json.sh
|
||||
# ~/.config/waybar/scripts/hypr-workspaces.sh
|
||||
|
||||
# Get active workspace ID
|
||||
active_ws_id=$(hyprctl activewindow | grep "workspace: " | cut -d' ' -f2)
|
||||
# Example: count windows and generate tooltip
|
||||
win_count=4
|
||||
tooltip="• scripts - Thunar\n• Droidnix — config\n• Waybar Workspace Customization — Zen Browser\n• henrov@traveldroid: ~/.config/waybar/scripts"
|
||||
|
||||
# Get all clients on that workspace
|
||||
clients=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id==$active_ws_id) | .title")
|
||||
|
||||
# Count windows
|
||||
win_count=$(echo "$clients" | wc -l | tr -d ' ')
|
||||
|
||||
# Build tooltip string (each window on a new line)
|
||||
tooltip=$(echo "$clients" | sed 's/^/• /')
|
||||
|
||||
# Output JSON for Waybar
|
||||
jq -n --arg count "$win_count" --arg tooltip "$tooltip" '{text: $count, tooltip: $tooltip}'
|
||||
# Output compact JSON
|
||||
jq -c -n --arg text "$win_count" --arg tooltip "$tooltip" '{text: $text, tooltip: $tooltip}'
|
||||
#+END_SRC
|
||||
|
||||
** =.config/waybar/scripts/hypr-workspacesmenu.sh=
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# ~/.config/waybar/scripts/active-workspace-wincount-json.sh
|
||||
# ~/.config/waybar/scripts/hypr-workspaces.sh
|
||||
|
||||
# Get active workspace ID
|
||||
active_ws_id=$(hyprctl activewindow | grep "workspace: " | cut -d' ' -f2)
|
||||
# Example: count windows and generate tooltip
|
||||
win_count=4
|
||||
tooltip="• scripts - Thunar\n• Droidnix — config\n• Waybar Workspace Customization — Zen Browser\n• henrov@traveldroid: ~/.config/waybar/scripts"
|
||||
|
||||
# Get all clients on that workspace
|
||||
clients=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id==$active_ws_id) | .title")
|
||||
|
||||
# Count windows
|
||||
win_count=$(echo "$clients" | wc -l | tr -d ' ')
|
||||
|
||||
# Build tooltip string (each window on a new line)
|
||||
tooltip=$(echo "$clients" | sed 's/^/• /')
|
||||
|
||||
# Output JSON for Waybar
|
||||
jq -n --arg count "$win_count" --arg tooltip "$tooltip" '{text: $count, tooltip: $tooltip}'
|
||||
# Output compact JSON
|
||||
jq -c -n --arg text "$win_count" --arg tooltip "$tooltip" '{text: $text, tooltip: $tooltip}'
|
||||
|
||||
Reference in New Issue
Block a user