aboutsummaryrefslogtreecommitdiff
path: root/laptop/.config/hypr/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'laptop/.config/hypr/scripts')
-rwxr-xr-xlaptop/.config/hypr/scripts/capture-window.sh10
-rwxr-xr-xlaptop/.config/hypr/scripts/current-brightness.sh4
2 files changed, 14 insertions, 0 deletions
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}