Advertisement
Arafat_H_Rakib

Rofi ebook or other file search plugin script

May 3rd, 2019
119
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # Author : natemaia https://forum.archlabslinux.com/u/natemaia
  3. # Date : 04/05/9
  4. # Descriptiom : Search ebooks from a directory in rofi
  5.  
  6. BOOKS_DIR=~/Dropbox/My-ebooks
  7.  
  8. find "$BOOKS_DIR" -type f \( -iname \*.pdf -o -iname \*.epub \) | awk -F'/' '{print $NF}' | rofi -dmenu -i -p 'Books' | awk '{print '"$HOME/Books/"'$0}' | xargs -r -0 xdg-open
Advertisement
RAW Paste Data Copied
Advertisement