blob: 76268dd1e862c6cc04be7ab9ef42459b681a5fc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
|