some stuff
This commit is contained in:
23
scripts/swayutils
Executable file
23
scripts/swayutils
Executable 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
|
||||
Reference in New Issue
Block a user