diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-02-19 17:26:31 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-02-19 17:26:31 +1100 |
| commit | 066b9256b2f1697db1f85cc529454dbb88bd5b57 (patch) | |
| tree | 37523825b471865d11ff3fb947d209ce29229ccb /screenshot.fish | |
| parent | install: fix discord (diff) | |
| download | caelestia-cli-066b9256b2f1697db1f85cc529454dbb88bd5b57.tar.gz caelestia-cli-066b9256b2f1697db1f85cc529454dbb88bd5b57.tar.bz2 caelestia-cli-066b9256b2f1697db1f85cc529454dbb88bd5b57.zip | |
scheme: new way of tracking
centralise the colours so all of them are kept here
Diffstat (limited to 'screenshot.fish')
| -rwxr-xr-x | screenshot.fish | 12 |
1 files changed, 6 insertions, 6 deletions
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='<span size="x-large">Are you sure you want to overwrite this file?</span>' || exit 0 end - cp -f $tmp_file $save_file + cp $tmp_file $save_file end |