From 5120b108ca2dcd78db519226516e071aca7b81d0 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 10 Jul 2021 16:00:59 -0400 Subject: shfmt everything --- bin/hornet/numkeys | 11 +++++++---- bin/hornet/sc | 30 +++++++++++++++--------------- bin/hornet/ssh | 2 +- bin/hornet/tv | 4 ++-- bin/hornet/twitch | 4 ++-- bin/hornet/update-weather | 2 +- bin/hornet/vscreen | 25 ++++++++++++------------- bin/hornet/watch-kbd | 2 +- 8 files changed, 41 insertions(+), 39 deletions(-) (limited to 'bin/hornet') 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 ~/.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 -- cgit v1.2.3-54-g00ecf