summaryrefslogtreecommitdiff
path: root/rofibooks.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rofibooks.sh')
-rwxr-xr-xrofibooks.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/rofibooks.sh b/rofibooks.sh
new file mode 100755
index 0000000..40cd72e
--- /dev/null
+++ b/rofibooks.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+seleccion=$(find $HOME/stf/books/ -mindepth 2 -type f |
+ cut -d "/" -f 6- |
+ awk '{ printf $0 "\n" }' |
+ rofi -dmenu -font "Iosevka Nerd Font 12" -p "Book")
+
+case $seleccion in
+*.pdf) zathura "$HOME/stf/books/$seleccion" ;;
+*.epub) zathura "$HOME/stf/books/$seleccion" ;;
+*.odt) libreoffice "$HOME/stf/books/$seleccion" ;;
+esac