Skip to content

Commit 983db4f

Browse files
Added a check to see if xclip is installed
1 parent 81c4bdd commit 983db4f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

usr/bin/i3-maim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ if ! [ -d $maim_dir ]; then
1818
fi
1919

2020
if ! [ -z $xclip_cmd ]; then
21-
clip="xclip -selection clipboard -t image/png $maim_dir/$_name.png"
21+
check="pacman -Qs xclip"
22+
if [ -n "$check" ]; then
23+
clip="xclip -selection clipboard -t image/png $maim_dir/$_name.png"
24+
else
25+
clip=""
26+
fi
2227
else
2328
clip=""
2429
fi

0 commit comments

Comments
 (0)