mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-23 00:26:48 +01:00
test
This commit is contained in:
parent
c69ed34507
commit
d68c699a7a
18 changed files with 644 additions and 203 deletions
21
home-manager/modules/eww/config/scripts/change-active-workspace
Executable file
21
home-manager/modules/eww/config/scripts/change-active-workspace
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#! /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
|
||||
Loading…
Add table
Add a link
Reference in a new issue