Change lock screen script
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user