From 066b9256b2f1697db1f85cc529454dbb88bd5b57 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:26:31 +1100 Subject: scheme: new way of tracking centralise the colours so all of them are kept here --- screenshot.fish | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'screenshot.fish') diff --git a/screenshot.fish b/screenshot.fish index bf65b9d..a0f6177 100755 --- a/screenshot.fish +++ b/screenshot.fish @@ -3,21 +3,21 @@ . (dirname (status filename))/util.fish mkdir -p "$CACHE/screenshots" -set tmp_file "$CACHE/screenshots/$(date +'%Y%m%d%H%M%S')" +set -l tmp_file "$CACHE/screenshots/$(date +'%Y%m%d%H%M%S')" grim $argv $tmp_file; and wl-copy < $tmp_file; or exit 1 -set action (notify-send -i 'image-x-generic-symbolic' -h "STRING:image-path:$tmp_file" \ +set -l action (notify-send -i 'image-x-generic-symbolic' -h "STRING:image-path:$tmp_file" \ -a 'caelestia-screenshot' --action='open=Open' --action='save=Save' \ 'Screenshot taken' "Screenshot stored in $tmp_file and copied to clipboard") switch $action case 'open' uwsm app -- swappy -f $tmp_file & disown case 'save' - set save_file (uwsm app -- zenity --file-selection --save --title='Save As') - [ -z $save_file ] && exit 0 - if [ -f $save_file ] + set -l save_file (uwsm app -- zenity --file-selection --save --title='Save As') + test -z $save_file && exit 0 + if test -f $save_file uwsm app -- yad --image='abrt' --title='Warning!' --text-align='center' --buttons-layout='center' --borders=20 \ --text='Are you sure you want to overwrite this file?' || exit 0 end - cp -f $tmp_file $save_file + cp $tmp_file $save_file end -- cgit v1.2.3-freya