diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-11-24 22:17:55 +0100 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-11-24 22:17:55 +0100 |
commit | 872e287d1242a2baff74784f9245a4446c6455d3 (patch) | |
tree | c8ae5192f9d616e07e4561cbf58a1151656ab795 /setWindowSize.sh | |
parent | 6fd8e231c6a9f080c6271da69f3b93d581cc3c6b (diff) | |
download | scripts-872e287d1242a2baff74784f9245a4446c6455d3.tar.gz scripts-872e287d1242a2baff74784f9245a4446c6455d3.zip |
Script for window size and for npm-start on tmux window.
Diffstat (limited to 'setWindowSize.sh')
-rwxr-xr-x | setWindowSize.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/setWindowSize.sh b/setWindowSize.sh new file mode 100755 index 0000000..76268dd --- /dev/null +++ b/setWindowSize.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +# setWindowSize.sh: Sets the selected window size +# +# Usage: template.sh [-ac] [-b OPTARG] FILE... + +usageMessage="Usage: ${0} [-ac] [-b OPTARG] FILE..." + +error() { + printf '%s error: %s\n' "$0" "$*" >&2 +} + +errorAndUsage() { + printf '%s error: %s\n%s\n' "$0" "$*" "$usageMessage" >&2 +} + +# Process options +while getopts ':ab:c' opt; do + case $opt in + + 'a' ) + echo a + ;; + + 'b' ) + echo b "$OPTARG" + ;; + + 'c' ) + echo c + ;; + + '?' ) + printf '%s\n' "$usageMessage" >&2 + exit 1 + + esac +done +shift $((OPTIND - 1)) + +resolution="$(\ +printf \ +'854 480 +720 480 +800 600 +1280 720 +1920 1080' | + dmenu -l 5 -p 'Resolution:')" + +xdotool getwindowfocus -- windowsize $resolution |