master
Daniel Napora 2021-05-20 14:45:43 +02:00
parent 70ede2f318
commit 543fe65065
1 changed files with 9 additions and 6 deletions

15
bin/snapwin 100644 → 100755
View File

@ -1,8 +1,8 @@
#!/bin/bash
### snapwin - click on the appropriate area of the window to snap it in a given direction.
# Works with active and inactive windows.
# Same actions are available for kebindings: topleft, top, topright, left, center, right,
# bottomleft, bottom and bottomright.
#: snapwin - click on the appropriate area of the window to snap it in a given direction.
#: Works with active and inactive windows.
#: Same actions are available for kebindings: topleft, top, topright, left, center, right,
#: bottomleft, bottom and bottomright.
# Copyright (C) Daniel Napora <napcok@gmail.com> 2021
# https://maboxlinux.org
#
@ -136,10 +136,13 @@ moveto() {
POS_CODE="$1"
_movewin
}
usage() {
grep "^#:" $0 | while read DOC; do printf '%s\n' "${DOC###:}"; done
exit
}
case "$1" in
"") clicksnap ;;
topleft|top|topright|left|center|right|bottomleft|bottom|bottomright) moveto "$1" ;;
*) usage ;;
-h|--help) usage ;;
esac