aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-07-10 16:38:22 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-07-10 16:38:22 +0200
commitea9c94e74ab5f5d3c41c856933adc77900ebf387 (patch)
tree9b28d194f216fc4b0d3ba233246628b7845926a7
parentf577517aa54262cf87f4622ef46bea6b65d9b326 (diff)
Update awesome configs
-rw-r--r--.config/awesome/rc.lua93
1 files changed, 60 insertions, 33 deletions
diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua
index ea3eb70..7408cec 100644
--- a/.config/awesome/rc.lua
+++ b/.config/awesome/rc.lua
@@ -140,17 +140,21 @@ awful.screen.connect_for_each_screen(function(s)
end
end
- -- Create an imagebox widget which will contain an icon indicating which layout we're using.
- -- We need one layoutbox per screen.
- s.mylayoutbox = awful.widget.layoutbox(s)
- s.mylayoutbox:buttons(gears.table.join(
- awful.button({ }, 1, function () awful.layout.inc( 1) end),
- awful.button({ }, 3, function () awful.layout.inc(-1) end),
- awful.button({ }, 4, function () awful.layout.inc( 1) end),
- awful.button({ }, 5, function () awful.layout.inc(-1) end)))
+ s.widgets = {}
+ s.bars = {}
+
+ -- Create an imagebox widget which will contain an icon indicating which layout we're using.
+ -- We need one layoutbox per screen.
+ s.widgets.layout = awful.widget.layoutbox(s)
+ s.widgets.layout:buttons(gears.table.join(
+ awful.button({ }, 1, function () awful.layout.inc( 1) end),
+ awful.button({ }, 3, function () awful.layout.inc(-1) end),
+ awful.button({ }, 4, function () awful.layout.inc( 1) end),
+ awful.button({ }, 5, function () awful.layout.inc(-1) end))
+ )
-- Create a taglist widget
- s.mytaglist = awful.widget.taglist {
+ s.widgets.tags = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
buttons = taglist_buttons,
@@ -158,30 +162,60 @@ awful.screen.connect_for_each_screen(function(s)
}
-- Create a tasklist widget
- s.mytasklist = awful.widget.tasklist {
+ s.widgets.tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = tasklist_buttons,
}
- -- Create the wibox
- s.mytaskbar = awful.wibar({
+ -- Create a clock
+ s.widgets.clock = wibox.widget {
+ widget = wibox.widget.textclock,
+ format = "%F %H:%M",
+ }
+
+ -- Create a systray
+ s.widgets.systray = wibox.widget.systray()
+
+ -- Create the taskbar
+ s.bars.bottom = awful.wibar({
position = "bottom",
screen = s,
bg = beautiful.bg_normal .. "cc",
})
+ --
-- Add widgets to the wibox
- s.mytaskbar:setup {
+ s.bars.bottom:setup {
layout = wibox.layout.align.horizontal,
spacing = 16,
+ s.widgets.tags,
+ s.widgets.tasklist,
+ s.widgets.layout,
+ }
+
+ -- Create the statbar
+ s.bars.top = awful.wibar({
+ position = "top",
+ screen = s,
+ bg = beautiful.bg_normal .. "cc",
+ })
+
+ s.bars.top:setup {
+ layout = wibox.layout.align.horizontal,
+ expand = "none",
{
layout = wibox.layout.fixed.horizontal,
- spacing = 16,
- s.mylayoutbox,
- s.mytaglist,
+ s.widgets.layout,
+ },
+ {
+ layout = wibox.layout.fixed.horizontal,
+ s.widgets.clock,
+ },
+ {
+ layout = wibox.layout.fixed.horizontal,
+ s.widgets.systray,
},
- s.mytasklist,
}
end)
-- }}}
@@ -417,7 +451,6 @@ awful.rules.rules = {
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen,
- opacity = 0.8,
},
},
@@ -569,10 +602,6 @@ awful.rules.rules = {
{ rule_any = {type = { "normal", "dialog" }
}, properties = { titlebars_enabled = false }
},
-
- -- Set Firefox to always map on the tag named "2" on screen 1.
- -- { rule = { class = "Firefox" },
- -- properties = { screen = 1, tag = "2" } },
}
-- }}}
@@ -650,21 +679,19 @@ end)
client.connect_signal("focus", function(c)
c.border_color = beautiful.border_focus
- c.opacity = 1
- -- Mouse follows focus
- if mouse.object_under_pointer() ~= c then
- local geometry = c:geometry()
-
- mouse.coords({
- x = geometry.x + geometry.width/2,
- y = geometry.y + geometry.height/2,
- }, true)
- end
+-- -- Mouse follows focus
+-- if mouse.object_under_pointer() ~= c then
+-- local geometry = c:geometry()
+--
+-- mouse.coords({
+-- x = geometry.x + geometry.width/2,
+-- y = geometry.y + geometry.height/2,
+-- }, true)
+-- end
end)
client.connect_signal("unfocus", function(c)
c.border_color = beautiful.border_normal
- c.opacity = 0.8
end)
-- }}}