more awesome 4.0 fixes

This commit is contained in:
crater2150 2017-02-16 09:51:01 +01:00
parent a43b908350
commit 7738e9ad32
5 changed files with 40 additions and 15 deletions

View file

@ -4,20 +4,22 @@ local awful = require("awful")
beautiful.init(awful.util.getdir("config") .. "/theme.lua")
local wallpaperrc = awful.util.getdir("config") .. "/wallpaperrc"
local wallpaperrc = awful.util.getdir("config") .. "/wallpaperrc.lua"
local f=io.open(wallpaperrc,"r")
if f~=nil then
io.close(f)
require("wallpaperrc")
for s in screen do
set_wallpaper(s)
end
screen.connect_signal("property::geometry", set_wallpaper)
else if beautiful.wallpaper then
f = io.open(beautiful.wallpaper)
if f ~= nil then
io.close(f)
screen.connect_signal("property::geometry", function(s)
gears.wallpaper.maximized(beautiful.wallpaper, s, true)
end)
end
elseif beautiful.wallpaper then
f = io.open(beautiful.wallpaper)
if f ~= nil then
io.close(f)
screen.connect_signal("property::geometry", function(s)
gears.wallpaper.maximized(beautiful.wallpaper, s, true)
end)
end
end

3
rc.lua
View file

@ -1,7 +1,6 @@
-- libraries {{{
local awful = require("awful")
require("awful.autofocus")
--require("autobeautiful")
beautiful = require("autobeautiful")
naughty = require("naughty")
conf = require("localconf")
@ -24,7 +23,7 @@ tags.setup()
-- {{{ widgets
widgets = require("widgets")
for s = 1, screen.count() do
for s in screen do
local ltop = widgets.container(s, "left", "top")
local rtop = widgets.container(s, "right", "top")
local lbottom = widgets.container(s, "left", "bottom")

View file

@ -38,6 +38,9 @@ awful.rules.rules = {
if (c["class"] ~= nil) then
print("class: " .. c["class"])
end
if (c["type"] ~= nil) then
print("type: " .. c["type"])
end
end
},
{
@ -81,7 +84,22 @@ awful.rules.rules = {
{
rule = { class = "Eclipse" },
properties = {
float = false
screen = 1, tag = "8",
floating = false
}
},
{
rule = { class = "Eclipse", name = nil, type = "dialog" },
properties = {
screen = 2, tag = "8",
floating = false
}
},
{
rule = { class = "Eclipse", name = ".*", type = "dialog" },
properties = {
screen = 1, tag = "8",
floating = false
}
},
{

View file

@ -207,7 +207,12 @@ awful.key({ modkey, }, "n", function (c) c.minimized = not c.mini
awful.key({ modkey, }, "b", function (c) c.border_width = c.border_width > 0 and 0 or beautiful.border_width end),
awful.key({ modkey, }, "Up", function(c) client_opacity_set(c, 1, 1, 0.1) end),
awful.key({ modkey, }, "Down", function(c) client_opacity_set(c, 1, 0, -0.1) end),
awful.key({ }, "XF86Calculater", awful.client.movetoscreen )
awful.key({ }, "XF86Calculater", awful.client.movetoscreen ),
awful.key({ modkey }, "i", function(c)
require("naughty").notify({ text =
string.format("name: %s\nclass: %s\ntype: %s", c["name"], c["class"], c["type"])
})
end)
)
local clientbuttons = awful.util.table.join(

View file

@ -1,5 +1,6 @@
local wibox = require("wibox")
local vicious = require("vicious")
local naughty = require("naughty")
local modkey = conf.modkey or "Mod4"
local awful = require("awful")
local tag = require("awful.tag")
@ -30,7 +31,7 @@ awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
-- setup {{{
--------------------------------------------------------------------------------
local function setup()
for s = 1, screen.count() do
for s in screen do
wlist[s]={}
bars[s]={}
@ -97,7 +98,7 @@ end
-- force update of a widget
local function update(widgetname, index)
for s = 1, screen.count() do
for s in screen do
if wlist[s] ~= nil and wlist[s][widgetname] ~= nil then
if index ~= nil then
vicious.force({ wlist[s][widgetname][index] })