diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2023-09-28 10:50:03 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2023-09-28 10:50:03 -0400 |
commit | d3bb6cbb4724bc8f18f72fa3fea3e65f73ae8d09 (patch) | |
tree | 7e7bc02335fcb6d51f0d697e32111ba2ed93b0e7 /programs/dotfiles/awesome | |
parent | bcb39f3a7016f5f15696390210721dc7608b9617 (diff) | |
download | nix-config-d3bb6cbb4724bc8f18f72fa3fea3e65f73ae8d09.tar.gz nix-config-d3bb6cbb4724bc8f18f72fa3fea3e65f73ae8d09.tar.bz2 nix-config-d3bb6cbb4724bc8f18f72fa3fea3e65f73ae8d09.zip |
add rofi as dmenu
Diffstat (limited to 'programs/dotfiles/awesome')
-rw-r--r-- | programs/dotfiles/awesome/dmenu.lua | 12 | ||||
-rw-r--r-- | programs/dotfiles/awesome/rc.lua | 111 |
2 files changed, 41 insertions, 82 deletions
diff --git a/programs/dotfiles/awesome/dmenu.lua b/programs/dotfiles/awesome/dmenu.lua deleted file mode 100644 index 17301d3..0000000 --- a/programs/dotfiles/awesome/dmenu.lua +++ /dev/null @@ -1,12 +0,0 @@ -local awful = require("awful") -local keygrabber = require("awful.keygrabber") -local beautiful = require("beautiful") -local wibox = require("wibox") -local gears = require("gears") - -local dmenu_widget = {} - -local function worker(user_args) - -end - 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) |