From e92f6a31d4c53a83f82e1b31bdaa2933cf18f697 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 20 Apr 2023 17:51:28 +0200 Subject: added screenshot script --- config/hyprland/hypr/screenshot.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 config/hyprland/hypr/screenshot.sh (limited to 'config/hyprland/hypr/screenshot.sh') diff --git a/config/hyprland/hypr/screenshot.sh b/config/hyprland/hypr/screenshot.sh new file mode 100755 index 0000000..533ca98 --- /dev/null +++ b/config/hyprland/hypr/screenshot.sh @@ -0,0 +1,21 @@ +case $1 in + "-m") + actwin="$(hyprctl activewindow -j | jq -r '.monitor')" + actmon="$(hyprctl monitors -j | + jq -r ".[] | select(.id == $actwin)" | + jq -r '.name')" + grim -o "$actmon" $HOME/pics/screenshots/"$(date +%y%m%d_%H_%M_%S.png)" + ;; + "-f") + grim $HOME/pics/screenshots/"$(date +%y%m%d_%H_%M_%S.png)" + ;; + "-s") + grim -g "$(slurp)" $HOME/pics/screenshots/"$(date +%y%m%d_%H_%M_%S.png)" + ;; + "-sc") + grim -g "$(slurp)" - | wl-copy + ;; + *) + exit + ;; +esac -- cgit v1.2.3