diff options
Diffstat (limited to '.scripts')
| -rwxr-xr-x | .scripts/i3cmds/dmenumount | 6 | ||||
| -rwxr-xr-x | .scripts/i3cmds/dmenuumount | 11 | ||||
| -rwxr-xr-x | .scripts/statusbar/i3help | 2 | ||||
| -rwxr-xr-x | .scripts/tools/compiler | 1 | ||||
| -rwxr-xr-x | .scripts/tools/opout | 2 |
5 files changed, 14 insertions, 8 deletions
diff --git a/.scripts/i3cmds/dmenumount b/.scripts/i3cmds/dmenumount index cdeca18..431141f 100755 --- a/.scripts/i3cmds/dmenumount +++ b/.scripts/i3cmds/dmenumount @@ -17,16 +17,16 @@ getmount() { \ mountusb() { \ chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')" - sudo -A mount "$chosen" && exit 0 + sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0 getmount "/mnt /media /mount /home -maxdepth 5 -type d" - sudo -A mount "$chosen" "$mp" && pgrep -x dunst && notify-send "$chosen mounted to $mp." + sudo -A mount "$chosen" "$mp" && notify-send "$chosen mounted to $mp." } mountandroid() { \ chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1) getmount "$HOME -maxdepth 3 -type d" simple-mtpfs --device "$chosen" "$mp" - echo simple-mtpfs --device "$chosen" "$mp" + notify-send "Android device mounted to $mp." } asktype() { \ diff --git a/.scripts/i3cmds/dmenuumount b/.scripts/i3cmds/dmenuumount index c169326..a267010 100755 --- a/.scripts/i3cmds/dmenuumount +++ b/.scripts/i3cmds/dmenuumount @@ -30,7 +30,12 @@ if ! grep simple-mtpfs /etc/mtab; then echo "Unmountable USB drive detected." unmountusb else - [ -z "$drives" ] && echo "Unmountable Android device detected." && unmountandroid - echo "Unmountable USB drive(s) and Android device(s) detected." - asktype + if [ -z "$drives" ] + then + echo "Unmountable Android device detected." + unmountandroid + else + echo "Unmountable USB drive(s) and Android device(s) detected." + asktype + fi fi diff --git a/.scripts/statusbar/i3help b/.scripts/statusbar/i3help index b28f893..eacb15b 100755 --- a/.scripts/statusbar/i3help +++ b/.scripts/statusbar/i3help @@ -1,7 +1,7 @@ #!/bin/sh case $BLOCK_BUTTON in - 1) "$READER" ~/.config/i3/i3_guide.pdf ;; + 1) groff -mom ~/.readme.mom -Tpdf | zathura - ;; 3) pgrep -x dunst >/dev/null && notify-send "<b>❓ Help module:</b> - Left click to open LARBS guide.";; esac diff --git a/.scripts/tools/compiler b/.scripts/tools/compiler index 65feea0..cf628aa 100755 --- a/.scripts/tools/compiler +++ b/.scripts/tools/compiler @@ -38,6 +38,7 @@ shebangtest() { case "$file" in *\.ms) refer -PS -e "$file" | groff -me -ms -kejpt -T pdf > "$base".pdf ;; + *\.mom) refer -PS -e "$file" | groff -mom -kejpt -T pdf > "$base".pdf ;; *\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;; *\.tex) textype "$file" ;; *\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;; diff --git a/.scripts/tools/opout b/.scripts/tools/opout index 1fe3928..df34398 100755 --- a/.scripts/tools/opout +++ b/.scripts/tools/opout @@ -5,7 +5,7 @@ basename="${1%.*}" case "$1" in - *.tex|*.md|*.rmd|*.ms|*.me) setsid zathura "$basename".pdf >/dev/null 2>&1 & ;; + *.tex|*.md|*.rmd|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;; *.html) setsid "$TRUEBROWSER" --new-window "$basename".html >/dev/null 2>&1 & ;; *.sent) setsid sent "$1" >/dev/null 2>&1 & ;; esac |
