Restore Hyprshot screenshot notifications
This commit is contained in:
parent
0251764327
commit
6ee092433c
1 changed files with 4 additions and 3 deletions
|
|
@ -84,7 +84,10 @@ in
|
|||
dir="''${XDG_RUNTIME_DIR:?}/loupe-screenshots"
|
||||
${pkgs.coreutils}/bin/mkdir -m 700 -p "$dir"
|
||||
name="$(${pkgs.coreutils}/bin/date +%Y%m%d-%H%M%S-%N).png"
|
||||
${pkgs.hyprshot}/bin/hyprshot -m "$1" -o "$dir" -f "$name" --silent
|
||||
# Keep Hyprshot's own notification: Quickshell already handled it when
|
||||
# screenshots were clipboard-only, and its icon carries this file path
|
||||
# for the Loupe click handler below.
|
||||
${pkgs.hyprshot}/bin/hyprshot -m "$1" -o "$dir" -f "$name"
|
||||
[ -s "$dir/$name" ] || exit 0
|
||||
|
||||
# Quickshell retains at most 30 notifications. Keep the same number of
|
||||
|
|
@ -93,8 +96,6 @@ in
|
|||
| ${pkgs.coreutils}/bin/sort \
|
||||
| ${pkgs.coreutils}/bin/head -n -30 \
|
||||
| while IFS= read -r old; do ${pkgs.coreutils}/bin/rm -- "$dir/$old"; done
|
||||
${pkgs.libnotify}/bin/notify-send -a Hyprshot -i "$dir/$name" \
|
||||
'Screenshot copied' 'Click to annotate in Loupe. Saved temporarily until logout.'
|
||||
'';
|
||||
in {
|
||||
# Stylix's Hyprland target injects settings.{general,decoration,group,misc}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue