diff options
author | Justine Smithies <justine@smithies.me.uk> | 2024-07-06 14:58:24 +0100 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2024-07-06 14:58:24 +0100 |
commit | 45098288dfa0f23b753d60c890932b8f6b3f1640 (patch) | |
tree | 8195a3bf11514c29b55c99328b7eb48d9d0a8bbf /.config/eww/scripts | |
parent | b821190800efc50cb9b44e543ada07c5f88e57a2 (diff) |
Fixed Eww bar workspace script to work with my two screens when one is unplugged using kanshi.
Diffstat (limited to '.config/eww/scripts')
-rwxr-xr-x | .config/eww/scripts/workspace.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.config/eww/scripts/workspace.sh b/.config/eww/scripts/workspace.sh index 07564c2..34af41f 100755 --- a/.config/eww/scripts/workspace.sh +++ b/.config/eww/scripts/workspace.sh @@ -1,12 +1,14 @@ #! /bin/bash active() { -if [[ $arg = 0 ]] +if [[ $arg = 0 && $(river-bedload -print outputs | jq -r '.[''] | select(.).name' | wc -l | xargs) -gt 1 ]] +# if [[ $arg = 0 ]] then arg=1 else arg=0 fi +# fi num=$(river-bedload -print outputs | jq -r '.['$arg'] | select(.).view_tags') num=$(echo $num | awk -F' ' '{print $1}') b=0 @@ -43,7 +45,7 @@ done # Get Focused workspace for current monitor ID export arg="$1" -if [[ $arg = 0 ]] +if [[ $arg = 0 && $(river-bedload -print outputs | jq -r '.[''] | select(.).name' | wc -l | xargs) -gt 1 ]] then arg=1 else |