diff --git a/bin/screenshot_public.sh b/bin/screenshot_public.sh index 9b4cd08..aff13f2 100755 --- a/bin/screenshot_public.sh +++ b/bin/screenshot_public.sh @@ -2,14 +2,17 @@ set -e # 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/" fileurl="$webpath$myfile" - -grim -g "$(slurp)" "$HOME/public/s/$myfile" # copy-paste 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 ~ rsync -LavP --cvs-exclude public pub.yori.cc: +notify-send -t 3000 "saved $fileurl" diff --git a/home-manager/desktop.nix b/home-manager/desktop.nix index 935e42f..19ef8e8 100644 --- a/home-manager/desktop.nix +++ b/home-manager/desktop.nix @@ -197,6 +197,7 @@ in { playerctl vanilla-dmz + libwebp gebaar-libinput grim element-desktop-wayland @@ -205,6 +206,7 @@ in { obs-wlrobs fixed_slack slurp + sway-contrib.grimshot swaybg swayidle swaylock