summaryrefslogtreecommitdiffstats
path: root/bin/hornet
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-07-10 16:00:59 -0400
committerJesse Luehrs <doy@tozt.net>2021-07-10 16:00:59 -0400
commit5120b108ca2dcd78db519226516e071aca7b81d0 (patch)
treebd2d471d4e16b757b0dac2a7fc470b5caacfb5eb /bin/hornet
parent7946924e237e059bb1b8ca311824042f69396e66 (diff)
downloadconf-5120b108ca2dcd78db519226516e071aca7b81d0.tar.gz
conf-5120b108ca2dcd78db519226516e071aca7b81d0.zip
shfmt everything
Diffstat (limited to 'bin/hornet')
-rwxr-xr-xbin/hornet/numkeys11
-rwxr-xr-xbin/hornet/sc30
-rwxr-xr-xbin/hornet/ssh2
-rwxr-xr-xbin/hornet/tv4
-rwxr-xr-xbin/hornet/twitch4
-rwxr-xr-xbin/hornet/update-weather2
-rwxr-xr-xbin/hornet/vscreen25
-rwxr-xr-xbin/hornet/watch-kbd2
8 files changed, 41 insertions, 39 deletions
diff --git a/bin/hornet/numkeys b/bin/hornet/numkeys
index 9d037f5..9b284bb 100755
--- a/bin/hornet/numkeys
+++ b/bin/hornet/numkeys
@@ -47,8 +47,11 @@ toggle() {
}
case "$1" in
- on) on ;;
- off) off ;;
- toggle) toggle ;;
- *) echo invalid 1>&2; exit 1 ;;
+on) on ;;
+off) off ;;
+toggle) toggle ;;
+*)
+ echo invalid 1>&2
+ exit 1
+ ;;
esac
diff --git a/bin/hornet/sc b/bin/hornet/sc
index d86b917..614a1bc 100755
--- a/bin/hornet/sc
+++ b/bin/hornet/sc
@@ -1,19 +1,19 @@
#!/bin/sh
case "$1" in
- on)
- xset s 300 5
- xset dpms 600 600 600
- ;;
- off)
- xset s off
- xset dpms 0 0 0
- ;;
- q)
- xset q | perl -nlE'print if ((/^(:?Screen Saver|DPMS)/.../^[^\s]/) && /^(:?Screen Saver|DPMS|\s)/)'
- ;;
- *)
- echo "$(basename "$0"): unknown argument '$1'" >&2
- exit 1
- ;;
+on)
+ xset s 300 5
+ xset dpms 600 600 600
+ ;;
+off)
+ xset s off
+ xset dpms 0 0 0
+ ;;
+q)
+ xset q | perl -nlE'print if ((/^(:?Screen Saver|DPMS)/.../^[^\s]/) && /^(:?Screen Saver|DPMS|\s)/)'
+ ;;
+*)
+ echo "$(basename "$0"): unknown argument '$1'" >&2
+ exit 1
+ ;;
esac
diff --git a/bin/hornet/ssh b/bin/hornet/ssh
index 65c2f53..bbacdf9 100755
--- a/bin/hornet/ssh
+++ b/bin/hornet/ssh
@@ -2,5 +2,5 @@
set -eu
set -o pipefail
-ssh-add -l | grep -q "${HOME}/.ssh/id_rsa" || env SSH_ASKPASS="ssh-askpass" ssh-add < /dev/null
+ssh-add -l | grep -q "${HOME}/.ssh/id_rsa" || env SSH_ASKPASS="ssh-askpass" ssh-add </dev/null
exec /usr/bin/"$(basename "$0")" "$@"
diff --git a/bin/hornet/tv b/bin/hornet/tv
index eea7fca..620cb1a 100755
--- a/bin/hornet/tv
+++ b/bin/hornet/tv
@@ -2,7 +2,7 @@
xrandr --auto
if xrandr -q | grep -q "DP-3 connected"; then
- xrandr --output DP-3 --right-of eDP-1 --mode 1920x1080
+ xrandr --output DP-3 --right-of eDP-1 --mode 1920x1080
elif xrandr -q | grep -q "DP-4 connected"; then
- xrandr --output DP-4 --right-of eDP-1 --mode 1920x1080
+ xrandr --output DP-4 --right-of eDP-1 --mode 1920x1080
fi
diff --git a/bin/hornet/twitch b/bin/hornet/twitch
index 79473f2..5b691ab 100755
--- a/bin/hornet/twitch
+++ b/bin/hornet/twitch
@@ -2,8 +2,8 @@
if [ -z "${1}" ]; then
ssh partofme killall vlc
- echo '*/buffer close twitch.#' > ~/.weechat/weechat_fifo
+ echo '*/buffer close twitch.#' >~/.weechat/weechat_fifo
else
ssh partofme sh -c "'nohup twitch ${1} > /dev/null 2>&1 &'"
- echo "irc.server.twitch */join #${1}" > ~/.weechat/weechat_fifo
+ echo "irc.server.twitch */join #${1}" >~/.weechat/weechat_fifo
fi
diff --git a/bin/hornet/update-weather b/bin/hornet/update-weather
index 8105223..fad6ff7 100755
--- a/bin/hornet/update-weather
+++ b/bin/hornet/update-weather
@@ -2,5 +2,5 @@
set -eu
set -o pipefail
-weather > ~/.cache/weather.new
+weather >~/.cache/weather.new
mv ~/.cache/weather.new ~/.cache/weather
diff --git a/bin/hornet/vscreen b/bin/hornet/vscreen
index d39b389..52fc5cc 100755
--- a/bin/hornet/vscreen
+++ b/bin/hornet/vscreen
@@ -1,17 +1,16 @@
#!/bin/sh
-
case "$1" in
- goto)
- xrandr --addmode VIRTUAL1 1920x1080
- xrandr --output VIRTUAL1 --auto --output eDP1 --auto --left-of VIRTUAL1
- i3-switch-workspace virtual
- ;;
- off)
- xrandr --output VIRTUAL1 --off
- ;;
- *)
- echo "bad subcommand $1" >&2
- exit 1
- ;;
+goto)
+ xrandr --addmode VIRTUAL1 1920x1080
+ xrandr --output VIRTUAL1 --auto --output eDP1 --auto --left-of VIRTUAL1
+ i3-switch-workspace virtual
+ ;;
+off)
+ xrandr --output VIRTUAL1 --off
+ ;;
+*)
+ echo "bad subcommand $1" >&2
+ exit 1
+ ;;
esac
diff --git a/bin/hornet/watch-kbd b/bin/hornet/watch-kbd
index d5cd583..2516f6b 100755
--- a/bin/hornet/watch-kbd
+++ b/bin/hornet/watch-kbd
@@ -4,7 +4,7 @@ set -o pipefail
trap 'kill $(jobs -p)' EXIT
-inotifywait -mq -e create -e delete --exclude '.*tmp.*' /dev/input/by-id/ | \
+inotifywait -mq -e create -e delete --exclude '.*tmp.*' /dev/input/by-id/ |
while read -r event; do
echo "$event"
if echo "$event" | grep -q USB_Keyboard; then