diff --git a/user/progs/i3/default.nix b/user/progs/i3/default.nix index d0f3421..da8a8d8 100644 --- a/user/progs/i3/default.nix +++ b/user/progs/i3/default.nix @@ -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; diff --git a/user/progs/i3/godown b/user/progs/i3/godown new file mode 100755 index 0000000..2243d6d --- /dev/null +++ b/user/progs/i3/godown @@ -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 diff --git a/user/progs/i3/goup b/user/progs/i3/goup new file mode 100755 index 0000000..0d28f9c --- /dev/null +++ b/user/progs/i3/goup @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -z $(i3utils workspace isFirst) ]; then + i3-msg workspace prev + i3utils workspace reflow +fi