Regenerated
This commit is contained in:
+318
-311
File diff suppressed because it is too large
Load Diff
+30
-23
@@ -2635,7 +2635,7 @@ in
|
|||||||
|
|
||||||
** =.config/waybar/config=
|
** =.config/waybar/config=
|
||||||
These are config files for waybar
|
These are config files for waybar
|
||||||
#+BEGIN_SRC conf :tangle generated/.config/waybar/config :noweb yes :mkdirp yes :eval never
|
#+BEGIN_SRC json :tangle generated/.config/waybar/config :noweb yes :mkdirp yes :eval never
|
||||||
{
|
{
|
||||||
"layer": "top",
|
"layer": "top",
|
||||||
"height": 34,
|
"height": 34,
|
||||||
@@ -2660,16 +2660,17 @@ These are config files for waybar
|
|||||||
"battery",
|
"battery",
|
||||||
"tray",
|
"tray",
|
||||||
"clock",
|
"clock",
|
||||||
"custom/notifications",
|
# "custom/notifications",
|
||||||
],
|
],
|
||||||
|
|
||||||
"custom/hyprscroll_overflow": {
|
"custom/hyprscroll_overflow": {
|
||||||
"exec": "~/.config/waybar/scripts/hyprscroll-overflow.sh",
|
"exec": "~/.config/waybar/scripts/hyprscroll-overflow.sh",
|
||||||
"interval": 2,
|
"interval": 2,
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
|
"format": "{}",
|
||||||
"on-click": "~/.config/waybar/scripts/hyprscroll-menu.sh",
|
"on-click": "~/.config/waybar/scripts/hyprscroll-menu.sh",
|
||||||
"tooltip": true
|
"tooltip": true
|
||||||
},
|
},,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
"custom/notifications": {
|
"custom/notifications": {
|
||||||
@@ -2770,7 +2771,6 @@ These are config files for waybar
|
|||||||
"format-icons": ["", "", "", "", " "],
|
"format-icons": ["", "", "", "", " "],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =.config/waybar/style.css=
|
** =.config/waybar/style.css=
|
||||||
@@ -3029,31 +3029,38 @@ 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/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
|
||||||
|
# Fallback output
|
||||||
|
fallback='{"text":" ","class":"hidden"}'
|
||||||
# Get active workspace
|
# Get active workspace
|
||||||
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
active_ws=$(hyprctl activeworkspace -j 2>/dev/null | jq -r '.id' 2>/dev/null) || {
|
||||||
|
echo "$fallback"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
# Get workspace info
|
# Get workspace info
|
||||||
ws=$(hyprctl workspaces -j | jq ".[] | select(.id==$active_ws)")
|
ws=$(hyprctl workspaces -j 2>/dev/null | jq ".[] | select(.id==$active_ws)" 2>/dev/null) || {
|
||||||
# Layout (requires hyprscroll plugin)
|
echo "$fallback"
|
||||||
layout=$(echo "$ws" | jq -r '.layout // "unknown"')
|
exit 0
|
||||||
# Window count
|
}
|
||||||
clients=$(hyprctl clients -j | jq "[.[] | select(.workspace.id==$active_ws)]")
|
# Layout
|
||||||
count=$(echo "$clients" | jq 'length')
|
layout=$(echo "$ws" | jq -r '.layout // "unknown"' 2>/dev/null)
|
||||||
# Visible windows (heuristic: fullscreen or floating doesn't matter, we count all)
|
# Clients
|
||||||
# If you use hyprscroll, visible windows ≈ 1 (current focus)
|
clients=$(hyprctl clients -j 2>/dev/null | jq "[.[] | select(.workspace.id==$active_ws)]" 2>/dev/null) || {
|
||||||
|
echo "$fallback"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
count=$(echo "$clients" | jq 'length' 2>/dev/null)
|
||||||
|
# In scrolling layout, only 1 is visible
|
||||||
visible=1
|
visible=1
|
||||||
# Build tooltip (list all windows)
|
|
||||||
tooltip=$(echo "$clients" | jq -r '.[].title' | sed ':a;N;$!ba;s/\n/\\n/g')
|
|
||||||
# Conditions
|
# Conditions
|
||||||
if [[ "$layout" != "scrolling" ]]; then
|
if [[ "$layout" != "scrolling" ]] || (( count <= visible )); then
|
||||||
echo '{"text": "", "class": "hidden"}'
|
echo "$fallback"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if (( count <= visible )); then
|
# Tooltip (safe escaping)
|
||||||
echo '{"text": "", "class": "hidden"}'
|
tooltip=$(echo "$clients" | jq -r '.[].title' 2>/dev/null | sed ':a;N;$!ba;s/\n/\\n/g')
|
||||||
exit 0
|
# Final output
|
||||||
fi
|
echo "{\"text\":\"★ $count\",\"tooltip\":\"$tooltip\",\"class\":\"overflow\"}"
|
||||||
# Output star + count
|
|
||||||
echo "{\"text\": \"★ $count\", \"tooltip\": \"$tooltip\", \"class\": \"overflow\"}"
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =.config/waybar/scripts/hyprscroll-menu.sh=
|
** =.config/waybar/scripts/hyprscroll-menu.sh=
|
||||||
|
|||||||
@@ -22,16 +22,17 @@
|
|||||||
"battery",
|
"battery",
|
||||||
"tray",
|
"tray",
|
||||||
"clock",
|
"clock",
|
||||||
"custom/notifications",
|
# "custom/notifications",
|
||||||
],
|
],
|
||||||
|
|
||||||
"custom/hyprscroll_overflow": {
|
"custom/hyprscroll_overflow": {
|
||||||
"exec": "~/.config/waybar/scripts/hyprscroll-overflow.sh",
|
"exec": "~/.config/waybar/scripts/hyprscroll-overflow.sh",
|
||||||
"interval": 2,
|
"interval": 2,
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
|
"format": "{}",
|
||||||
"on-click": "~/.config/waybar/scripts/hyprscroll-menu.sh",
|
"on-click": "~/.config/waybar/scripts/hyprscroll-menu.sh",
|
||||||
"tooltip": true
|
"tooltip": true
|
||||||
},
|
},,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
"custom/notifications": {
|
"custom/notifications": {
|
||||||
|
|||||||
@@ -1,26 +1,33 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
# Fallback output
|
||||||
|
fallback='{"text":" ","class":"hidden"}'
|
||||||
# Get active workspace
|
# Get active workspace
|
||||||
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
active_ws=$(hyprctl activeworkspace -j 2>/dev/null | jq -r '.id' 2>/dev/null) || {
|
||||||
|
echo "$fallback"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
# Get workspace info
|
# Get workspace info
|
||||||
ws=$(hyprctl workspaces -j | jq ".[] | select(.id==$active_ws)")
|
ws=$(hyprctl workspaces -j 2>/dev/null | jq ".[] | select(.id==$active_ws)" 2>/dev/null) || {
|
||||||
# Layout (requires hyprscroll plugin)
|
echo "$fallback"
|
||||||
layout=$(echo "$ws" | jq -r '.layout // "unknown"')
|
exit 0
|
||||||
# Window count
|
}
|
||||||
clients=$(hyprctl clients -j | jq "[.[] | select(.workspace.id==$active_ws)]")
|
# Layout
|
||||||
count=$(echo "$clients" | jq 'length')
|
layout=$(echo "$ws" | jq -r '.layout // "unknown"' 2>/dev/null)
|
||||||
# Visible windows (heuristic: fullscreen or floating doesn't matter, we count all)
|
# Clients
|
||||||
# If you use hyprscroll, visible windows ≈ 1 (current focus)
|
clients=$(hyprctl clients -j 2>/dev/null | jq "[.[] | select(.workspace.id==$active_ws)]" 2>/dev/null) || {
|
||||||
|
echo "$fallback"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
count=$(echo "$clients" | jq 'length' 2>/dev/null)
|
||||||
|
# In scrolling layout, only 1 is visible
|
||||||
visible=1
|
visible=1
|
||||||
# Build tooltip (list all windows)
|
|
||||||
tooltip=$(echo "$clients" | jq -r '.[].title' | sed ':a;N;$!ba;s/\n/\\n/g')
|
|
||||||
# Conditions
|
# Conditions
|
||||||
if [[ "$layout" != "scrolling" ]]; then
|
if [[ "$layout" != "scrolling" ]] || (( count <= visible )); then
|
||||||
echo '{"text": "", "class": "hidden"}'
|
echo "$fallback"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if (( count <= visible )); then
|
# Tooltip (safe escaping)
|
||||||
echo '{"text": "", "class": "hidden"}'
|
tooltip=$(echo "$clients" | jq -r '.[].title' 2>/dev/null | sed ':a;N;$!ba;s/\n/\\n/g')
|
||||||
exit 0
|
# Final output
|
||||||
fi
|
echo "{\"text\":\"★ $count\",\"tooltip\":\"$tooltip\",\"class\":\"overflow\"}"
|
||||||
# Output star + count
|
|
||||||
echo "{\"text\": \"★ $count\", \"tooltip\": \"$tooltip\", \"class\": \"overflow\"}"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user