Flake for my NixOS devices
at main 21 lines 481 B view raw
1#!/usr/bin/env nu 2 3let file_path = grimblast --freeze copysave area 4 5if $file_path == "" { 6 exit 1; 7} 8 9let choice = notify-send --app-name=screengrab -i $file_path -t 7500 --action=open=Open --action=edit=Edit --action=delete=Delete "Screenshot taken" $"Screenshot saved to ($file_path) and copied to clipboard" 10 11match $choice { 12 "open" => { 13 xdg-open $file_path 14 } 15 "edit" => { 16 swappy -f $file_path 17 } 18 "delete" => { 19 rm $file_path 20 } 21}