From efc91797d6b8d0df89afc9385b9466491c06fe1f Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Sat, 22 Jun 2019 17:33:42 +0200 Subject: [PATCH] Change lock screen script --- dotfiles/scripts.org | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/dotfiles/scripts.org b/dotfiles/scripts.org index a5c8156..a3a92e3 100644 --- a/dotfiles/scripts.org +++ b/dotfiles/scripts.org @@ -22,6 +22,15 @@ - [ ] Does not work well with multiple screen #+begin_src bash + temp_file="/tmp/screen.png" + + scrot $temp_file + convert $temp_file -scale 10% -scale 1000% $temp_file + + i3lock -e -u -n -i $temp_file +#+end_src + +#+begin_src bash :tangle no revert() { xset dpms 0 0 0 } @@ -70,33 +79,6 @@ The requirement is to have =pdftk= installed. fi #+end_src -* Take Screenshot - :PROPERTIES: - :header-args: :tangle ~/scripts/screenshot.sh - :header-args+: :comments both :mkdirp yes - :header-args+: :shebang "#!/usr/bin/env bash" - :END: - -#+begin_src bash - status=$(echo -e "All\nSelection\nCopy\nShadow\nActive" | rofi -i -dmenu) - - name=$(echo -e "screenshot-$(date +"%m-%d-%y_%H-%M-%S")" | rofi -i -dmenu) - - case "$status" in - "All") - maim ~/Pictures/$name.png ;; - "Selection") - maim -s ~/Pictures/$name.png ;; - "Copy") - maim -s | xclip -selection clipboard -t image/png ;; - "Shadow") - maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage ~/Pictures/$name.png ;; - "Active") - maim -i $(xdotool getactivewindow) ~/Pictures/$name.png ;; - esac -#+end_src - -#+RESULTS: * Lock / Exit / Suspend / ... :PROPERTIES: :header-args: :tangle ~/scripts/quit.sh