adding better workspaces to eww
This commit is contained in:
parent
f7394076c1
commit
d34f4ab2b4
9 changed files with 55 additions and 33 deletions
21
.config/eww/scripts/change-active-workspace
Normal file
21
.config/eww/scripts/change-active-workspace
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
function clamp {
|
||||
min=$1
|
||||
max=$2
|
||||
val=$3
|
||||
python -c "print(max($min, min($val, $max)))"
|
||||
}
|
||||
|
||||
direction=$1
|
||||
current=$2
|
||||
if test "$direction" = "down"
|
||||
then
|
||||
target=$(clamp 1 10 $(($current+1)))
|
||||
echo "jumping to $target"
|
||||
hyprctl dispatch workspace $target
|
||||
elif test "$direction" = "up"
|
||||
then
|
||||
target=$(clamp 1 10 $(($current-1)))
|
||||
echo "jumping to $target"
|
||||
hyprctl dispatch workspace $target
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue