screenshot: use grimshot + lossy webp
parent
ae0ed1a2f0
commit
9ae7886e24
|
@ -2,14 +2,17 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Setup filename for the screenshot
|
# Setup filename for the screenshot
|
||||||
myfile="$(openssl rand -base64 9)_$(date +%y%m%d%H%M%S).png"
|
myfile="$(openssl rand -base64 9)_$(date +%y%m%d%H%M%S).webp"
|
||||||
|
|
||||||
webpath="https://pub.yori.cc/s/"
|
webpath="https://pub.yori.cc/s/"
|
||||||
fileurl="$webpath$myfile"
|
fileurl="$webpath$myfile"
|
||||||
|
|
||||||
grim -g "$(slurp)" "$HOME/public/s/$myfile"
|
|
||||||
|
|
||||||
# copy-paste
|
# copy-paste
|
||||||
wl-copy <<< "$fileurl"
|
wl-copy <<< "$fileurl"
|
||||||
|
grimshot save window "$HOME/screenshot-tmp.ppm"
|
||||||
|
cwebp -preset picture -q 100 "$HOME/screenshot-tmp.ppm" -o "$HOME/public/s/$myfile"
|
||||||
|
rm "$HOME/screenshot-tmp.ppm"
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
rsync -LavP --cvs-exclude public pub.yori.cc:
|
rsync -LavP --cvs-exclude public pub.yori.cc:
|
||||||
|
notify-send -t 3000 "saved $fileurl"
|
||||||
|
|
|
@ -197,6 +197,7 @@ in {
|
||||||
playerctl
|
playerctl
|
||||||
vanilla-dmz
|
vanilla-dmz
|
||||||
|
|
||||||
|
libwebp
|
||||||
gebaar-libinput
|
gebaar-libinput
|
||||||
grim
|
grim
|
||||||
element-desktop-wayland
|
element-desktop-wayland
|
||||||
|
@ -205,6 +206,7 @@ in {
|
||||||
obs-wlrobs
|
obs-wlrobs
|
||||||
fixed_slack
|
fixed_slack
|
||||||
slurp
|
slurp
|
||||||
|
sway-contrib.grimshot
|
||||||
swaybg
|
swaybg
|
||||||
swayidle
|
swayidle
|
||||||
swaylock
|
swaylock
|
||||||
|
|
Loading…
Reference in New Issue