~skiqqy/bin

988bf9813df7e2700a7040872ae2abe0efcbc4f3 — Stephen Cochrane 2 months ago b2c7ab1
dcd can now set wallpapers as well using setwp
1 files changed, 13 insertions(+), 2 deletions(-)

M dcd
M dcd => dcd +13 -2
@@ 40,7 40,13 @@ gui()
	then
		st
	else
		sxiv -t "$dir"
		local img
		img=$(sxiv -to "$dir" | head -1)

		if "$setwp" && [ -n "$img" ]
		then
			setwp "$img"
		fi
	fi
}



@@ 48,7 54,8 @@ main()
{
	term=true
	persist=false
	while getopts hip opt
	setwp=false
	while getopts 'hisp' opt
	do
		case "$opt" in
			h)


@@ 57,6 64,7 @@ main()
				printf -- 'Options\n'
				printf -- '-h\t\tShows This Message\n'
				printf -- '-i\t\tOpen the directory using sxiv (Browse the images in selected directory).\n'
				printf -- '-s\t\tSet the marked image as the wallpaper upon closing dcd, needs -i\n'
				printf -- '-p\t\tPersist, ie use dcd as a full blown directory browser.\n\n'
				printf -- 'Written by Skiqqy\n'
				exit 0


@@ 64,6 72,9 @@ main()
			i)
				term=false
				;;
			s)
				setwp=true
				;;
			p)
				persist=true
				;;