Add i3 movement scripts

This commit is contained in:
2022-03-09 18:52:38 +00:00
parent 0511e4d812
commit e894bea00e
3 changed files with 27 additions and 0 deletions

View File

@@ -3,6 +3,17 @@
let
mod = "Mod4";
in {
home.file = {
"bin/scripts/goup" = {
source = ./goup;
executable = true;
};
"bin/scripts/godown" = {
source = ./godown;
executable = true;
};
};
xsession = {
enable = true;

10
user/progs/i3/godown Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
if test -n "$(i3utils workspace isLast)" ; then
if test -z "$(i3utils workspace isEmpty)" ; then
i3-msg workspace $(( $(i3utils workspace current) + 1 ))
fi
else
i3-msg workspace next
fi
i3utils workspace reflow

6
user/progs/i3/goup Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
if [ -z $(i3utils workspace isFirst) ]; then
i3-msg workspace prev
i3utils workspace reflow
fi