From 40908e3306df64938854b623ddd41bfac751286a Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Tue, 25 Jul 2017 17:19:37 +0300 Subject: [PATCH] Separate wallpaper for each screen. --- autostart.lua | 2 +- rc.lua | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/autostart.lua b/autostart.lua index 08a8879..3aa04e2 100644 --- a/autostart.lua +++ b/autostart.lua @@ -1,6 +1,6 @@ os.execute ("setxkbmap -layout 'us,ru'") os.execute ("setxkbmap -option 'grp:shift_toggle,grp_led:scroll,terminate:ctrl_alt_bksp'") -os.execute (os.getenv("HOME").."/.config/awesome/set_wall.sh "..os.getenv("HOME").."/.config/awesome/wallpaper.slink &") +--os.execute (os.getenv("HOME").."/.config/awesome/set_wall.sh "..os.getenv("HOME").."/.config/awesome/wallpaper.slink &") os.execute ("pgrep xscreensaver || xscreensaver -no-splash &") os.execute ("pgrep mail_loop.sh || "..os.getenv("HOME").."/.config/awesome/mail_loop.sh &") os.execute ("pgrep wicd-client || wicd-gtk --tray &") diff --git a/rc.lua b/rc.lua index 8bb669a..cf139f3 100644 --- a/rc.lua +++ b/rc.lua @@ -373,8 +373,8 @@ local tasklist_buttons = gears.table.join( awful.client.focus.byidx(1) end)) ---local function set_wallpaper(s) --- -- Wallpaper +local function set_wallpaper(s) + -- Wallpaper -- if beautiful.wallpaper then -- local wallpaper = beautiful.wallpaper -- -- If wallpaper is a function, call it with the screen @@ -383,14 +383,15 @@ local tasklist_buttons = gears.table.join( -- end -- gears.wallpaper.maximized(wallpaper, s, true) -- end ---end + gears.wallpaper.maximized(cfgpath.."/wallpaper"..s.index..".slink", s, true) +end -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) ---screen.connect_signal("property::geometry", set_wallpaper) +screen.connect_signal("property::geometry", set_wallpaper) awful.screen.connect_for_each_screen(function(s) -- Wallpaper - -- set_wallpaper(s) + set_wallpaper(s) -- Each screen has its own tag table. awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-" }, s, awful.layout.layouts[4])