Change lock screen script
This commit is contained in:
parent
048a76b863
commit
efc91797d6
@ -22,6 +22,15 @@
|
|||||||
- [ ] Does not work well with multiple screen
|
- [ ] Does not work well with multiple screen
|
||||||
|
|
||||||
#+begin_src bash
|
#+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() {
|
revert() {
|
||||||
xset dpms 0 0 0
|
xset dpms 0 0 0
|
||||||
}
|
}
|
||||||
@ -70,33 +79,6 @@ The requirement is to have =pdftk= installed.
|
|||||||
fi
|
fi
|
||||||
#+end_src
|
#+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 / ...
|
* Lock / Exit / Suspend / ...
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/scripts/quit.sh
|
:header-args: :tangle ~/scripts/quit.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user