mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-12-31 05:32:42 +00:00
Update 2025-10-09 Update 2025-10-11 feat: add rose-pine gtk themes Update 2025-10-16 Update 2025-10-23 Fix desktop niri Update 2025-10-31
22 lines
402 B
Bash
Executable File
22 lines
402 B
Bash
Executable File
#!/bin/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
|