aboutsummaryrefslogtreecommitdiff
path: root/.config/eww/scripts
diff options
context:
space:
mode:
Diffstat (limited to '.config/eww/scripts')
-rwxr-xr-x.config/eww/scripts/workspace.sh20
1 files changed, 7 insertions, 13 deletions
diff --git a/.config/eww/scripts/workspace.sh b/.config/eww/scripts/workspace.sh
index e0c34dd..91a3cf6 100755
--- a/.config/eww/scripts/workspace.sh
+++ b/.config/eww/scripts/workspace.sh
@@ -1,12 +1,6 @@
#! /bin/bash
active() {
-if [[ $arg = 0 && $(river-bedload -print outputs | jq -r '.[''] | select(.).name' | wc -l | xargs) -gt 1 ]]
-then
- arg=1
-else
- arg=0
-fi
num=$(river-bedload -print outputs | jq -r '.['$arg'] | select(.).view_tags')
b=0
while [[ $num -gt 0 ]]
@@ -35,19 +29,19 @@ export arg="$1"
o1 o2 o3 o4 o5 o6 o7 o8 o9 \
f1 f2 f3 f4 f5 f6 f7 f8 f9
-ows="$(active)"
-for num in $ows; do
- export o"$num"="$num"
-done
-
-# Get Focused workspace for current monitor ID
-export arg="$1"
if [[ $arg = 0 && $(river-bedload -print outputs | jq -r '.[''] | select(.).name' | wc -l | xargs) -gt 1 ]]
then
arg=1
else
arg=0
fi
+
+ows="$(active)"
+for num in $ows; do
+ export o"$num"="$num"
+done
+
+# Get Focused workspace for current monitor ID
num=$(river-bedload -print focused | jq -r '.['$arg'] | select(.).focused_id')
export f"$num"="$num"