diff options
| author | delta <darkussdelta@gmail.com> | 2023-03-04 22:04:55 +0100 |
|---|---|---|
| committer | delta <darkussdelta@gmail.com> | 2023-03-04 22:18:21 +0100 |
| commit | f0b32f45746c026d402651013b7e98315d6956a1 (patch) | |
| tree | f42609e98522da081cebdd21a674a702d1054bbc /.config/awesome/scripts | |
| parent | a0f8b5fa6acdd1c2477fb1881dd9067956bf0ae6 (diff) | |
restructure awesome config, add fresnel
Diffstat (limited to '.config/awesome/scripts')
| -rwxr-xr-x | .config/awesome/scripts/maimtake | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.config/awesome/scripts/maimtake b/.config/awesome/scripts/maimtake new file mode 100755 index 0000000..4b7f9e3 --- /dev/null +++ b/.config/awesome/scripts/maimtake @@ -0,0 +1,26 @@ +#!/bin/sh + +date=$(date +%Y%m%d_%H%M%S) +path=~/Pictures/Screenshot_$date.png +rootid=$(xwininfo -root -int | grep -iPo --color=never "(?<=id:\s)[0-9]*?\s") + +if [[ $1 -eq 1 ]] +then + # fullscreen + maim $path && xclip -selection clipboard -t image/png $path + notify-send -a "Maim" "Screenshot taken" "Saved at $path" +elif [[ $1 -eq 2 ]] +then + # region + maim -s $path && xclip -selection clipboard -t image/png $path + if [[ $? -eq 0 ]] + then + notify-send -a "Maim" "Screenshot taken" "Saved at $path" + fi +elif [[ $1 -eq 3 ]] +then + # current window + maim -i $(xdotool getactivewindow) $path && xclip -selection clipboard -t image/png $path +fi + + |
