From ccb081f4f40f71e5db09be082e69af9e25e84e41 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Fri, 10 May 2024 19:49:57 +0100 Subject: Updates for using eww as the bar for sway --- .config/eww/scripts/scratchpad-indicator.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to '.config/eww/scripts/scratchpad-indicator.sh') diff --git a/.config/eww/scripts/scratchpad-indicator.sh b/.config/eww/scripts/scratchpad-indicator.sh index b0911d9..8fd06f4 100755 --- a/.config/eww/scripts/scratchpad-indicator.sh +++ b/.config/eww/scripts/scratchpad-indicator.sh @@ -1,9 +1,8 @@ #!/bin/bash -# Scratchpad indicator for Hyprland +# Scratchpad indicator for Sway -output="$(hyprctl clients -j | jq -r '.[] | select(.workspace.id==-99) |""+.class+" : "+.title+""')" -number="$(hyprctl clients -j | jq -r '.[] | select(.workspace.id==-99) | (tostring)' | wc -l)" -file=~/.config/eww/eww.scss +output="$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?)|recurse(.floating_nodes[]?)|select(.name == "__i3_scratch").floating_nodes[]|"`"+.name+"` - "+.app_id+" "+(.id|tostring)')" +number="$(swaymsg -r -t get_tree | jq -r 'recurse(.nodes[]) | first(select(.name=="__i3_scratch")) | .floating_nodes | length')" if [ "$number" -gt 0 ]; then text=" $number" @@ -21,7 +20,7 @@ function ShowInfo() { exit else tooltip="$(echo -e $tooltip)" - notify-send " Scratchpad" "$tooltip" -r 123 + notify-send --hint=string:x-canonical-private-synchronous:scratchpad -u normal " Scratchpad" "$tooltip" fi } -- cgit v1.2.3