diff --git a/.local/bin/dmenuopen b/.local/bin/dmenuopen index 9ac96a1..6894892 100755 --- a/.local/bin/dmenuopen +++ b/.local/bin/dmenuopen @@ -10,22 +10,19 @@ ###################################################################### -filetypes=".pdf .png .jpg .txt .mom .tex .mkv" # could be augmented +filetypes="pdf png jpg txt mom tex mkv" # could be augmented filetype=$(printf "$filetypes" | sed "s| |\n|g" | dmenu -i -p "type of the file?") -if [ -z "$filetype" ]; then - exit 0 -fi +[ -z "$filetype" ] && exit 1 -file=$(find $HOME/ -type f | grep "$filetype" | dmenu -i -l 20 -p "open") -if [ -z "$file" ]; then - exit 0 -fi +file=$(find $HOME/{documents,downloads} -type f -path "*.$filetype" | dmenu -i -l 20 -p "open") + +[ -z "$file" ] && exit 2 case "$filetype" in - *.pdf) zathura "$file" ;; - *.png|.jpg) sxiv "$file" ;; - *.txt|*.mom|*.tex) "$TERMINAL" -e nvim "$file" ;; - *.mkv) mpv "$file";; + pdf) zathura "$file" ;; + png|jpg) sxiv "$file" ;; + txt|mom|tex) "$TERMINAL" -e nvim "$file" ;; + mkv) mpv "$file";; esac diff --git a/.local/bin/switch-colors b/.local/bin/switch-colors index 7652b17..2a77336 100755 --- a/.local/bin/switch-colors +++ b/.local/bin/switch-colors @@ -46,5 +46,3 @@ else switch_scheme fi fi - -exit 0 diff --git a/.local/src/astronomy.nvim b/.local/src/astronomy.nvim index c329ff4..d77e1cf 160000 --- a/.local/src/astronomy.nvim +++ b/.local/src/astronomy.nvim @@ -1 +1 @@ -Subproject commit c329ff44d3aef42e8347563bf7ae119b5a2a2d70 +Subproject commit d77e1cfe127418ab00c6d5fb076f89cdf9b49e94