scripts: fix bashisms

This commit is contained in:
lelgenio 2021-12-10 20:22:16 -03:00
parent f733fe22e4
commit 91272f517e
7 changed files with 19 additions and 23 deletions

View File

@ -9,7 +9,7 @@
papirus-folders -uC "{{@@ accent_color_name @@}}" ||
papirus-folders -uD
} &
} > /dev/null &
{%@@ endif @@%}
{%@@ if 'materia' in gtk_theme.lower() @@%}

View File

@ -7,4 +7,4 @@
else
qutebrowser $@
fi
} &> /dev/null < /dev/null & disown
} > /dev/null 2>&1 &

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Copyright Cédric Picard 2014 -- License WTFPL
# Inspired by Ranger's -- See https://github.com/hut/ranger
#

View File

@ -1,7 +1,7 @@
#!/bin/sh
set -e
set -ex
if test -z "$SWAYSOCK" && pidof gnome-shell &> /dev/null
if test -z "$SWAYSOCK" && pidof gnome-shell > /dev/null
then
exit 0
fi
@ -15,26 +15,26 @@ die() {
}
# trap die EXIT
{%@@ for name in mail | reverse @@%}
mkdir -p "$HOME/.local/share/mail/{{@@ name @@}}/"
{%@@ endfor @@%}
getnew() {
pushd "$HOME/.local/share/mail/" >/dev/null
cd "$HOME/.local/share/mail/" >/dev/null
find */INBOX*/new -type f |
sed -E '/Duolingo|LBRY/d' |
wc -l
popd >/dev/null
}
OLD=$(getnew)
if test "$1" = "update" && ! pidof mbsync; then
if ! ping -c3 {{@@ mail.personal.mail @@}} &> /dev/null
if ! ping -c3 {{@@ mail.personal.mail @@}} > /dev/null
then
exit 0
fi
timeout 120s mbsync -a ||
timeout 120s mbsync -a ||
timeout 120s mbsync -a
mbsync -a
fi
NEW=$(getnew)

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
RED_ON="$(pidof redshift)"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# {%@@ if launcher == "fuzzel" @@%} #
which fuzzel &> /dev/null &&

View File

@ -1,19 +1,15 @@
#!/bin/sh
get_displays(){
get_displays() {
swaymsg -t get_outputs |
jq -r 'map(.name)|join("\n")'
jq -r 'map(.name)|join("\n")'
}
actions=(
enable
disable
brightness
)
actions="enable disable brightness"
action=$(printf "%s\n" "${actions[@]}" | wdmenu)
action=$(printf "%s\n" $actions | wdmenu)
case "$action" in
enable|disable)
enable | disable)
output=$(get_displays | wdmenu -p "output")
swaymsg output "$output" "$action"
;;