multiple screens support, skype should always float
This commit is contained in:
parent
a460fc72cb
commit
b76174a2ac
1 changed files with 17 additions and 4 deletions
21
rc.lua
21
rc.lua
|
@ -33,6 +33,13 @@ function enters(element, table)
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- update wallpapers, useful when attaching screens
|
||||||
|
function update_wallpapers(wallpaper)
|
||||||
|
for s = 1, screen.count() do
|
||||||
|
gears.wallpaper.centered(wallpaper, s)
|
||||||
|
end
|
||||||
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
-- {{{ Error handling
|
-- {{{ Error handling
|
||||||
-- Check if awesome encountered an error during startup and fell back to
|
-- Check if awesome encountered an error during startup and fell back to
|
||||||
|
@ -131,9 +138,7 @@ local layouts = {
|
||||||
-- }}}
|
-- }}}
|
||||||
-- {{{ Wallpaper
|
-- {{{ Wallpaper
|
||||||
if beautiful.wallpaper then
|
if beautiful.wallpaper then
|
||||||
for s = 1, screen.count() do
|
update_wallpapers(beautiful.wallpaper)
|
||||||
gears.wallpaper.centered(beautiful.wallpaper, s)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
-- {{{ Tags
|
-- {{{ Tags
|
||||||
|
@ -150,11 +155,13 @@ end
|
||||||
-- [9] = 'example2'
|
-- [9] = 'example2'
|
||||||
--}
|
--}
|
||||||
tags[1].layout = {
|
tags[1].layout = {
|
||||||
|
[1] = layouts.max[1]
|
||||||
[4] = layouts.float[1]
|
[4] = layouts.float[1]
|
||||||
}
|
}
|
||||||
-- screens 2+
|
-- screens 2+
|
||||||
if screen.count() >= 2 then
|
if screen.count() >= 2 then
|
||||||
tags[2].layout = {
|
tags[2].layout = {
|
||||||
|
[1] = layouts.max[1]
|
||||||
[4] = layouts.float[1]
|
[4] = layouts.float[1]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -191,13 +198,18 @@ end
|
||||||
mymainmenu_restart = {
|
mymainmenu_restart = {
|
||||||
{ 'restart', awesome.restart }
|
{ 'restart', awesome.restart }
|
||||||
}
|
}
|
||||||
|
mymainmenu_screens = {
|
||||||
|
{ 'one', function() awful.util.spawn('xrandr --output DP1 --off') update_wallpapers(beautiful.wallpaper) end },
|
||||||
|
{ 'two', function() awful.util.spawn('xrandr --output DP1 --primary --auto --output eDP1 --auto --right-of DP1') update_wallpapers(beautiful.wallpaper) end }
|
||||||
|
}
|
||||||
--mymainmenu_quit = {
|
--mymainmenu_quit = {
|
||||||
-- { 'quit', awesome.quit }
|
-- { 'quit', awesome.quit }
|
||||||
--}
|
--}
|
||||||
|
|
||||||
mymainmenu = awful.menu({
|
mymainmenu = awful.menu({
|
||||||
items = {
|
items = {
|
||||||
{ 'restart', mymainmenu_restart, beautiful.awesome_icon }
|
{ 'restart', mymainmenu_restart, beautiful.awesome_icon },
|
||||||
|
{ 'screens', mymainmenu_screens, beautiful.awesome_icon }
|
||||||
-- { 'quit', mymainmenu_quit, beautiful.awesome_icon }
|
-- { 'quit', mymainmenu_quit, beautiful.awesome_icon }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -587,6 +599,7 @@ awful.rules.rules = {
|
||||||
'Pavucontrol',
|
'Pavucontrol',
|
||||||
'pinentry',
|
'pinentry',
|
||||||
'plugin-container',
|
'plugin-container',
|
||||||
|
'Skype',
|
||||||
'Vncviewer'
|
'Vncviewer'
|
||||||
},
|
},
|
||||||
instance = {
|
instance = {
|
||||||
|
|
Loading…
Reference in a new issue