arpanetus / i3-maim-clpimg

save the screenshot and immediately copy it into the clipboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change needed to define filename

pan-mroku opened this issue · comments

diff --git a/i3-maim-clpimg b/i3-maim-clpimg
old mode 100644
new mode 100755
index 0089006..0083fec
--- a/i3-maim-clpimg
+++ b/i3-maim-clpimg
@@ -9,6 +9,7 @@ if ! [ -f $_conf ]; then
        echo "maim_dir=$(xdg-user-dir PICTURES)" > $_conf
 fi
 
+filename="$(date +%s).png"
 source $_conf
 
 if ! [ -d $maim_dir ]; then
@@ -21,7 +22,7 @@ else
     cmd='maim'
 fi
 
-save_file="$maim_dir/$(date +%s).png"
+save_file="$maim_dir/$filename"
 
 case "$1" in
        --fullscreen|-f|$NULL)