From d3bb6cbb4724bc8f18f72fa3fea3e65f73ae8d09 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Thu, 28 Sep 2023 10:50:03 -0400 Subject: add rofi as dmenu --- programs/dotfiles/awesome/rc.lua | 111 +++++++++++++++------------------------ 1 file changed, 41 insertions(+), 70 deletions(-) (limited to 'programs/dotfiles/awesome/rc.lua') diff --git a/programs/dotfiles/awesome/rc.lua b/programs/dotfiles/awesome/rc.lua index 3bf090f..3d2de6d 100644 --- a/programs/dotfiles/awesome/rc.lua +++ b/programs/dotfiles/awesome/rc.lua @@ -239,7 +239,7 @@ awful.screen.connect_for_each_screen(function(s) }, id = "shape_role", bg = beautiful.bg_normal, - shape_border_width = 2, + shape_border_width = 1, shape_border_color = beautiful.fg_minimize, shape = gears.shape.circle, widget = wibox.container.background, @@ -290,28 +290,30 @@ awful.screen.connect_for_each_screen(function(s) }, widget_template = { - layout = wibox.layout.fixed.vertical, - { - wibox.widget.base.make_widget(), - id = 'background_role', - forced_height = 4, - widget = wibox.container.background - }, { + layout = wibox.layout.fixed.horizontal, { { - id = 'icon_role', - widget = wibox.widget.imagebox, + id = "clienticon", + widget = awful.widget.clienticon, }, - margins = 2, widget = wibox.container.margin, + margins = 4 }, { - id = 'text_role', - widget = wibox.widget.textbox + { + id = "text_role", + widget = wibox.widget.textbox + }, + widget = wibox.container.margin, + margins = 4, }, - layout = wibox.layout.fixed.horizontal }, + id = "background_role", + widget = wibox.container.background, + create_callback = function(self, c, index, objects) + self:get_children_by_id("clienticon")[1].client = c + end, } } @@ -335,25 +337,7 @@ awful.screen.connect_for_each_screen(function(s) volumebar, toptextclock, wibox.container.margin(s.mylayoutbox, 4, 4, 4, 4), - { - { - layout = wibox.layout.fixed.horizontal, - { - { - widget = s.systray, - }, - widget = wibox.container.margin, - left = 8, - top = 4, - bottom = 4 - }, - }, - widget = wibox.container.background, - shape = gears.shape.rounded_rect, - shape_border_width = 1, - shape_border_color = beautiful.fg_minimize, - bg = beautiful.bg_normal, - }, + wibox.container.margin(s.systray, 4, 4, 4, 4), layout = wibox.layout.fixed.horizontal }, } @@ -420,6 +404,8 @@ globalkeys = gears.table.join( awful.key({ modkey, }, "`", function() scratch.toggle("kitty --name scratch-terminal", { instance = "scratch-terminal" }) end, {description = "spawn a terminal scratch-pad", group = "launcher"}), + awful.key({ modkey }, "d", function() awful.spawn("rofi -show drun") end, + {description = "show the menubar", group = "launcher"}), awful.key({ modkey, "Control" }, "r", awesome.restart, {description = "reload awesome", group = "awesome"}), @@ -468,10 +454,7 @@ globalkeys = gears.table.join( history_path = awful.util.get_cache_dir() .. "/history_eval" } end, - {description = "lua execute prompt", group = "awesome"}), - -- Menubar - awful.key({ modkey }, "d", function() menubar.show() end, - {description = "show the menubar", group = "launcher"}) + {description = "lua execute prompt", group = "awesome"}) ) clientkeys = gears.table.join( @@ -674,7 +657,7 @@ client.connect_signal("request::titlebars", function(c) end) ) - awful.titlebar(c) : setup { + awful.titlebar(c, {size = 20}) : setup { { -- Left awful.titlebar.widget.iconwidget(c), buttons = buttons, @@ -689,51 +672,39 @@ client.connect_signal("request::titlebars", function(c) layout = wibox.layout.flex.horizontal }, { -- Right - awful.titlebar.widget.maximizedbutton(c), { { { - { - widget = awful.titlebar.widget.maximizedbutton(c), - }, - widget = wibox.container.background, - shape = gears.shape.circle, - shape_border_width = 1, - shape_border_color = "#12ac28", - bg = "#28c940", + widget = awful.titlebar.widget.maximizedbutton(c), }, - width = 16, - strategy = "min", - layout = wibox.layout.constraint + widget = wibox.container.background, + shape = gears.shape.circle, + shape_border_width = 1, + shape_border_color = "#12ac28", + bg = "#28c940", }, - right = 8, - widget = wibox.container.margin, - align = "center", + width = 16, + strategy = "min", + layout = wibox.layout.constraint }, { { { - { - widget = awful.titlebar.widget.closebutton(c), - }, - widget = wibox.container.background, - shape = gears.shape.circle, - shape_border_width = 1, - shape_border_color = "#ad3934", - bg = "#bf4943", + widget = awful.titlebar.widget.closebutton(c), }, - width = 16, - strategy = "min", - layout = wibox.layout.constraint + widget = wibox.container.background, + shape = gears.shape.circle, + shape_border_width = 1, + shape_border_color = "#ad3934", + bg = "#bf4943", }, - right = 8, - widget = wibox.container.margin, - align = "center", + width = 16, + strategy = "min", + layout = wibox.layout.constraint }, - layout = wibox.layout.fixed.horizontal() + spacing = dpi(6), + layout = wibox.layout.fixed.horizontal }, - shape = gears.shape.rounded_rect, - widget = wibox.container.background, layout = wibox.layout.align.horizontal } end) -- cgit v1.2.1