Update dmenu scripts
parent
749fd7b3ac
commit
766c63824c
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Open pdf by title
|
||||
# Note: does not handle incorrect metadata
|
||||
|
||||
dir=/home/h/doc/books
|
||||
|
||||
ag -g ".pdf$" $dir \
|
||||
| xargs -n1 -d '\n' pdfinfo 2> /dev/null \
|
||||
| grep "Title: " \
|
||||
| awk '{for (i=2; i<NF; i++) printf $i " "; printf $NF; printf "\n"}' \
|
||||
| grep -v "Title:"\
|
||||
| dmenu -i -p "Read:"
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
options="Play\nPause\nNext\nPrevious"
|
||||
|
||||
selected=$(echo -e "$options" | dmenu -i)
|
||||
|
||||
case "$selected" in
|
||||
"Play") playerctl --player=ncspot play;;
|
||||
"Pause") playerctl --player=ncspot pause;;
|
||||
"Next") playerctl --player=ncspot next;;
|
||||
"Previous") playerctl --player=ncspot previous;;
|
||||
esac
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
options="nl:en\nen:nl\nnl:fr\nfr:nl\nen:fr\nfr:en\nnl:de\nde:nl"
|
||||
|
||||
selected=$(echo -e "$options" | dmenu -p "s?:t?" -i -l 0)
|
||||
|
|
Loading…
Reference in New Issue