From 5db825003a86595d170b834315860cdfd8ea7f1b Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Mon, 3 Jul 2023 17:10:06 +0200 Subject: [PATCH] Some updates --- pdf-encrypt | 8 ++++++++ playlist | 2 +- ppdf | 4 ++++ tele | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 pdf-encrypt create mode 100755 ppdf diff --git a/pdf-encrypt b/pdf-encrypt new file mode 100755 index 0000000..74fc806 --- /dev/null +++ b/pdf-encrypt @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +password=$(pass thomas/key/pdf) + +for i in $@; do + echo >&2 "Encrypting $i" + qpdf --encrypt "$password" "$password" 256 -- "$i" --replace-input +done diff --git a/playlist b/playlist index 6dcddad..3ac3891 100755 --- a/playlist +++ b/playlist @@ -11,7 +11,7 @@ play() { ls $1 | sort -R | while read music; do echo Playing $music "($index / $count)" index=$(($index+1)) - mplayer "$1/$music" < /dev/tty > /dev/null 2>&1 + mpv "$1/$music" if [ $? -ne 0 ]; then return 1 fi diff --git a/ppdf b/ppdf new file mode 100755 index 0000000..1006980 --- /dev/null +++ b/ppdf @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +pass thomas/key/pdf | tr -d '\n' | xclip -selection c +evince $@ diff --git a/tele b/tele index cb65027..5f07704 100755 --- a/tele +++ b/tele @@ -1,2 +1,2 @@ #!/usr/bin/env bash -xrandr --output eDP-1 --off --output HDMI-1 --mode 1280x720 +xrandr --output DP-0 --off --output HDMI-0 --mode 1280x720 --primary