diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index 765fead..8a00624 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -54,14 +54,12 @@ end local function read_theme() local theme = "theme_dark.lua" - local f = io.open(os.getenv('HOME') .. '/.config/alacritty/alacritty.toml') + local f = io.open(os.getenv('HOME') .. '/.lightmode') if f then - if string.find(f:read('*all'), 'light') then - theme = 'theme_light.lua' - end + theme = 'theme_light.lua' f:close() - return theme end + return theme end local theme = read_theme() @@ -88,7 +86,7 @@ local function switch_theme() end -- This is used later as the default terminal and editor to run. -local terminal = "st" +local terminal = "kitty --single-instance --instance-group default" -- Default modkey. local modkey = "Mod4" @@ -236,13 +234,15 @@ local function layout_menu() awful.menu(layouts):show() end -local function focus_nth_window (n) +local function focus_nth_window(n) local cc = {} for _, c in ipairs(client.get()) do if awful.widget.tasklist.filter.currenttags(c, mouse.screen) then cc[#cc + 1] = c end end local new_focused = cc[n] - if new_focused then client.focus = new_focused; new_focused:raise() end + if new_focused then + client.focus = new_focused; new_focused:raise() + end end -- {{{ Key bindings @@ -296,7 +296,7 @@ local globalkeys = gears.table.join( { description = "open a terminal", group = "launcher" }), awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn("systemctl suspend") end, { description = "open a terminal", group = "launcher" }), - awful.key({ modkey, "Shift" }, "F6", switch_theme, + awful.key({ modkey, "Control", "Shift" }, "t", switch_theme, { description = "switch theme", group = "launcher" }), awful.key({ modkey, }, "q", awesome.restart, { description = "reload awesome", group = "awesome" }), @@ -347,7 +347,7 @@ local globalkeys = gears.table.join( end, { description = "lua execute prompt", group = "awesome" }), -- Menubar - awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'FiraCode Nerd Font Ret:size=10'") end, + awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'HurmitNerdFont:size=16'") end, { description = "run command", group = "launcher" }) ) @@ -377,11 +377,11 @@ local clientkeys = gears.table.join( { description = "minimize", group = "client" }), awful.key({ modkey, }, "m", function(c) - if awful.layout.getname() == "max" then - awful.layout.set(awful.layout.suit.tile) - else - awful.layout.set(awful.layout.suit.max) - end + if awful.layout.getname() == "max" then + awful.layout.set(awful.layout.suit.tile) + else + awful.layout.set(awful.layout.suit.max) + end end, { description = "(un)maximize", group = "client" }), awful.key({ modkey, }, "v", @@ -539,15 +539,15 @@ awful.rules.rules = { -- {{{ Signals local function set_border_width(c) - local t = awful.screen.focused().selected_tag - if #t:clients() == 1 or t.layout.name == 'max' then - c = c or client.focus - c.border_width = 0 - else - for _, cl in ipairs(t:clients()) do - cl.border_width = beautiful.border_width - end + local t = awful.screen.focused().selected_tag + if #t:clients() == 1 or t.layout.name == 'max' then + c = c or client.focus + c.border_width = 0 + else + for _, cl in ipairs(t:clients()) do + cl.border_width = beautiful.border_width end + end end -- Signal function to execute when a new client appears. @@ -571,20 +571,20 @@ client.connect_signal("mouse::enter", function(c) end) -- local function set_border(c) - -- local s = awful.screen.focused() - -- if c.maximized - -- or (#s.tiled_clients == 1 and not c.floating) - -- or (s.selected_tag and s.selected_tag.layout.name == 'max') - -- then - -- c.border_width = 0 - -- else - -- c.border_width = beautiful.border_width - -- end +-- local s = awful.screen.focused() +-- if c.maximized +-- or (#s.tiled_clients == 1 and not c.floating) +-- or (s.selected_tag and s.selected_tag.layout.name == 'max') +-- then +-- c.border_width = 0 +-- else +-- c.border_width = beautiful.border_width +-- end -- end client.connect_signal("focus", function(c) - c.border_color = beautiful.border_focus - set_border_width(c) + c.border_color = beautiful.border_focus + set_border_width(c) end) client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal; end) tag.connect_signal("property::layout", function() set_border_width(nil) end) diff --git a/awesome/.config/awesome/theme_dark.lua b/awesome/.config/awesome/theme_dark.lua index 8e7f09b..01e527b 100644 --- a/awesome/.config/awesome/theme_dark.lua +++ b/awesome/.config/awesome/theme_dark.lua @@ -5,7 +5,7 @@ local dpi = xresources.apply_dpi local theme = {} -theme.font = "Fira Code Nerd Font 10" +theme.font = "HurmitNerdFont 10" theme.tasklist_disable_icon = true theme.wibar_height = 30 diff --git a/awesome/.config/awesome/theme_light.lua b/awesome/.config/awesome/theme_light.lua index c8c0c68..a19819e 100644 --- a/awesome/.config/awesome/theme_light.lua +++ b/awesome/.config/awesome/theme_light.lua @@ -5,7 +5,7 @@ local dpi = xresources.apply_dpi local theme = {} -theme.font = "Fira Code Nerd Font 10" +theme.font = "HurmitNerdFont 10" theme.tasklist_disable_icon = true theme.wibar_height = 30