mirror of
https://github.com/nwg-piotr/nwg-shell.git
synced 2024-10-26 16:52:53 +03:00
add screenshot swappy argument
This commit is contained in:
parent
89e3af0b9b
commit
da27b893d2
@ -124,7 +124,7 @@ bind = $mainMod, D, layoutmsg, cyclenext # (master)
|
||||
bind = , Print, exec, screenshot fullscreen # full screen
|
||||
bind = CONTROL, Print, exec, screenshot display # focused display
|
||||
bind = $mainMod SHIFT+CONTROL, Print, exec, screenshot focused # focused window
|
||||
bind = SHIFT+CONTROL, Print, exec, grim -g "$(slurp)" - | swappy -f - # selected region -> swappy
|
||||
bind = SHIFT+CONTROL, Print, exec, screenshot swappy # selected region -> swappy
|
||||
# bind = SHIFT+CONTROL, Print, exec, screenshot region # or selected region w/o swappy
|
||||
|
||||
# MOVE FOCUS with mainMod + arrow keys
|
||||
|
@ -80,7 +80,7 @@ bindsym $Mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut.
|
||||
# screenshot
|
||||
bindsym Print exec screenshot fullscreen
|
||||
bindsym Control+Print exec screenshot display
|
||||
bindsym Shift+Control+Print exec grim -g "$(slurp)" - | swappy -f -
|
||||
bindsym Shift+Control+Print exec screenshot swappy
|
||||
bindsym $Mod+Shift+Control+Print exec screenshot focused
|
||||
|
||||
# audio
|
||||
|
@ -24,7 +24,7 @@ CHOICE=$1
|
||||
|
||||
# Since the script errors out when a $CHOICE isn't supplied
|
||||
if [[ -z "$CHOICE" ]]; then
|
||||
echo "Usage: $0 [fullscreen|region|focused|display]"
|
||||
echo "Usage: $0 [fullscreen|region|focused|display|swappy]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -40,6 +40,7 @@ if [[ -n "$SWAY" ]]; then
|
||||
region) grim -g "$(slurp)" "$FILENAME" ;;
|
||||
focused) grim -g "$FOCUSED" "$FILENAME" ;;
|
||||
display) grim -o "$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')" "$FILENAME" ;;
|
||||
swappy) grim -g "$(slurp)" - | swappy -f - ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@ -51,8 +52,11 @@ if [[ -n "$HYPR" ]]; then
|
||||
region) grim -g "$(slurp)" "$FILENAME" ;;
|
||||
focused) grim -g "$FOCUSED" "$FILENAME" ;;
|
||||
display) grim -o "$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')" "$FILENAME" ;;
|
||||
swappy) grim -g "$(slurp)" - | swappy -f - ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
wl-copy < "$FILENAME"
|
||||
notify-send "Screenshot" "File saved as <i>'$FILENAME'</i> and copied to the clipboard." -i "$FILENAME"
|
||||
if [ "$CHOICE" != "swappy" ]; then
|
||||
wl-copy < "$FILENAME"
|
||||
notify-send "Screenshot" "File saved as <i>'$FILENAME'</i> and copied to the clipboard." -i "$FILENAME"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user