Update fzf scripts
parent
23f6d6f1b4
commit
cac2e1a74e
|
@ -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)
|
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' \
|
| tr -d '\n' \
|
||||||
| xclip -sel clip -f)"
|
| xclip -sel clip -f)"
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
# Generate menu of book filenames and save paths
|
# Generate menu of book filenames and save paths
|
||||||
# Preview window contains metadata
|
# 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
|
# Open and redirect output to /dev/null
|
||||||
zathura "$selected" 2> /dev/null &
|
zathura "$selected" --fork
|
||||||
|
|
|
@ -11,11 +11,12 @@ update() {
|
||||||
|
|
||||||
font_list=$(fc-list -f "%{fullname}\n")
|
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)"
|
first="$(echo "$line" | cut -d',' -f1)"
|
||||||
last="$(echo "$line" | cut -d',' -f2)"
|
last="$(echo "$line" | cut -d',' -f2)"
|
||||||
|
|
||||||
if "$(contains_dash "$first")"; then
|
if $(contains_dash "$first"); then
|
||||||
echo "$last" >> "$fn"
|
echo "$last" >> "$fn"
|
||||||
else
|
else
|
||||||
echo "$first" >> "$fn"
|
echo "$first" >> "$fn"
|
||||||
|
@ -25,5 +26,5 @@ update() {
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--update) update;;
|
--update) update;;
|
||||||
*) sort "$fn" | uniq | awk 'NF' | fzf;;
|
*) cat "$fn" | sort | uniq | awk 'NF' | fzf;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue