grimshot: all displays option support

This commit is contained in:
Harzo 2023-05-28 19:34:31 +02:00
parent ce6c7ca742
commit aa417e8e40
2 changed files with 15 additions and 2 deletions

View File

@ -26,6 +26,7 @@ bind = $mmod, F, exec, pkill fsearch; fsearch
bind = $smod, D, exec, wofi --show drun bind = $smod, D, exec, wofi --show drun
bind = $smod, X, exec, swaylock bind = $smod, X, exec, swaylock
bind = $smod, S, exec, ~/.scripts/grimshot bind = $smod, S, exec, ~/.scripts/grimshot
bind = , Print, exec, ~/.scripts/grimshot -f
bind = $smod, Escape, exec, ~/.scripts/system/wofi-session bind = $smod, Escape, exec, ~/.scripts/system/wofi-session
bindle = , XF86AudioRaiseVolume, exec, swayosd --output-volume raise bindle = , XF86AudioRaiseVolume, exec, swayosd --output-volume raise
bindle = , XF86AudioLowerVolume, exec, swayosd --output-volume lower bindle = , XF86AudioLowerVolume, exec, swayosd --output-volume lower

View File

@ -1,6 +1,18 @@
#!/bin/sh #!/bin/sh
target=area
case "$1" in
-f|--fullscreen)
target=screen
shift
;;
esac
filename=~/Pictures/Screenshots/Screenshot_"$(date +'%Y%m%d_%H%M%S').png" filename=~/Pictures/Screenshots/Screenshot_"$(date +'%Y%m%d_%H%M%S').png"
grimblast copysave area "$filename" || exit 1
grimblast copysave "$target" "$filename" || exit 1
action="$(dunstify \ action="$(dunstify \
-i "$filename" \ -i "$filename" \
-A "open,OPEN" \ -A "open,OPEN" \