mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-29 02:38:37 -05:00
41 lines
728 B
Bash
Executable File
41 lines
728 B
Bash
Executable File
#!/bin/sh
|
|
|
|
case $1 in
|
|
--bemenu)
|
|
menu1="bemenu -i -p manga -l 10"
|
|
menu2="bemenu -i -p chapter -l 10"
|
|
;;
|
|
--dmenu)
|
|
menu1="dmenu -i -p manga -l 10"
|
|
menu2="dmenu -i -p chapter -l 10"
|
|
;;
|
|
--rofi)
|
|
menu1="rofi -dmenu -p Manga"
|
|
menu2="rofi -dmenu -p Chapter"
|
|
;;
|
|
--fzf)
|
|
menu1="fzf -e --no-multi"
|
|
menu2="${menu1}"
|
|
;;
|
|
--wofi)
|
|
menu1="wofi -d -p Manga"
|
|
menu2="wofi -d -p Chapter"
|
|
;;
|
|
*)
|
|
exit
|
|
;;
|
|
esac
|
|
|
|
manga=$(/usr/bin/ls ~/gallery-dl/Manga | ${menu1})
|
|
|
|
if [ -n "$manga" ]
|
|
then
|
|
chapter=$(/usr/bin/ls ~/gallery-dl/Manga/"${manga}" | ${menu2})
|
|
if [ -n "$chapter" ]
|
|
then
|
|
zathura ~/gallery-dl/Manga/"${manga}"/"${chapter}" &
|
|
else
|
|
mangamenu "$1"
|
|
fi
|
|
fi
|