mirror of
https://github.com/nwg-piotr/nwg-shell.git
synced 2024-10-27 01:01:39 +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 = , Print, exec, screenshot fullscreen # full screen
|
||||||
bind = CONTROL, Print, exec, screenshot display # focused display
|
bind = CONTROL, Print, exec, screenshot display # focused display
|
||||||
bind = $mainMod SHIFT+CONTROL, Print, exec, screenshot focused # focused window
|
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
|
# bind = SHIFT+CONTROL, Print, exec, screenshot region # or selected region w/o swappy
|
||||||
|
|
||||||
# MOVE FOCUS with mainMod + arrow keys
|
# 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
|
# screenshot
|
||||||
bindsym Print exec screenshot fullscreen
|
bindsym Print exec screenshot fullscreen
|
||||||
bindsym Control+Print exec screenshot display
|
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
|
bindsym $Mod+Shift+Control+Print exec screenshot focused
|
||||||
|
|
||||||
# audio
|
# audio
|
||||||
|
@ -24,7 +24,7 @@ CHOICE=$1
|
|||||||
|
|
||||||
# Since the script errors out when a $CHOICE isn't supplied
|
# Since the script errors out when a $CHOICE isn't supplied
|
||||||
if [[ -z "$CHOICE" ]]; then
|
if [[ -z "$CHOICE" ]]; then
|
||||||
echo "Usage: $0 [fullscreen|region|focused|display]"
|
echo "Usage: $0 [fullscreen|region|focused|display|swappy]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -40,6 +40,7 @@ if [[ -n "$SWAY" ]]; then
|
|||||||
region) grim -g "$(slurp)" "$FILENAME" ;;
|
region) grim -g "$(slurp)" "$FILENAME" ;;
|
||||||
focused) grim -g "$FOCUSED" "$FILENAME" ;;
|
focused) grim -g "$FOCUSED" "$FILENAME" ;;
|
||||||
display) grim -o "$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')" "$FILENAME" ;;
|
display) grim -o "$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')" "$FILENAME" ;;
|
||||||
|
swappy) grim -g "$(slurp)" - | swappy -f - ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -51,8 +52,11 @@ if [[ -n "$HYPR" ]]; then
|
|||||||
region) grim -g "$(slurp)" "$FILENAME" ;;
|
region) grim -g "$(slurp)" "$FILENAME" ;;
|
||||||
focused) grim -g "$FOCUSED" "$FILENAME" ;;
|
focused) grim -g "$FOCUSED" "$FILENAME" ;;
|
||||||
display) grim -o "$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')" "$FILENAME" ;;
|
display) grim -o "$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')" "$FILENAME" ;;
|
||||||
|
swappy) grim -g "$(slurp)" - | swappy -f - ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wl-copy < "$FILENAME"
|
if [ "$CHOICE" != "swappy" ]; then
|
||||||
notify-send "Screenshot" "File saved as <i>'$FILENAME'</i> and copied to the clipboard." -i "$FILENAME"
|
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