Merge branch 'dev' into gentoo
system: speed up dmenuopen, filter files with `find` nvim: tweak colorscheme
This commit is contained in:
commit
ceccc122b7
@ -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?")
|
filetype=$(printf "$filetypes" | sed "s| |\n|g" | dmenu -i -p "type of the file?")
|
||||||
|
|
||||||
if [ -z "$filetype" ]; then
|
[ -z "$filetype" ] && exit 1
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
file=$(find $HOME/ -type f | grep "$filetype" | dmenu -i -l 20 -p "open")
|
|
||||||
|
|
||||||
if [ -z "$file" ]; then
|
file=$(find $HOME/{documents,downloads} -type f -path "*.$filetype" | dmenu -i -l 20 -p "open")
|
||||||
exit 0
|
|
||||||
fi
|
[ -z "$file" ] && exit 2
|
||||||
|
|
||||||
case "$filetype" in
|
case "$filetype" in
|
||||||
*.pdf) zathura "$file" ;;
|
pdf) zathura "$file" ;;
|
||||||
*.png|.jpg) sxiv "$file" ;;
|
png|jpg) sxiv "$file" ;;
|
||||||
*.txt|*.mom|*.tex) "$TERMINAL" -e nvim "$file" ;;
|
txt|mom|tex) "$TERMINAL" -e nvim "$file" ;;
|
||||||
*.mkv) mpv "$file";;
|
mkv) mpv "$file";;
|
||||||
esac
|
esac
|
||||||
|
@ -46,5 +46,3 @@ else
|
|||||||
switch_scheme
|
switch_scheme
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit c329ff44d3aef42e8347563bf7ae119b5a2a2d70
|
Subproject commit d77e1cfe127418ab00c6d5fb076f89cdf9b49e94
|
Reference in New Issue
Block a user