theme + autorun

This commit is contained in:
2024-03-15 12:05:10 +01:00
parent a1f818aced
commit 324342b1a4
9 changed files with 910 additions and 16 deletions

56
rc.lua
View File

@@ -45,9 +45,11 @@ end
-- {{{ Variable definitions
-- Themes define colours, icons, font and wallpapers.
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
-- beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
local theme_path = string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), "default")
beautiful.init(theme_path)
-- This is used later as the default terminal and editor to run.
-- Default terminal and cli editor
terminal = "konsole"
editor = os.getenv("EDITOR") or "vim"
editor_cmd = terminal .. " -e " .. editor
@@ -63,15 +65,15 @@ modkey = "Mod4"
awful.layout.layouts = {
awful.layout.suit.floating,
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
-- awful.layout.suit.tile.left,
-- awful.layout.suit.tile.bottom,
-- awful.layout.suit.tile.top,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
-- awful.layout.suit.fair.horizontal,
-- awful.layout.suit.spiral,
-- awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
-- awful.layout.suit.max,
-- awful.layout.suit.max.fullscreen,
-- awful.layout.suit.magnifier,
-- awful.layout.suit.corner.nw,
-- awful.layout.suit.corner.ne,
@@ -229,6 +231,11 @@ root.buttons(gears.table.join(
-- {{{ Key bindings
globalkeys = gears.table.join(
-- screenshot
awful.key({}, "Print", function () awful.spawn("flameshot gui") end,
{description="screenshot",group="shortcuts"}),
-- base
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{description="show help", group="awesome"}),
awful.key({ modkey, }, "Left", awful.tag.viewprev,
@@ -462,7 +469,7 @@ awful.rules.rules = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
"pinentry",
"pinentry"
},
class = {
"Arandr",
@@ -474,7 +481,8 @@ awful.rules.rules = {
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
"Wpa_gui",
"veromix",
"xtightvncviewer"},
"xtightvncviewer"
},
-- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here.
@@ -493,6 +501,18 @@ awful.rules.rules = {
}, properties = { titlebars_enabled = true }
},
-- conky
{ rule = { class = "conky"},
properties = {
floating = true,
titlebars_enabled = false,
sticky = true,
ontop = false,
focusable = false,
border_width = 0
}
},
-- Set Firefox to always map on the tag named "2" on screen 1.
-- { rule = { class = "Firefox" },
-- properties = { screen = 1, tag = "2" } },
@@ -531,6 +551,8 @@ client.connect_signal("request::titlebars", function(c)
awful.titlebar(c) : setup {
{ -- Left
awful.titlebar.widget.iconwidget(c),
awful.titlebar.widget.ontopbutton (c),
awful.titlebar.widget.stickybutton (c),
buttons = buttons,
layout = wibox.layout.fixed.horizontal
},
@@ -545,8 +567,6 @@ client.connect_signal("request::titlebars", function(c)
{ -- Right
awful.titlebar.widget.floatingbutton (c),
awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.stickybutton (c),
awful.titlebar.widget.ontopbutton (c),
awful.titlebar.widget.closebutton (c),
layout = wibox.layout.fixed.horizontal()
},
@@ -554,11 +574,15 @@ client.connect_signal("request::titlebars", function(c)
}
end)
-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false})
end)
-- sloppy focus (focus follows mouse) disabled
-- client.connect_signal("mouse::enter", function(c)
-- c:emit_signal("request::activate", "mouse_enter", {raise = false})
-- end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}
-- autorun
awful.spawn.with_shell(string.format("%s/.config/awesome/autorun.sh", os.getenv("HOME")))