diff options
| author | spl3g <spleefer6@yandex.ru> | 2024-04-20 20:19:52 +0300 |
|---|---|---|
| committer | spl3g <spleefer6@yandex.ru> | 2025-05-01 14:56:39 +0300 |
| commit | ec0e9896dcc0c88ef49d2b2bf8126498d3c2acec (patch) | |
| tree | 4c5663196f4db68d371d2dbeba86c0e801d69044 /home-manager/laptop/hyprland/scripts/hshot | |
| parent | bdb5ed429a6ee54fea4e32181b89e301a5e6b96e (diff) | |
delete old hm configuration
Diffstat (limited to 'home-manager/laptop/hyprland/scripts/hshot')
| -rwxr-xr-x | home-manager/laptop/hyprland/scripts/hshot | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/home-manager/laptop/hyprland/scripts/hshot b/home-manager/laptop/hyprland/scripts/hshot deleted file mode 100755 index 0d02b9c..0000000 --- a/home-manager/laptop/hyprland/scripts/hshot +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -declare -a cmd - -usage() { - echo -e "-m | monitor\n-s | slurp\n-w | active window\n-c | add copy" -} - -monitor() { - cmd=("grim -o \"\$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')\"") -} - -slurp() { - cmd=("grim -g \"\$(slurp)\"") -} - -window() { - cmd=("grim -g \"\$(hyprctl activewindow -j | jq -j '\"\(.at | .[0]),\(.at | .[1]) \(.size | .[0])x\(.size | .[1])\"')\"") -} - -copy() { - if [[ -n ${cmd[0]} ]]; then - cmd+=("- | wl-copy") - else - usage - fi -} - -while getopts ":mswc" opt; do - case ${opt} in - m) monitor;; - s) slurp;; - w) window;; - c) copy;; - *) usage - exit 1;; - esac -done - -if [[ -z $1 ]]; then - usage - exit 1 -fi - -bash -c "${cmd[*]}" |
