Update some scripts
This commit is contained in:
parent
b5fa40b136
commit
cd9697c18b
@ -876,14 +876,13 @@ Finally, lock the screen using =i3lock=.
|
||||
curl "$address"
|
||||
fi
|
||||
#+end_src
|
||||
* =readbib= - Open Bibliography File
|
||||
|
||||
* =readbib= - Open Bibliography File
|
||||
#+begin_src bash :tangle ~/.local/bin/readbib
|
||||
cd ~/Cloud/pdfs/ && ls | rofi -dmenu -lines 20 | xargs -I {} zathura {}
|
||||
#+end_src
|
||||
|
||||
* =readnotes= - Open Note File
|
||||
|
||||
#+begin_src bash :tangle ~/.local/bin/readnotes
|
||||
cd ~/Cloud/thesis/ressources/notes/pdfs/ && ls *.pdf | rofi -dmenu -lines 20 | xargs -I {} zathura {}
|
||||
#+end_src
|
||||
@ -921,12 +920,12 @@ Finally, lock the screen using =i3lock=.
|
||||
|
||||
* =pdf2png= - Convert a PDF to PNG
|
||||
#+begin_src bash :tangle ~/.local/bin/pdf2png
|
||||
if [[ -f $1 && $1 == *.pdf ]]; then
|
||||
pdftoppm -png $1 > $(echo $1 | cut -f 1 -d '.' | sed 's/$/.png/')
|
||||
if [[ -f "$1" && "$1" == *.pdf ]]; then
|
||||
pdftoppm -png "$1" > "$(echo "$1" | cut -f 1 -d '.' | sed 's/$/.png/')"
|
||||
fi
|
||||
#+end_src
|
||||
* =pdf-shrink= - Pdf Shrink
|
||||
|
||||
* =pdf-shrink= - Pdf Shrink
|
||||
#+begin_src bash :tangle ~/.local/bin/pdf-shrink
|
||||
shrink ()
|
||||
{
|
||||
@ -1021,3 +1020,25 @@ The requirement is to have =pdftk= or =stapler= installed.
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
|
||||
|
||||
* =rofi-calc= - Simple Calculation using Rofi
|
||||
|
||||
#+begin_src bash :tangle ~/.local/bin/rofi-calc
|
||||
rofi -show calc -mode calc -no-show-match -no-sort
|
||||
#+end_src
|
||||
|
||||
* =pass-gen= - Generate Random Alphanumeric Password
|
||||
|
||||
#+begin_src bash :tangle ~/.local/bin/pass-gen
|
||||
num=$(rofi -dmenu -p "Number of caracters")
|
||||
pass=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
|
||||
re='^[0-9]+$'
|
||||
if [[ $num =~ $re ]] ; then
|
||||
pass=${pass:0:$num}
|
||||
fi
|
||||
|
||||
printf "$pass" | xclip -sel clip && \
|
||||
dunstify 'Password' 'Generated'
|
||||
#+end_src
|
||||
|
Loading…
Reference in New Issue
Block a user