diff --git a/.config/i3/config b/.config/i3/config index 68ed7bb..87b7a61 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -237,9 +237,9 @@ mode "$mode_music" { bindsym $mod+Shift+B mode "$mode_explorer" set $mode_explorer (b)ooks, (y)outube, (m)ovies mode "$mode_explorer" { - bindsym m exec /home/naiji/.local/bin/dexplorer movies, mode "default" - bindsym y exec /home/naiji/.local/bin/dexplorer youtube, mode "default" - bindsym b exec /home/naiji/.local/bin/dexplorer books, mode "default" + bindsym m exec /home/naiji/.local/bin/dexplorer m dmenu, mode "default" + bindsym y exec /home/naiji/.local/bin/dexplorer y dmenu, mode "default" + bindsym b exec /home/naiji/.local/bin/dexplorer b dmenu, mode "default" # exit system mode: "Enter" or "Escape" bindsym Return mode "default" diff --git a/.local/bin/dexplorer b/.local/bin/dexplorer index d28f9b2..ac63815 100755 --- a/.local/bin/dexplorer +++ b/.local/bin/dexplorer @@ -1,5 +1,8 @@ #!/bin/bash -[ $1 == "books" ] && zathura "$(find ~/Mounts/hdd2/Books/ -type f | dmenu)"; -[ $1 == "youtube" ] && mpv "$(find ~/Mounts/hdd2/YouTube/ -type f | dmenu)"; -[ $1 == "movies" ] && mpv "$(find ~/Mounts/hdd2/Movies\ \&\ Series/ -type f | dmenu)"; +app="fzf" +[ ! -z $2 ] && [ $2 == "dmenu" ] && app="dmenu"; + +[ $1 == "b" ] && zathura "$(find ~/Mounts/hdd2/Books/ -type f | $app)"; +[ $1 == "y" ] && mpv "$(find ~/Mounts/hdd2/YouTube/ -type f | $app)"; +[ $1 == "m" ] && mpv "$(find ~/Mounts/hdd2/Movies\ \&\ Series/ -type f | $app)";