updated screenshot scripts

This commit is contained in:
Niklas Kapelle 2023-10-18 00:37:29 +02:00
parent 12cd2e2fba
commit d236dcc8c7
Signed by: niklas
GPG Key ID: 4EB651B36D841D16
3 changed files with 10 additions and 13 deletions

View File

@ -1,19 +1,17 @@
#!/usr/bin/env sh
# required packages:
# - feh
set -e
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
[ -z "$@" ] && exit 0
[ -z "$1" ] && exit 0
LAST_BG_LOCATION="$XDG_CACHE_HOME/last-bg"
feh --no-fehbg --bg-fill $@
echo "$(realpath $1)" > $LAST_BG_LOCATION
rm -f "$LAST_BG_LOCATION"
ln -s $1 $(realpath "$LAST_BG_LOCATION")
hyprctl hyprpaper preload "$1"
hyprctl hyprpaper wallpaper "HDMI-A-1,$1"
hyprctl hyprpaper unload all
$SCRIPTPATH/set-color.sh

View File

@ -1,6 +1,4 @@
#!/usr/bin/env sh
# required packages:
# - xclicp
set -e
@ -8,9 +6,8 @@ SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
$SCRIPTPATH/take-selected-screenshot.sh \
| $SCRIPTPATH/nc-share-file.sh \
| awk '{print $1"/preview"}' \
| xclip -i -selection "clipboard"
| $SCRIPTPATH/upload-image.sh \
| wl-copy
notify-send -u low "Upload complete"

View File

@ -8,7 +8,9 @@ set -e
TMPDIR=$(mktemp -d)
deepin-screenshot -n -s "$TMPDIR" 2>/dev/null
cd $TMPDIR
grim -g "$(slurp)"
filename="$(date +"%d-%m-%y-%H-%M-%Z").png"