Moved fonts to config file

master
Mark 2023-08-21 19:00:27 -07:00
parent 459e31371f
commit 23e3adc741
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
9 changed files with 36 additions and 21 deletions

View File

@ -26,6 +26,19 @@ config.core = {
},
]]--
-- Font definitions
font = {
normal_large = "Hack NF 16",
normal_medium = "Hack NF 14",
normal = "Hack NF 12",
normal_small = "Hack NF 10",
prompt = "Hack NF 14"
},
-- The position of the bar on each screen
bar_position = "bottom",
-- Bar size in dpi

View File

@ -105,7 +105,7 @@ return gears.table.join(
awful.key( {"Mod4"}, "p",
function ()
awful.prompt.run {
prompt = "<b>Really shutdown? (y/n/r) </b>",
prompt = "Really shutdown? (y/n/r) ",
textbox = awful.screen.focused().mypromptbox.widget,
exe_callback = shutdown
}

View File

@ -31,10 +31,10 @@ for k, l in pairs(config.ibus.language_list) do
l["widget_text"] = wibox.widget {
{
markup = "<b>" .. l["title"] .. "</b>",
markup = "" .. l["title"] .. "",
align = "left",
valign = "center",
font = "Comfortaa 16",
font = config.core.font.normal_large,
widget = wibox.widget.textbox
},
layout = wibox.container.background,

View File

@ -4,12 +4,12 @@ local widget = {}
widget.ibus_indicator_text = wibox.widget.textbox("??")
widget.ibus_indicator_text.valign = "center"
widget.ibus_indicator_text.align = "center"
widget.ibus_indicator_text.font = "Hack NF 14"
widget.ibus_indicator_text.font = config.core.font.normal_medium
widget.xkb_indicator_text = wibox.widget.textbox("??")
widget.xkb_indicator_text.valign = "center"
widget.xkb_indicator_text.align = "center"
widget.xkb_indicator_text.font = "Hack NF 10"
widget.xkb_indicator_text.font = config.core.font.normal_small
widget.widget = wibox.widget {

View File

@ -4,21 +4,21 @@ local mpc_widget = {}
mpc_widget.title = wibox.widget.textbox("MPD is not")
mpc_widget.title.valign = "center"
mpc_widget.title.align = "left"
mpc_widget.title.font = "Hack NF 12"
mpc_widget.title.font = config.core.font.normal
mpc_widget.title.ellipsize = "end"
mpc_widget.title.forced_width = beautiful.dpi(config.mpc.width)
mpc_widget.artist = wibox.widget.textbox("connected")
mpc_widget.artist.valign = "center"
mpc_widget.artist.align = "left"
mpc_widget.artist.font = "Hack NF 12"
mpc_widget.artist.font = config.core.font.normal
mpc_widget.artist.ellipsize = "end"
mpc_widget.artist.forced_width = beautiful.dpi(config.mpc.width)
mpc_widget.volume = wibox.widget.textbox("??")
mpc_widget.volume.valign = "center"
mpc_widget.volume.align = "left"
mpc_widget.volume.font = "Hack NF 10"
mpc_widget.volume.font = config.core.font.normal
mpc_widget.volume.ellipsize = "end"
mpc_widget.volume.forced_width = beautiful.dpi(10)

22
rc.lua
View File

@ -6,7 +6,19 @@ beautiful = require("beautiful")
menubar = require("menubar")
wibox = require("wibox")
require("awful.autofocus")
-- Load configuration
conf_dir = gears.filesystem.get_configuration_dir()
conf_env = os.getenv("AWESOMEWM_CONFIG")
config = {}
if (conf_env == nil) then
-- Default location: in this directory
dofile(conf_dir .. "/config.lua")
else
dofile(conf_env)
end
-- A "relative require" hack. Does the same thing as `require`,
@ -22,16 +34,6 @@ debug_message = function(msg)
naughty.notify({title = "Debug message:", text = tostring(msg)})
end
-- Order matters.
conf_env = os.getenv("AWESOMEWM_CONFIG")
config = {}
if (conf_env == nil) then
-- Default location: in this directory
dofile(conf_dir .. "/config.lua")
else
dofile(conf_env)
end
beautiful.init(require("theme"))

View File

@ -19,7 +19,7 @@ local overrides = function(theme)
theme.prompt_font = "Comfortaa 14"
theme.prompt_font = config.core.font.prompt
theme.prompt_fg = theme.color.white
theme.prompt_bg = "#00000000"
theme.prompt_fg_cursor = theme.color.black

View File

@ -19,7 +19,7 @@ local theme = bar(theme)
local theme = clients(theme)
local theme = notifications(theme)
theme.font = "Hack NF 12"
theme.font = config.core.font.main
theme.wallpaper = config.core.wallpaper

View File

@ -17,7 +17,7 @@ local overrides = function(theme)
--theme.hotkeys_group_magin = 5
-- Notification theming
theme.notification_font = "Comfortaa 8"
theme.notification_font = config.core.font.normal_small
theme.notification_bg = theme.color.black
theme.notification_fg = theme.color.white