From 7d010f25de6eb237432aeec60797fad61b327a2e Mon Sep 17 00:00:00 2001 From: Luna Date: Tue, 1 Apr 2025 03:42:22 +0200 Subject: [PATCH] Seperate screenshot --- .config/hypr/keybinds.conf | 1 + Scripts/screenshot-swappy.sh | 10 ++++++++++ Scripts/screenshot.sh | 18 +++--------------- 3 files changed, 14 insertions(+), 15 deletions(-) create mode 100755 Scripts/screenshot-swappy.sh diff --git a/.config/hypr/keybinds.conf b/.config/hypr/keybinds.conf index ac57a97..ead2200 100644 --- a/.config/hypr/keybinds.conf +++ b/.config/hypr/keybinds.conf @@ -1,6 +1,7 @@ # See https://wiki.hyprland.org/Configuring/Keywords/ bind = , Print, exec, ~/Scripts/screenshot.sh +bind = SHIFT, Print, exec, ~/Scripts/screenshot-swappy.sh # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mod, return, exec, $terminal diff --git a/Scripts/screenshot-swappy.sh b/Scripts/screenshot-swappy.sh new file mode 100755 index 0000000..52be271 --- /dev/null +++ b/Scripts/screenshot-swappy.sh @@ -0,0 +1,10 @@ +screenshotName="$(date +%Y%m%d_%H%m%s)" +screenshotDir="$HOME/myHome/Pictures/Screenshots" + +hyprctl keyword animation "fadeOut, 0, 0, default" + +grimblast --freeze save area "${screenshotDir}/$screenshotName.png" + +swappy -f "${screenshotDir}/$screenshotName.png" -o "${screenshotDir}/$screenshotName-Swappy.png" + +hyprctl keyword animation "fadeOut, 1, 4, default" \ No newline at end of file diff --git a/Scripts/screenshot.sh b/Scripts/screenshot.sh index 2b60ba8..1753a7e 100755 --- a/Scripts/screenshot.sh +++ b/Scripts/screenshot.sh @@ -1,20 +1,8 @@ screenshotName="$(date +%Y%m%d_%H%m%s)" screenshotDir="$HOME/myHome/Pictures/Screenshots" - + hyprctl keyword animation "fadeOut, 0, 0, default" -grimblast --freeze save area "${screenshotDir}/$screenshotName.png" +grimblast --freeze copysave area "${screenshotDir}/$screenshotName.png" -swappy -f "${screenshotDir}/$screenshotName.png" -o "${screenshotDir}/$screenshotName-Swappy.png" - -hyprctl keyword animation "fadeOut, 1, 4, default" - - -# WITHOUT SWAPPY -# screenshotName="$(date +%Y%m%d_%H%m%s)" - -# hyprctl keyword animation "fadeOut, 0, 0, default" - -# grimblast --freeze copysave area "${screenshotDir}/$screenshotName.png" - -# hyprctl keyword animation "fadeOut, 1, 4, default" \ No newline at end of file +hyprctl keyword animation "fadeOut, 1, 4, default" \ No newline at end of file