strom/fish-misc
Archived
1
0
Fork 0
This repository has been archived on 2023-08-27. You can view files and clone it, but cannot push or open issues or pull requests.
fish-misc/functions/screen-open.fish

5 lines
256 B
Fish

# vi:set ft=fish ts=4 sw=4 noet ai:
function screen-open --description "open last screenshot"
xdg-open (find -H "$HOME/Pictures/Screenshot*.png" -maxdepth 1 -type f -exec stat --printf='%Y\0%n\n' -- '{}' + | sort -nr | awk -F"\0" 'NR==1 {print $2}')
end