diff --git a/.bin/dmenu-trans b/.bin/dmenu-trans index c944174..6ce20ea 100755 --- a/.bin/dmenu-trans +++ b/.bin/dmenu-trans @@ -4,6 +4,6 @@ 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) -notify-send --app-name= -t 3000 "$(trans $selected -b "$(dmenu -p $selected &)" \ +notify-send --app-name= -t 3000 "$(trans "$selected" -b "$(dmenu -p "$selected" &)" \ | tr -d '\n' \ | xclip -sel clip -f)" diff --git a/.bin/fzf-book b/.bin/fzf-book index b6cfdde..be78542 100755 --- a/.bin/fzf-book +++ b/.bin/fzf-book @@ -4,7 +4,8 @@ # Generate menu of book filenames and save paths # Preview window contains metadata -selected="$(find /home/h/doc/books/ -regex '.*\.\(pdf\|epub\|djvu\)' -type f | sort | fzf --delimiter=/ --with-nth=-1 --preview 'pdfinfo {}' --preview-window=right:70%:wrap)" +# selected="$(find /home/h/doc/books/ -regex '.*\.\(pdf\|epub\|djvu\)' -type f | sort | fzf --delimiter=/ --with-nth=-1 --preview 'pdfinfo {}' --preview-window=right:70%:wrap)" +selected="$(find /home/h/doc/books/ -regex '.*\.\(pdf\|epub\|djvu\)' -type f | sort | fzf --delimiter=/ --with-nth=-1)" # Open and redirect output to /dev/null -zathura "$selected" 2> /dev/null & +zathura "$selected" --fork diff --git a/.bin/fzf-fontnames b/.bin/fzf-fontnames index bb21288..e19e3a0 100755 --- a/.bin/fzf-fontnames +++ b/.bin/fzf-fontnames @@ -11,11 +11,12 @@ update() { font_list=$(fc-list -f "%{fullname}\n") - echo "$font_list" | while read -r line ; do + echo "$font_list" | while read line ; do + first="$(echo "$line" | cut -d',' -f1)" last="$(echo "$line" | cut -d',' -f2)" - if "$(contains_dash "$first")"; then + if $(contains_dash "$first"); then echo "$last" >> "$fn" else echo "$first" >> "$fn" @@ -25,5 +26,5 @@ update() { case "$1" in --update) update;; - *) sort "$fn" | uniq | awk 'NF' | fzf;; + *) cat "$fn" | sort | uniq | awk 'NF' | fzf;; esac