[StumpWM, bin] better screenshot handling
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Lucien Cartier-Tilet 2021-11-22 12:46:06 +01:00
parent 07dd65abf1
commit 424d305932
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
2 changed files with 21 additions and 6 deletions

View File

@ -281,6 +281,21 @@ printf "^f2^f0%s" $UNREAD
:END:
~pinfo~ is a utility that shows system information
** Post scrot script
:PROPERTIES:
:HEADER-ARGS: :shebang "#!/usr/bin/env sh" :tangle ~/.local/bin/post-scrot
:CUSTOM_ID: cli-utilities-Post-scrot-script-88ccl7t01aj0
:END:
It is possible to call a script on the resulting image of a ~scrot~
command. Not only do I want to move them to a specific directory, I
also want to be able to see them in ~sxiv~ in case I want to edit the
image, copy it or simply delete it (sometimes I take screenshots by
accident).
#+begin_src sh
mv "$@" ~/Pictures/Screenshots/
sxiv -abfs f "$HOME/Pictures/Screenshots/$*"
#+end_src
** sshbind
:PROPERTIES:
:HEADER-ARGS: :shebang "#!/usr/bin/env fish" :mkdirp yes :tangle ~/.local/bin/sshbind

View File

@ -1259,12 +1259,12 @@ Heres the equivalent in Common Lisp.
Lets also create a keymap for screenshots.
#+name: screenshot-keymap
#+caption: ~*my-screenshot-keymap*~
| Keychord | Function |
|----------+------------------------------------------------------|
| ~d~ | ~exec scrot -d 3 -e 'mv $f ~/Pictures/Screenshots'~ |
| ~s~ | ~exec scrot -e 'mv $f ~/Pictures/Screenshots'~ |
| ~S~ | ~exec scrot -s -e 'mv $f ~/Pictures/Screenshots'~ |
| ~g~ | ~exec scrot -e 'gimp $f; mv $f ~/Pictures/Screenshots'~ |
| Keychord | Function |
|----------+----------------------------------------|
| =d= | =exec scrot -d 3 -e 'post-scrot $f'= |
| =s= | =exec scrot -e 'post-scrot $f'= |
| =S= | =exec scrot -s -e 'post-scrot $f'= |
| =g= | =exec scrot -e 'gimp $f; post-scrot $f'= |
Heres the equivalent in Common Lisp.
#+begin_src lisp