mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 07:51:28 +00:00
Add grimshot / swappy integration tip.
parent
1b8c788de0
commit
a2284c4dcc
57
Tricks.md
57
Tricks.md
|
@ -12,6 +12,63 @@ This works as long as sway can match the PID of a new window to the PID of the e
|
|||
|
||||
bindsym $mod+Shift+Print exec slurp | grim -g - - | curl --form 'file=@-' http://0x0.st | wl-copy && swaynag -m "screenshot uploaded & url copied to clipboard"
|
||||
|
||||
# Take screenshots and open them in annotation tool
|
||||
|
||||
It's super convenient to be able to take a screenshot and pass it to Swappy for possible annotations in one step.
|
||||
Actions in the `.desktop` file feel like a natural place to offer these options.
|
||||
|
||||
Using rofi as a launcher, ".desktop" file actions are findable if the `-drun-show-actions` is passed.
|
||||
|
||||
With these actions, you can snapshot any of the following and have
|
||||
the result opened in swappy:
|
||||
|
||||
- current window
|
||||
- current output
|
||||
- select a window
|
||||
- select an area
|
||||
|
||||
Install this file into `~/.local/share/applications/grimshot-swappy.desktop`:
|
||||
|
||||
```desktop
|
||||
[Desktop Entry]
|
||||
Name=Swappy
|
||||
GenericName=Annotation Tool
|
||||
GenericName[de]=Anmerkungswerkzeug
|
||||
GenericName[fr]="Outil d'annotat"
|
||||
GenericName[pt_BR]=Ferramenta de Anotação
|
||||
Comment=A Wayland native snapshot editing tool
|
||||
Comment[de]=Ein natives Wayland Bildschirmfoto-Bearbeitungswerkzeug
|
||||
Comment[fr]="Un outil d'édition de capture d'écran avec support natif pour Wayland"
|
||||
Comment[pt_BR]=Uma ferramenta de edição de snapshot nativa do Wayland
|
||||
TryExec=swappy
|
||||
Exec=swappy -f %F
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Keywords=wayland;snapshot;annotation;editing;
|
||||
Icon=swappy
|
||||
Categories=Utility;Graphics;Annotation;
|
||||
StartupNotify=true
|
||||
MimeType=image/png;image/jpeg;
|
||||
Actions=current-window;current-output;select-window;select-area;
|
||||
|
||||
[Desktop Action current-window]
|
||||
Name=Current Window
|
||||
Exec=sh -c 'grimshot save active - | swappy -f -'
|
||||
|
||||
[Desktop Action current-output]
|
||||
Name=Current Output
|
||||
Exec=sh -c 'grimshot save output - | swappy -f -'
|
||||
|
||||
[Desktop Action select-window]
|
||||
Name=Select Window
|
||||
Exec=sh -c 'grimshot save window - | swappy -f -'
|
||||
|
||||
[Desktop Action select-area]
|
||||
Name=Select Area
|
||||
Exec=sh -c 'grimshot save area - | swappy -f -'
|
||||
```
|
||||
|
||||
|
||||
# HTML color picker
|
||||
|
||||
Bind this to a key, select a point on the screen and get a HTML color code for that point copied to the clipboard. Requires ImageMagick, `grim` and `slurp` to be installed.
|
||||
|
|
Loading…
Reference in a new issue