aboutsummaryrefslogtreecommitdiff
path: root/scripts/wallpapermenu
blob: 85ed1d16f5a3e37dbdd1453b7e8ed5821ab97ade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/fish

if test -z $argv[1] 
	echo "Provide a directory"
else
  set dir $argv[1]
	set chosen (
		for file in (find $dir -type f)
			if test -z $IMG; or test $file != $IMG
				echo -en "$file\0icon\x1fthumbnail://$file\n"
			end
		end | rofi -dmenu -p " " -show-icons -theme ~/.config/rofi/wallpapermenu.rasi)

	~/.config/scripts/set_background (echo $chosen)
end