aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorch1p <me@ch1p.com>2021-03-04 21:15:22 +0300
committerch1p <me@ch1p.com>2021-03-04 21:15:22 +0300
commit40591b7955979f683122ca9e32f7dba666275bf2 (patch)
tree51f4c775b5d5d8c39a5b1a7aa7f1a24352cdb3ab
parentf21e07d6745ae1bd5b1a1dce1ac0e8d110652268 (diff)
fix usage
-rwxr-xr-xswap_workspaces13
1 files changed, 6 insertions, 7 deletions
diff --git a/swap_workspaces b/swap_workspaces
index a4e4745..9269e4a 100755
--- a/swap_workspaces
+++ b/swap_workspaces
@@ -28,21 +28,21 @@ move_window() {
usage() {
cat <<-_EOF
- A program to move all windows from workspace <1> to workspace <2> and
- vice versa.
+ A program to move all windows from workspace <1> to workspace <2>.
- If the first workspace number is not specified, current workspace is assumed.
+ If the first workspace is not specified, current workspace is assumed.
Workspace numbering starts with 0.
This is useful when you want to reorder workspaces but your DE doesn't have such
feature.
Usage:
- $(basename "$0") [<1>] <2>
+ $(basename "$0") [<1>] <2>
Dependencies:
- wmctrl
+ wmctrl
_EOF
+ exit 1
}
FROM=$1
@@ -55,8 +55,7 @@ fi
if [ -z "$TO" ]; then
if [ -z "$FROM" ]; then
- echo "$USAGE"
- exit 1
+ usage
fi
TO="$FROM"
FROM=$(current_workspace)