refactor(repo): most of these scripts are outdated, refactored desec
All checks were successful
/ test (push) Successful in 23s
All checks were successful
/ test (push) Successful in 23s
This commit is contained in:
parent
5b03adaaa9
commit
6682679493
18 changed files with 154 additions and 133 deletions
41
archived/screenshot
Executable file
41
archived/screenshot
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Variables
|
||||
declare -r time=$(date --iso-8601=seconds)
|
||||
|
||||
while (($# > 0)); do
|
||||
case $1 in
|
||||
-s)
|
||||
REGION=yes
|
||||
shift
|
||||
;;
|
||||
|
||||
-c)
|
||||
CURSOR=yes
|
||||
shift
|
||||
;;
|
||||
|
||||
*)
|
||||
if [ -z "$FILENAME" ]; then
|
||||
FILENAME="$1/$time.png"
|
||||
shift
|
||||
else
|
||||
echo "wrong format"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
OPTS=()
|
||||
if [ -n "$REGION" ]; then
|
||||
OPTS+=("-g $(slurp)")
|
||||
|
||||
if [ -n "$CURSOR" ]; then
|
||||
OPTS+=("-c")
|
||||
fi
|
||||
fi
|
||||
|
||||
grim "${OPTS[@]}" "$FILENAME"
|
||||
# https://github.com/bugaevc/wl-clipboard/issues/198 lifesaver
|
||||
wl-copy --type image/png <"$FILENAME"
|
||||
Loading…
Add table
Add a link
Reference in a new issue