diff options
author | awy <awy@awy.one> | 2024-10-26 23:29:37 +0300 |
---|---|---|
committer | awy <awy@awy.one> | 2024-10-26 23:29:37 +0300 |
commit | a3b00eafceed6ec9a96e06eeb27e0201cbefe3f9 (patch) | |
tree | 420c98625d8f50a6ee45cb76f14ca265ab24aa59 /.local/bin | |
parent | e77ab8c339d83670f6dcbbcb8b6e1e900cb8b33a (diff) |
hyprshot
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/hyprshot | 28 | ||||
-rwxr-xr-x | .local/bin/wayload | 3 |
2 files changed, 31 insertions, 0 deletions
diff --git a/.local/bin/hyprshot b/.local/bin/hyprshot new file mode 100755 index 0000000..f8398a1 --- /dev/null +++ b/.local/bin/hyprshot @@ -0,0 +1,28 @@ +#!/bin/sh + +part() { + geometry="$(slurp)" + sleep "0.5" + grim -g "${geometry}" - | wl-copy +} + +full() { + grim - | wl-copy +} + +rec() { + killall -SIGINT gpu-screen-recorder + homeuser='/home/awy' + availableDisplay=$(hyprctl monitors | grep Monitor | cut -d' ' -f2) + filename=$(date +"%Y-%m-%d %H:%M:%S") + choice="$(printf "$availableDisplay\nExit\n" | rofi -dmenu -l "5")" + [ "${choice}" != "Exit" ] || [ -z "${choice}" ] && + gpu-screen-recorder -w $choice -f 60 -a default_output -a default_input -o "$homeuser/$filename.mp4" + +} + +case $1 in + 1) part ;; + 2) full ;; + 3) rec ;; +esac diff --git a/.local/bin/wayload b/.local/bin/wayload new file mode 100755 index 0000000..0301b76 --- /dev/null +++ b/.local/bin/wayload @@ -0,0 +1,3 @@ +#!/bin/sh +killall waybar +hyprctl dispatch exec waybar |