some stuff

This commit is contained in:
2024-05-31 00:03:10 +01:00
parent 61658f1654
commit aeed8760b8
2 changed files with 44 additions and 2 deletions

23
scripts/swayutils Executable file
View File

@@ -0,0 +1,23 @@
function move {
CURR_WORKSPACE=$(swaymsg -t get_workspaces | jq -r '. | map(select(.focused == true)) | .[0].name')
echo $CURR_WORKSPACE
case $1 in
"next")
NEW_WORKSPACE=$(expr ${CURR_WORKSPACE} + 1)
;;
"prev")
NEW_WORKSPACE=$(expr ${CURR_WORKSPACE} - 1)
;;
esac
swaymsg "move container to workspace ${NEW_WORKSPACE}"
swaymsg "workspace ${NEW_WORKSPACE}"
}
case $1 in
"move")
move $2
;;
esac