Regenerated

This commit is contained in:
2026-04-01 20:20:29 +02:00
parent 47414e1f7b
commit 855ff42147
3 changed files with 306 additions and 333 deletions
+294 -303
View File
File diff suppressed because it is too large Load Diff
+6 -16
View File
@@ -3029,42 +3029,33 @@ These are config files for waybar
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hyprscroll-overflow.sh :noweb yes :mkdirp yes :eval never #+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hyprscroll-overflow.sh :noweb yes :mkdirp yes :eval never
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
fallback='{"text":" ","class":"hidden"}' fallback='{"text":" ","class":"hidden"}'
# Get active workspace ID # Get active workspace ID
active_ws=$(hyprctl activeworkspace -j | jq '.id') || { echo "$fallback"; exit 0; } active_ws=$(hyprctl activeworkspace -j | jq '.id') || { echo "$fallback"; exit 0; }
# Get all clients on this workspace # Get all clients on this workspace
ws_clients=$(hyprctl clients -j | jq "[.[] | select(.workspace.id==$active_ws)]") ws_clients=$(hyprctl clients -j | jq "[.[] | select(.workspace.id==$active_ws)]")
total_clients=$(echo "$ws_clients" | jq 'length') total_clients=$(echo "$ws_clients" | jq 'length')
(( total_clients == 0 )) && { echo "$fallback"; exit 0; } (( total_clients == 0 )) && { echo "$fallback"; exit 0; }
# Get all monitors # Get all monitors
monitors=$(hyprctl monitors -j) monitors=$(hyprctl monitors -j)
# Count windows that are fully inside any monitor # Count windows that are fully inside any monitor
visible_count=$(jq -n --argjson clients "$ws_clients" --argjson monitors "$monitors" ' visible_count=$(jq -n --argjson clients "$ws_clients" --argjson monitors "$monitors" '
($clients[] | select( [ $clients[] | select(
($monitors[] | ($monitors[] |
.x <= .at[0] and (.at[0] + .size[0]) <= (.x + .width) and .x <= .at[0] and (.at[0] + .size[0]) <= (.x + .width) and
.y <= .at[1] and (.at[1] + .size[1]) <= (.y + .height) .y <= .at[1] and (.at[1] + .size[1]) <= (.y + .height)
) )
)) | length ) ] | length
') ')
# Show fallback if all windows fit # Show fallback if all windows fit
if (( total_clients <= visible_count )); then if (( total_clients <= visible_count )); then
echo "$fallback" echo "$fallback"
exit 0 exit 0
fi fi
# Build tooltip # Build tooltip
tooltip=$(echo "$ws_clients" | jq -r '.[].title' | sed ':a;N;$!ba;s/\n/\\n/g') tooltip=$(echo "$ws_clients" | jq -r '.[].title' | sed ':a;N;$!ba;s/\n/\\n/g')
# Output JSON # Output JSON
echo "{\"text\":\"★ $total_clients\",\"tooltip\":\"$tooltip\",\"class\":\"overflow\"}" echo "{\"text\":\"★ $total_clients\",\"tooltip\":\"$tooltip\",\"class\":\"overflow\"}"
#+END_SRC #+END_SRC
** =.config/waybar/scripts/hyprscroll-menu.sh= ** =.config/waybar/scripts/hyprscroll-menu.sh=
@@ -3080,7 +3071,6 @@ addr=$(echo "$clients" | grep "|$choice" | head -n1 | cut -d'|' -f1)
hyprctl dispatch focuswindow address:$addr hyprctl dispatch focuswindow address:$addr
#+END_SRC #+END_SRC
** =.config/waypaper/config.ini= ** =.config/waypaper/config.ini=
These are config files for waypaper These are config files for waypaper
#+BEGIN_SRC conf :tangle generated/.config/waypaper/config.ini :noweb yes :mkdirp yes :eval never #+BEGIN_SRC conf :tangle generated/.config/waypaper/config.ini :noweb yes :mkdirp yes :eval never
@@ -1,37 +1,29 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
fallback='{"text":" ","class":"hidden"}' fallback='{"text":" ","class":"hidden"}'
# Get active workspace ID # Get active workspace ID
active_ws=$(hyprctl activeworkspace -j | jq '.id') || { echo "$fallback"; exit 0; } active_ws=$(hyprctl activeworkspace -j | jq '.id') || { echo "$fallback"; exit 0; }
# Get all clients on this workspace # Get all clients on this workspace
ws_clients=$(hyprctl clients -j | jq "[.[] | select(.workspace.id==$active_ws)]") ws_clients=$(hyprctl clients -j | jq "[.[] | select(.workspace.id==$active_ws)]")
total_clients=$(echo "$ws_clients" | jq 'length') total_clients=$(echo "$ws_clients" | jq 'length')
(( total_clients == 0 )) && { echo "$fallback"; exit 0; } (( total_clients == 0 )) && { echo "$fallback"; exit 0; }
# Get all monitors # Get all monitors
monitors=$(hyprctl monitors -j) monitors=$(hyprctl monitors -j)
# Count windows that are fully inside any monitor # Count windows that are fully inside any monitor
visible_count=$(jq -n --argjson clients "$ws_clients" --argjson monitors "$monitors" ' visible_count=$(jq -n --argjson clients "$ws_clients" --argjson monitors "$monitors" '
($clients[] | select( [ $clients[] | select(
($monitors[] | ($monitors[] |
.x <= .at[0] and (.at[0] + .size[0]) <= (.x + .width) and .x <= .at[0] and (.at[0] + .size[0]) <= (.x + .width) and
.y <= .at[1] and (.at[1] + .size[1]) <= (.y + .height) .y <= .at[1] and (.at[1] + .size[1]) <= (.y + .height)
) )
)) | length ) ] | length
') ')
# Show fallback if all windows fit # Show fallback if all windows fit
if (( total_clients <= visible_count )); then if (( total_clients <= visible_count )); then
echo "$fallback" echo "$fallback"
exit 0 exit 0
fi fi
# Build tooltip # Build tooltip
tooltip=$(echo "$ws_clients" | jq -r '.[].title' | sed ':a;N;$!ba;s/\n/\\n/g') tooltip=$(echo "$ws_clients" | jq -r '.[].title' | sed ':a;N;$!ba;s/\n/\\n/g')
# Output JSON # Output JSON
echo "{\"text\":\"★ $total_clients\",\"tooltip\":\"$tooltip\",\"class\":\"overflow\"}" echo "{\"text\":\"★ $total_clients\",\"tooltip\":\"$tooltip\",\"class\":\"overflow\"}"