Browse Source

Set specific wallpaper instead of random one.

awesome-3.5
Kolan Sh 6 years ago
parent
commit
4ee66e7511
3 changed files with 10 additions and 3 deletions
  1. +1
    -1
      autostart.lua
  2. +7
    -1
      set_wall.sh
  3. +2
    -1
      wallpaper.lua

+ 1
- 1
autostart.lua View File

@@ -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")

+ 7
- 1
set_wall.sh View File

@@ -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

+ 2
- 1
wallpaper.lua View File

@@ -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" }

Loading…
Cancel
Save