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
|
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
|
||||||
# ~/.config/waybar/scripts/active-workspace-wincount-json.sh
|
# ~/.config/waybar/scripts/hypr-workspaces.sh
|
||||||
|
|
||||||
# Get active workspace ID
|
# Example: count windows and generate tooltip
|
||||||
active_ws_id=$(hyprctl activewindow | grep "workspace: " | cut -d' ' -f2)
|
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
|
# Output compact JSON
|
||||||
clients=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id==$active_ws_id) | .title")
|
jq -c -n --arg text "$win_count" --arg tooltip "$tooltip" '{text: $text, tooltip: $tooltip}'
|
||||||
|
|
||||||
# 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}'
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =.config/waybar/scripts/hypr-workspacesmenu.sh=
|
** =.config/waybar/scripts/hypr-workspacesmenu.sh=
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# ~/.config/waybar/scripts/active-workspace-wincount-json.sh
|
# ~/.config/waybar/scripts/hypr-workspaces.sh
|
||||||
|
|
||||||
# Get active workspace ID
|
# Example: count windows and generate tooltip
|
||||||
active_ws_id=$(hyprctl activewindow | grep "workspace: " | cut -d' ' -f2)
|
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
|
# Output compact JSON
|
||||||
clients=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id==$active_ws_id) | .title")
|
jq -c -n --arg text "$win_count" --arg tooltip "$tooltip" '{text: $text, tooltip: $tooltip}'
|
||||||
|
|
||||||
# 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}'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user