summaryrefslogtreecommitdiffstats
path: root/programs/dotfiles/awesome/rc.lua
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2023-09-24 07:06:32 -0400
committerJon Santmyer <jon@jonsantmyer.com>2023-09-24 07:06:32 -0400
commit1a646f724ebd8c79bfecd89b57207842e25b93c7 (patch)
treeeb694e4565406dee41815d3e39fdc99b0b0012cd /programs/dotfiles/awesome/rc.lua
parent156e451fcd31120864ad037af6c5f37c5ce5a4e1 (diff)
downloadnix-config-1a646f724ebd8c79bfecd89b57207842e25b93c7.tar.gz
nix-config-1a646f724ebd8c79bfecd89b57207842e25b93c7.tar.bz2
nix-config-1a646f724ebd8c79bfecd89b57207842e25b93c7.zip
awesome: better titlebar decoration, keybind to open webbrowser
Diffstat (limited to 'programs/dotfiles/awesome/rc.lua')
-rw-r--r--programs/dotfiles/awesome/rc.lua60
1 files changed, 54 insertions, 6 deletions
diff --git a/programs/dotfiles/awesome/rc.lua b/programs/dotfiles/awesome/rc.lua
index e2b8cb7..f8cc3d6 100644
--- a/programs/dotfiles/awesome/rc.lua
+++ b/programs/dotfiles/awesome/rc.lua
@@ -68,6 +68,7 @@ end
-- This is used later as the default terminal and editor to run.
terminal = "kitty"
+webbrowser = "firefox"
editor = os.getenv("EDITOR") or "nvim"
editor_cmd = terminal .. " -e " .. editor
@@ -123,7 +124,14 @@ menubar.utils.terminal = terminal -- Set the terminal for applications that requ
-- {{{ Wibar
-- Create a textclock widget
-mytextclock = wibox.widget.textclock()
+toptextclock = wibox.widget {
+ {
+ widget = wibox.widget.textclock
+ },
+ bg = beautiful.bg_normal,
+ widget = wibox.container.background,
+ shape = gears.shape.rounded_rect
+}
-- Create a wibox for each screen and add it
local taglist_buttons = gears.table.join(
@@ -317,8 +325,8 @@ awful.screen.connect_for_each_screen(function(s)
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
- wibox.container.margin(s.systray, 0, 0, 3, 3),
- mytextclock,
+ wibox.container.margin(s.systray, 0, 0, 4, 4),
+ toptextclock,
s.mylayoutbox,
},
}
@@ -356,8 +364,6 @@ globalkeys = gears.table.join(
end,
{description = "focus previous by index", group = "client"}
),
- awful.key({ modkey, }, "w", function () mymainmenu:show() end,
- {description = "show main menu", group = "awesome"}),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
@@ -382,6 +388,9 @@ globalkeys = gears.table.join(
-- Standard program
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
{description = "open a terminal", group = "launcher"}),
+ awful.key({ modkey, }, "w", function () awful.spawn(webbrowser) end,
+ {description = "open the web browser", group = "launcher"}),
+
awful.key({ modkey, "Control" }, "r", awesome.restart,
{description = "reload awesome", group = "awesome"}),
awful.key({ modkey, "Shift" }, "q", awesome.quit,
@@ -650,7 +659,46 @@ client.connect_signal("request::titlebars", function(c)
},
{ -- Right
awful.titlebar.widget.maximizedbutton(c),
- awful.titlebar.widget.closebutton (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",
+ },
+ width = 16,
+ strategy = "min",
+ layout = wibox.layout.constraint
+ },
+ right = 8,
+ widget = wibox.container.margin,
+ align = "center",
+ },
+ {
+ {
+ {
+ {
+ widget = awful.titlebar.widget.closebutton(c),
+ },
+ widget = wibox.container.background,
+ shape = gears.shape.circle,
+ shape_border_width = 1,
+ shape_border_color = "#ad3934",
+ bg = "#bf4943",
+ },
+ width = 16,
+ strategy = "min",
+ layout = wibox.layout.constraint
+ },
+ right = 8,
+ widget = wibox.container.margin,
+ align = "center",
+ },
layout = wibox.layout.fixed.horizontal()
},
shape = gears.shape.rounded_rect,