From c6ff7b4d2c91fbc086e573e01f76da3dc3ef3ed3 Mon Sep 17 00:00:00 2001 From: Mosder Date: Sun, 2 Nov 2025 20:14:11 +0100 Subject: ✨ feat(hypr): integrate swayosd, add scripts and update keybindings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- laptop/.config/hypr/scripts/capture-window.sh | 10 ++++++++++ laptop/.config/hypr/scripts/current-brightness.sh | 4 ++++ 2 files changed, 14 insertions(+) create mode 100755 laptop/.config/hypr/scripts/capture-window.sh create mode 100755 laptop/.config/hypr/scripts/current-brightness.sh (limited to 'laptop/.config/hypr/scripts') diff --git a/laptop/.config/hypr/scripts/capture-window.sh b/laptop/.config/hypr/scripts/capture-window.sh new file mode 100755 index 0000000..2299cb0 --- /dev/null +++ b/laptop/.config/hypr/scripts/capture-window.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# get size and offset of active window +size=$(hyprctl activewindow | grep size: | awk -F" " '{print $2}') +size=${size/,/x} +offset=$(hyprctl activewindow | grep at: | awk -F" " '{print $2}') +offset=${offset/,/+} + +# open gui with selected region +flameshot gui --region $size+$offset diff --git a/laptop/.config/hypr/scripts/current-brightness.sh b/laptop/.config/hypr/scripts/current-brightness.sh new file mode 100755 index 0000000..4856e59 --- /dev/null +++ b/laptop/.config/hypr/scripts/current-brightness.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +s=$(brightnessctl | grep % | awk -F" " '{print $4}') +echo ${s:1:-2} -- cgit v1.2.3