Update to Awesome 4.0
Configuration works mostly identical to previous state. Some exceptions: - Minor changes in tag names (removed unicode symbols), as they are now referenced by name in the rules. - Calendar module is not yet ported and not loaded. - Scratch terminal on F12 key currently moves to bottom of the screen after first opening. Probably will be reimplemented using the new extended awful.spawn API. - awsetbg util writes different wallpaperrc (preexisting wallpaperrc is ignored, as the filename now includes .lua)
This commit is contained in:
parent
457f474a2c
commit
a43b908350
10 changed files with 549 additions and 633 deletions
392
rules.lua
392
rules.lua
|
@ -1,235 +1,169 @@
|
|||
local rules = { mt={} }
|
||||
local awful = require("awful")
|
||||
local tags = tags
|
||||
awful.rules = require("awful.rules")
|
||||
|
||||
local beautiful = require("beautiful")
|
||||
local binder = binder or require("separable.binder")
|
||||
|
||||
local rule_screen = 1
|
||||
|
||||
local function popup_urgent(message)
|
||||
return function(client)
|
||||
client:connect_signal("property::urgent", function (c)
|
||||
if c.urgent and not c.focus then
|
||||
naughty.notify({ text=message })
|
||||
end
|
||||
end)
|
||||
end
|
||||
-- create a notification when given client becomes urgent
|
||||
local function popup_urgent(client, message)
|
||||
client:connect_signal("property::urgent", function (c)
|
||||
if c.urgent and not c.focus then
|
||||
naughty.notify({ text=message })
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local function setup(self)
|
||||
awful.rules.rules = {
|
||||
-- All clients will match this rule.
|
||||
{
|
||||
rule = { },
|
||||
properties = {
|
||||
border_width = beautiful.border_width,
|
||||
border_color = beautiful.border_normal,
|
||||
focus = awful.client.focus.filter,
|
||||
raise = true,
|
||||
minimized = false,
|
||||
size_hints_honor = false,
|
||||
keys = binder.client.keys(),
|
||||
buttons = binder.client.buttons(),
|
||||
},
|
||||
-- print name and class of new windows for debugging purposes
|
||||
callback = function(c)
|
||||
print("-----------\nnew client\n")
|
||||
if (c["name"] ~= nil) then
|
||||
print("name: " .. c["name"])
|
||||
end
|
||||
if (c["class"] ~= nil) then
|
||||
print("class: " .. c["class"])
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
rule = { class = "Passprompt" },
|
||||
properties = { ontop = true, focus = true}
|
||||
},
|
||||
{
|
||||
rule = { class = "Sm" },
|
||||
properties = {
|
||||
floating = true,
|
||||
size_hints_honor = true,
|
||||
-- --ontop = true,
|
||||
fullscreen = true,
|
||||
-- border_width = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
rule_any = { class = {
|
||||
"pinentry", "Passprompt", "MPlayer"
|
||||
}},
|
||||
properties = { floating = true, size_hints_honor = true }
|
||||
},
|
||||
{
|
||||
rule = { class = "Firefox", instance = "Navigator" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][2],
|
||||
floating = false, minimized = false
|
||||
},
|
||||
},
|
||||
{
|
||||
rule_any = { class = {"Pidgin"}, instance = {"Weechat"} },
|
||||
properties = {
|
||||
tag = tags[rule_screen][3], opacity = 0.8
|
||||
},
|
||||
callback = popup_urgent("new chat message")
|
||||
},
|
||||
{
|
||||
rule = { role = "buddy_list" },
|
||||
callback = awful.client.setmaster
|
||||
},
|
||||
{
|
||||
rule = { class = "Eclipse" },
|
||||
properties = {
|
||||
float = false
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Steam", name = "Friends" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][3],
|
||||
},
|
||||
callback = awful.client.setmaster
|
||||
},
|
||||
{
|
||||
rule = { class = "Steam", name = "Chat" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][3],
|
||||
},
|
||||
callback = awful.client.setslave
|
||||
},
|
||||
{
|
||||
rule = { class = "Steam", name = "Steam" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][11],
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Telegram" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][3],
|
||||
},
|
||||
callback = awful.client.setslave
|
||||
},
|
||||
{
|
||||
rule_any = { role ={ "conversation" }, instance = { "Weechat" } },
|
||||
callback = awful.client.setslave
|
||||
},
|
||||
{
|
||||
rule = { class = "Irssi"},
|
||||
properties = {
|
||||
tag = tags[rule_screen][3]
|
||||
} ,
|
||||
callback = awful.client.setslave
|
||||
},
|
||||
{
|
||||
rule = { class = "Claws-mail" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][4]
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { instance = "Gmutt" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][4]
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { instance = "Gcanto" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][5]
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { instance = "Gncmpcpp" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][6]
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Gmpc" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][6]
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Deluge" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][7]
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Pdfpc" },
|
||||
properties = {
|
||||
size_hints_honor = true,
|
||||
float = true,
|
||||
fullscreen = true
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Cellwriter" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][1],
|
||||
ontop = true,
|
||||
size_hints_honor = true,
|
||||
float = true,
|
||||
sticky = true,
|
||||
fullscreen = true
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Xhtop" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][22]
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Dmenu" },
|
||||
properties = {
|
||||
opacity = 0.8
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "URxvt" },
|
||||
properties = {
|
||||
opacity = 0.8
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Gvim" },
|
||||
properties = {
|
||||
opacity = 0.8
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "feh", name = "timetable" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][13],
|
||||
skip_taskbar = true,
|
||||
type = desktop,
|
||||
focusable = false,
|
||||
border_width = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { instance = "Awesomelog" },
|
||||
properties = {
|
||||
tag = tags[rule_screen][14]
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "GLSlideshow" },
|
||||
properties = {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
rules.setup = setup
|
||||
|
||||
rules.mt.__call = setup
|
||||
|
||||
return setmetatable(rules, rules.mt)
|
||||
awful.rules.rules = {
|
||||
-- All clients will match this rule.
|
||||
{
|
||||
rule = { },
|
||||
properties = {
|
||||
border_width = beautiful.border_width,
|
||||
border_color = beautiful.border_normal,
|
||||
focus = awful.client.focus.filter,
|
||||
raise = true,
|
||||
minimized = false,
|
||||
size_hints_honor = false,
|
||||
keys = binder.client.keys(),
|
||||
buttons = binder.client.buttons(),
|
||||
screen = awful.screen.preferred,
|
||||
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||
},
|
||||
-- print name and class of new windows for debugging purposes
|
||||
callback = function(c)
|
||||
print("-----------\nnew client\n")
|
||||
if (c["name"] ~= nil) then
|
||||
print("name: " .. c["name"])
|
||||
end
|
||||
if (c["class"] ~= nil) then
|
||||
print("class: " .. c["class"])
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
rule = { class = "Passprompt" },
|
||||
properties = { ontop = true, focus = true}
|
||||
},
|
||||
{
|
||||
rule = { class = "Sm" },
|
||||
properties = {
|
||||
floating = true,
|
||||
size_hints_honor = true,
|
||||
-- --ontop = true,
|
||||
fullscreen = true,
|
||||
-- border_width = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
rule_any = { class = {
|
||||
"pinentry", "Passprompt", "MPlayer"
|
||||
}},
|
||||
properties = { floating = true, size_hints_honor = true }
|
||||
},
|
||||
{
|
||||
rule = { class = "Firefox", instance = "Navigator" },
|
||||
properties = {
|
||||
screen = 1, tag = "2",
|
||||
floating = false, minimized = false
|
||||
},
|
||||
},
|
||||
{
|
||||
rule_any = { class = {"Pidgin"}, instance = {"Weechat"} },
|
||||
properties = {
|
||||
tag = "3", opacity = 0.8
|
||||
},
|
||||
callback = function(c) popup_urgent(c, "new chat message") end
|
||||
},
|
||||
{
|
||||
rule = { role = "buddy_list" },
|
||||
callback = awful.client.setmaster
|
||||
},
|
||||
{
|
||||
rule = { class = "Eclipse" },
|
||||
properties = {
|
||||
float = false
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Steam", name = "Friends" },
|
||||
properties = {
|
||||
tag = "3"
|
||||
},
|
||||
callback = awful.client.setmaster
|
||||
},
|
||||
{
|
||||
rule = { class = "Steam", name = "Chat" },
|
||||
properties = {
|
||||
tag = "3"
|
||||
},
|
||||
callback = awful.client.setslave
|
||||
},
|
||||
{
|
||||
rule = { class = "Steam", name = "Steam" },
|
||||
properties = {
|
||||
tag = "F1"
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Telegram" },
|
||||
properties = {
|
||||
tag = "3"
|
||||
},
|
||||
callback = awful.client.setslave
|
||||
},
|
||||
{
|
||||
rule_any = { role ={ "conversation" }, instance = { "Weechat" } },
|
||||
callback = awful.client.setslave
|
||||
},
|
||||
{
|
||||
rule = { class = "Irssi"},
|
||||
properties = {
|
||||
tag = "3"
|
||||
} ,
|
||||
callback = awful.client.setslave
|
||||
},
|
||||
{
|
||||
rule = { instance = "Gmutt" },
|
||||
properties = {
|
||||
tag = "4"
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Gmpc" },
|
||||
properties = {
|
||||
tag = "6"
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Pdfpc" },
|
||||
properties = {
|
||||
size_hints_honor = true,
|
||||
float = true,
|
||||
fullscreen = true
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Dmenu" },
|
||||
properties = {
|
||||
opacity = 0.8
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "URxvt" },
|
||||
properties = {
|
||||
opacity = 0.8
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { class = "Gvim" },
|
||||
properties = {
|
||||
opacity = 0.8
|
||||
}
|
||||
},
|
||||
{
|
||||
rule = { instance = "Awesomelog" },
|
||||
properties = {
|
||||
tag = "F4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue