diff --git a/autostart.lua b/autostart.lua index 97c9b17..eff1d56 100644 --- a/autostart.lua +++ b/autostart.lua @@ -8,4 +8,4 @@ os.execute ("pgrep firefox || (firefox || firefox-bin) &") os.execute ("pgrep thunderbird || thunderbird &") os.execute ("pgrep liferea || liferea &") os.execute ("smbnetfs "..os.getenv("HOME").."/smb") -os.execute (os.getenv("HOME").."/.config/awesome/set_wall.sh "..os.getenv("HOME").."/wallpapers/") +os.execute (os.getenv("HOME").."/.config/awesome/set_wall.sh "..os.getenv("HOME").."/.config/awesome/wallpaper.slink") diff --git a/set_wall.sh b/set_wall.sh index bcf5261..eb7e196 100755 --- a/set_wall.sh +++ b/set_wall.sh @@ -1,3 +1,9 @@ #!/bin/sh -feh --bg-scale "$(find $1 | shuf -n1)" +if [ -d $1 ]; then + f="$(find $1 | shuf -n1)" + ln -sf "$f" ~/.config/awesome/wallpaper.slink + feh --bg-scale "$f" +else + feh --bg-scale $1 +fi diff --git a/wallpaper.lua b/wallpaper.lua index 7bbd182..cf26b16 100644 --- a/wallpaper.lua +++ b/wallpaper.lua @@ -1,2 +1,3 @@ -- theme.wallpaper_cmd = { "awsetbg -a "..os.getenv("HOME").."/.config/awesome/wallpaper.png" } -theme.wallpaper_cmd = { os.getenv("HOME").."/.config/awesome/set_wall.sh "..os.getenv("HOME").."/wallpapers/" } +-- theme.wallpaper_cmd = { os.getenv("HOME").."/.config/awesome/set_wall.sh "..os.getenv("HOME").."/wallpapers/" } +theme.wallpaper_cmd = { os.getenv("HOME").."/.config/awesome/set_wall.sh "..os.getenv("HOME").."/.config/awesome/wallpaper.slink" }