diff --git a/.config/hypr/conf.d/keybinds.conf b/.config/hypr/conf.d/keybinds.conf index a7ecba5..b9b4394 100644 --- a/.config/hypr/conf.d/keybinds.conf +++ b/.config/hypr/conf.d/keybinds.conf @@ -26,6 +26,7 @@ bind = $mmod, F, exec, pkill fsearch; fsearch bind = $smod, D, exec, wofi --show drun bind = $smod, X, exec, swaylock bind = $smod, S, exec, ~/.scripts/grimshot +bind = , Print, exec, ~/.scripts/grimshot -f bind = $smod, Escape, exec, ~/.scripts/system/wofi-session bindle = , XF86AudioRaiseVolume, exec, swayosd --output-volume raise bindle = , XF86AudioLowerVolume, exec, swayosd --output-volume lower diff --git a/.scripts/grimshot b/.scripts/grimshot index b5fe7cd..4acf813 100755 --- a/.scripts/grimshot +++ b/.scripts/grimshot @@ -1,6 +1,18 @@ #!/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" -grimblast copysave area "$filename" || exit 1 + +grimblast copysave "$target" "$filename" || exit 1 + action="$(dunstify \ -i "$filename" \ -A "open,OPEN" \ @@ -11,5 +23,5 @@ action="$(dunstify \ case "$action" in 2) #click xdg-open "$filename" - ;; + ;; esac