awesome: change font, terminal and theme detection
This commit is contained in:
@@ -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
|
||||
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"
|
||||
@@ -242,7 +240,9 @@ local function focus_nth_window (n)
|
||||
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" })
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user