From f16e0235a56c1dd0ab4f46355b478ee983c93d23 Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Sun, 25 Feb 2024 17:42:33 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20refactor(awesome):=20FINALLY=20g?= =?UTF-8?q?et=20colors=20moved=20to=20better=20vars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/awesome/config.lua | 10 -- .config/awesome/lib/exit-screen.lua | 20 +-- .config/awesome/main/menu.lua | 2 +- .config/awesome/main/tags.lua | 2 +- .config/awesome/themes/catppuccin/theme.lua | 140 ++++++++---------- .config/awesome/ui/info-panel/calendar.lua | 12 +- .config/awesome/ui/info-panel/init.lua | 2 +- .../awesome/ui/info-panel/music-player.lua | 22 +-- .config/awesome/ui/info-panel/profile.lua | 20 +-- .config/awesome/ui/notif-panel/init.lua | 16 +- .../ui/notif-panel/widgets/bri_slider.lua | 6 +- .../ui/notif-panel/widgets/mic_slider.lua | 12 +- .../ui/notif-panel/widgets/vol_slider.lua | 12 +- .../awesome/ui/popups/notifications/init.lua | 16 +- .config/awesome/ui/popups/volume/init.lua | 18 +-- .config/awesome/ui/top-panel/init.lua | 2 +- .../awesome/ui/top-panel/widgets/clock.lua | 2 +- .config/awesome/ui/top-panel/widgets/cpu.lua | 2 +- .config/awesome/ui/top-panel/widgets/date.lua | 2 +- .config/awesome/ui/top-panel/widgets/disk.lua | 2 +- .config/awesome/ui/top-panel/widgets/mem.lua | 2 +- .../awesome/ui/top-panel/widgets/power.lua | 2 +- .../ui/top-panel/widgets/pulseaudio.lua | 12 +- .../ui/top-panel/widgets/seperator.lua | 2 +- 24 files changed, 159 insertions(+), 179 deletions(-) diff --git a/.config/awesome/config.lua b/.config/awesome/config.lua index 9be8475..91c2457 100644 --- a/.config/awesome/config.lua +++ b/.config/awesome/config.lua @@ -23,16 +23,6 @@ M.theme = { accent = "pink", wallpaper = config_dir .. "themes/catppuccin/buttons.png", pfp = config_dir .. "themes/catppuccin/assets/pfp.jpg", - icons = {}, -} - -M.theme.icons.tags = { - general = " ", - files = " ", - media = " ", - terminal = " ", - coding = " ", - misc = "󰍹 ", } M.icons = { diff --git a/.config/awesome/lib/exit-screen.lua b/.config/awesome/lib/exit-screen.lua index 57cbdf0..e4c3567 100644 --- a/.config/awesome/lib/exit-screen.lua +++ b/.config/awesome/lib/exit-screen.lua @@ -18,7 +18,7 @@ local suspend_text_icon = "" local exit_text_icon = "󰗼" local lock_text_icon = "" -local button_bg = theme.xcolorbase +local button_bg = theme.color.base local button_size = dpi(120) --- Commands @@ -52,7 +52,7 @@ local create_button = function(symbol, hover_color, _, command) align = "center", valign = "center", font = icon_font, - markup = helpers.ui.colorize_text(symbol, theme.xcolorS0), + markup = helpers.ui.colorize_text(symbol, theme.color.surface0), widget = wibox.widget.textbox(), }) @@ -66,7 +66,7 @@ local create_button = function(symbol, hover_color, _, command) forced_height = button_size, forced_width = button_size, border_width = dpi(8), - border_color = theme.xcolorS0, + border_color = theme.color.surface0, shape = helpers.ui.rrect(theme.border_width * 2), bg = button_bg, widget = wibox.container.background, @@ -81,8 +81,8 @@ local create_button = function(symbol, hover_color, _, command) button.border_color = hover_color end) button:connect_signal("mouse::leave", function() - icon.markup = helpers.ui.colorize_text(icon.text, theme.xcolorS0) - button.border_color = theme.xcolorS0 + icon.markup = helpers.ui.colorize_text(icon.text, theme.color.surface0) + button.border_color = theme.color.surface0 end) helpers.ui.add_hover_cursor(button, "hand1") @@ -91,11 +91,11 @@ local create_button = function(symbol, hover_color, _, command) end --- Create the buttons -local poweroff = create_button(poweroff_text_icon, theme.xcolor10, "Poweroff", poweroff_command) -local reboot = create_button(reboot_text_icon, theme.xcolor6, "Reboot", reboot_command) -local suspend = create_button(suspend_text_icon, theme.xcolor8, "Suspend", suspend_command) -local exit = create_button(exit_text_icon, theme.xcolor2, "Exit", exit_command) -local lock = create_button(lock_text_icon, theme.xcolor12, "Lock", lock_command) +local poweroff = create_button(poweroff_text_icon, theme.color.red, "Poweroff", poweroff_command) +local reboot = create_button(reboot_text_icon, theme.color.green, "Reboot", reboot_command) +local suspend = create_button(suspend_text_icon, theme.color.peach, "Suspend", suspend_command) +local exit = create_button(exit_text_icon, theme.color.blue, "Exit", exit_command) +local lock = create_button(lock_text_icon, theme.color.pink, "Lock", lock_command) local create_exit_screen = function(s) s.exit_screen = wibox({ diff --git a/.config/awesome/main/menu.lua b/.config/awesome/main/menu.lua index d5d81f1..52dbb13 100644 --- a/.config/awesome/main/menu.lua +++ b/.config/awesome/main/menu.lua @@ -97,7 +97,7 @@ function awful.menu.new(...) ret.wibox:set_widget(wibox.widget({ ret.wibox.widget, widget = wibox.container.background, - bg = theme.xcolorbase, + bg = theme.color.base, shape = helpers.ui.rrect(0), })) diff --git a/.config/awesome/main/tags.lua b/.config/awesome/main/tags.lua index 6efe465..fbd5106 100644 --- a/.config/awesome/main/tags.lua +++ b/.config/awesome/main/tags.lua @@ -1,5 +1,5 @@ local awful = require("awful") -local icons = require("config").theme.icons.tags +local icons = require("config").icons.tags screen.connect_signal("request::desktop_decoration", function(s) awful.tag( diff --git a/.config/awesome/themes/catppuccin/theme.lua b/.config/awesome/themes/catppuccin/theme.lua index ab39750..14575ac 100644 --- a/.config/awesome/themes/catppuccin/theme.lua +++ b/.config/awesome/themes/catppuccin/theme.lua @@ -1,54 +1,56 @@ ---------------------------- --- Default awesome theme -- ---------------------------- -local theme_assets = require("beautiful.theme_assets") -local xresources = require("beautiful.xresources") -local dpi = xresources.apply_dpi +local beautiful = require("beautiful") local gfs = require("gears.filesystem") -local palette = require("lib.catppuccin.catppuccin.macchiato") - -local themes_path = gfs.get_configuration_dir() .. "themes/" +local config = require("config") local helpers = require("helpers") +local palette = require("lib.catppuccin.catppuccin." .. config.theme.flavor) + +local theme_assets = beautiful.theme_assets +local dpi = beautiful.xresources.apply_dpi + +local themes_path = gfs.get_configuration_dir() .. "themes/" + local theme = {} +theme.color = {} + -- Transparent Color -- theme.transparent = "#00000000" -- Base -- -theme.xcolorcrust = palette.crust.hex -theme.xcolormantle = palette.mantle.hex -theme.xcolorbase = palette.base.hex +theme.color.crust = palette.crust.hex +theme.color.mantle = palette.mantle.hex +theme.color.base = palette.base.hex -- Surface -- -theme.xcolorS0 = palette.surface0.hex -theme.xcolorS1 = palette.surface1.hex -theme.xcolorS2 = palette.surface2.hex +theme.color.surface0 = palette.surface0.hex +theme.color.surface1 = palette.surface1.hex +theme.color.surface2 = palette.surface2.hex -- Overlay -- -theme.xcolorO0 = palette.overlay0.hex -theme.xcolorO1 = palette.overlay1.hex -theme.xcolorO2 = palette.overlay2.hex +theme.color.overlay0 = palette.overlay0.hex +theme.color.overlay1 = palette.overlay1.hex +theme.color.overlay2 = palette.overlay2.hex -- Text -- -theme.xcolorT0 = palette.text.hex -theme.xcolorT1 = palette.subtext0.hex -theme.xcolorT2 = palette.subtext1.hex +theme.color.text = palette.text.hex +theme.color.subtext0 = palette.subtext0.hex +theme.color.subtext1 = palette.subtext1.hex -theme.xcolor1 = palette.lavender.hex -theme.xcolor2 = palette.blue.hex -theme.xcolor3 = palette.sapphire.hex -theme.xcolor4 = palette.sky.hex -theme.xcolor5 = palette.teal.hex -theme.xcolor6 = palette.green.hex -theme.xcolor7 = palette.yellow.hex -theme.xcolor8 = palette.peach.hex -theme.xcolor9 = palette.maroon.hex -theme.xcolor10 = palette.peach.hex -theme.xcolor11 = palette.mauve.hex -theme.xcolor12 = palette.pink.hex -theme.xcolor13 = palette.flamingo.hex -theme.xcolor14 = palette.rosewater.hex +theme.color.lavender = palette.lavender.hex +theme.color.blue = palette.blue.hex +theme.color.sapphire = palette.sapphire.hex +theme.color.sky = palette.sky.hex +theme.color.teal = palette.teal.hex +theme.color.green = palette.green.hex +theme.color.yellow = palette.yellow.hex +theme.color.peach = palette.peach.hex +theme.color.maroon = palette.maroon.hex +theme.color.red = palette.red.hex +theme.color.mauve = palette.mauve.hex +theme.color.pink = palette.pink.hex +theme.color.flamingo = palette.flamingo.hex +theme.color.rosewater = palette.rosewater.hex theme.music = themes_path .. "catppuccin/assets/music.png" theme.volume_on = themes_path .. "catppuccin/assets/volume-on.png" @@ -58,63 +60,63 @@ theme.font = "FiraCode Nerd Font Propo 10" theme.font_name = "FiraCode Nerd Font Propo " -theme.titlebar_bg_focus = theme.xcolorbase -theme.titlebar_bg = theme.xcolorbase -theme.bg_normal = theme.xcolorbase -theme.bg_focus = theme.xcolorS0 +theme.titlebar_bg_focus = theme.color.base +theme.titlebar_bg = theme.color.base +theme.bg_normal = theme.color.base +theme.bg_focus = theme.color.surface0 theme.bg_urgent = "#ff0000" theme.bg_minimize = "#444444" theme.bg_systray = theme.bg_normal -theme.fg_normal = theme.xcolorT2 --Text Color -theme.fg_focus = theme.xcolor5 +theme.fg_normal = theme.color.subtext1 --Text Color +theme.fg_focus = theme.color.teal theme.fg_urgent = "#ffffff" theme.fg_minimize = "#ffffff" theme.useless_gap = dpi(10) theme.border_width = dpi(3) -theme.border_normal = theme.xcolorS0 -theme.border_focus = theme.xcolor5 +theme.border_normal = theme.color.surface0 +theme.border_focus = theme.color.teal theme.border_marked = "#91231c" theme.menu_font = "FiraCode Nerd Font 12" -theme.menu_bg_focus = theme.xcolorbase -theme.menu_fg_focus = theme.xcolor2 +theme.menu_bg_focus = theme.color.base +theme.menu_fg_focus = theme.color.blue theme.menu_border_width = dpi(2) --theme.menu_border_radius = dpi() -theme.menu_border_color = theme.xcolorS0 +theme.menu_border_color = theme.color.surface0 --theme.menu_submenu_icon = themes_path.."catppuccin/submenu.png" theme.submenu = "» " theme.menu_height = dpi(37) theme.menu_width = dpi(194) -theme.tasklist_bg_focus = theme.xcolorbase -theme.tasklist_fg_focus = theme.xcolor1 +theme.tasklist_bg_focus = theme.color.base +theme.tasklist_fg_focus = theme.color.lavender theme.tasklist_disable_icon = true theme.tasklist_font = "FiraCode Nerd Font 11" theme.taglist_spacing = dpi(2) -theme.taglist_bg_focus = theme.xcolorbase +theme.taglist_bg_focus = theme.color.base theme.taglist_disable_icon = true theme.taglist_font = "FiraCode Nerd Font 11" -theme.taglist_fg_focus = theme.xcolor2 --"#7e9dde" -theme.taglist_fg_empty = theme.xcolorS2 +theme.taglist_fg_focus = theme.color.blue --"#7e9dde" +theme.taglist_fg_empty = theme.color.surface2 theme.taglist_fg_occupied = "#526c96" -- Generate taglist squares: local taglist_square_size = dpi(0) -theme.taglist_squares_sel = theme_assets.taglist_squares_sel(taglist_square_size, theme.xcolor2) +theme.taglist_squares_sel = theme_assets.taglist_squares_sel(taglist_square_size, theme.color.blue) theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(taglist_square_size, theme.taglist_fg_occupied) -- Edge Snap -theme.snap_bg = theme.xcolor5 +theme.snap_bg = theme.color.teal theme.snap_border_width = dpi(5) theme.snap_shape = helpers.ui.rrect(0) -- Hotkey Popup theme.hotkeys_shape = helpers.ui.rrect(12) -theme.hotkeys_border_color = theme.xcolor5 -theme.hotkeys_modifiers_fg = theme.xcolorO2 +theme.hotkeys_border_color = theme.color.teal +theme.hotkeys_modifiers_fg = theme.color.overlay2 theme.hotkeys_font = "FiraCode Nerd Font 9" theme.hotkeys_description_font = "FiraCode Nerd Font 9" @@ -130,14 +132,14 @@ theme.mstab_bar_ontop = false theme.mstab_tabbar_position = "top" theme.mstab_tabbar_style = "default" theme.mstab_bar_disable = true ---theme.tabbar_bg_focus = theme.xcolorS0 ---theme.tabbar_bg_normal = theme.xcolorS0 +--theme.tabbar_bg_focus = theme.color.surface0 +--theme.tabbar_bg_normal = theme.color.surface0 --theme.tabbar_radius = dpi(6) -- Layout Machi -theme.machi_switcher_border_color = theme.xcolorS0 +theme.machi_switcher_border_color = theme.color.surface0 theme.machi_switcher_border_opacity = 0.4 -theme.machi_editor_border_color = theme.xcolorS1 +theme.machi_editor_border_color = theme.color.surface1 theme.machi_editor_border_opacity = 0.4 theme.machi_editor_active_opacity = 0.4 @@ -145,16 +147,16 @@ theme.machi_editor_active_opacity = 0.4 theme.tag_preview_widget_border_radius = dpi(6) theme.tag_preview_client_border_radius = dpi(6) theme.tag_preview_client_opacity = 1 -theme.tag_preview_client_bg = theme.xcolorbase -theme.tag_preview_client_border_color = theme.xcolorS0 +theme.tag_preview_client_bg = theme.color.base +theme.tag_preview_client_border_color = theme.color.surface0 theme.tag_preview_client_border_width = dpi(2) -theme.tag_preview_widget_border_color = theme.xcolor5 +theme.tag_preview_widget_border_color = theme.color.teal theme.tag_preview_widget_border_width = dpi(2) theme.tag_preview_widget_margin = 4 -- Variables set for theming notifications: -- notification_font theme.notification_spacing = dpi(4) -theme.notification_bg = theme.xcolorbase +theme.notification_bg = theme.color.base -- notification_[bg|fg] -- notification_[width|height|margin] -- notification_[border_color|border_width|shape|opacity] @@ -185,16 +187,6 @@ theme.titlebar_ontop_button_focus_inactive = themes_path .. "catppuccin/titlebar theme.titlebar_ontop_button_normal_active = themes_path .. "catppuccin/titlebar/unfocus.svg" theme.titlebar_ontop_button_focus_active = themes_path .. "catppuccin/titlebar/ontop.svg" --- theme.titlebar_sticky_button_normal_inactive = themes_path.."catppuccin/titlebar/sticky_normal_inactive.png" --- theme.titlebar_sticky_button_focus_inactive = themes_path.."catppuccin/titlebar/sticky_focus_inactive.png" --- theme.titlebar_sticky_button_normal_active = themes_path.."catppuccin/titlebar/sticky_normal_active.png" --- theme.titlebar_sticky_button_focus_active = themes_path.."catppuccin/titlebar/sticky_focus_active.png" - --- theme.titlebar_floating_button_normal_inactive = themes_path.."catppuccin/titlebar/floating_normal_inactive.png" --- theme.titlebar_floating_button_focus_inactive = themes_path.."catppuccin/titlebar/floating_focus_inactive.png" --- theme.titlebar_floating_button_normal_active = themes_path.."catppuccin/titlebar/floating_normal_active.png" --- theme.titlebar_floating_button_focus_active = themes_path.."catppuccin/titlebar/floating_focus_active.png" - theme.titlebar_maximized_button_normal_active = themes_path .. "catppuccin/titlebar/unfocus.svg" theme.titlebar_maximized_button_focus_active = themes_path .. "catppuccin/titlebar/maximize.svg" theme.titlebar_maximized_button_normal_active_hover = themes_path .. "catppuccin/titlebar/maximize_hover.svg" @@ -223,5 +215,3 @@ theme.awesome_icon = theme_assets.awesome_icon(theme.menu_height, theme.bg_focus theme.icon_theme = "Tela-circle-dark" return theme - --- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/.config/awesome/ui/info-panel/calendar.lua b/.config/awesome/ui/info-panel/calendar.lua index 6053eb4..143dffb 100644 --- a/.config/awesome/ui/info-panel/calendar.lua +++ b/.config/awesome/ui/info-panel/calendar.lua @@ -11,27 +11,27 @@ local theme = beautiful.get() -- copied from awesome doc and adjusted a bit local styles = {} -styles.month = { bg_color = theme.xcolorS0 } +styles.month = { bg_color = theme.color.surface0 } styles.normal = { - bg_color = theme.xcolorS0, + bg_color = theme.color.surface0, padding = dpi(6), - fg_color = theme.xcolorT2, + fg_color = theme.color.subtext1, } styles.focus = { - fg_color = theme.xcolor7, + fg_color = theme.color.yellow, padding = dpi(6), markup = function(t) return "" .. t .. "" end, } styles.header = { - fg_color = theme.xcolor2, + fg_color = theme.color.blue, markup = function(t) return "" .. t .. "" end, } styles.weekday = { - fg_color = theme.xcolorT2, + fg_color = theme.color.subtext1, markup = function(t) local f = helpers.ui.set_font("16") return '' .. t .. "" diff --git a/.config/awesome/ui/info-panel/init.lua b/.config/awesome/ui/info-panel/init.lua index f34b63d..aa2002a 100644 --- a/.config/awesome/ui/info-panel/init.lua +++ b/.config/awesome/ui/info-panel/init.lua @@ -60,7 +60,7 @@ local sidebar = wibox({ y = dpi(60), bg = theme.bg_normal, border_width = dpi(3), - border_color = theme.xcolorS0, + border_color = theme.color.surface0, }) -- Sidebar widget setup diff --git a/.config/awesome/ui/info-panel/music-player.lua b/.config/awesome/ui/info-panel/music-player.lua index a445dc3..5e1b270 100644 --- a/.config/awesome/ui/info-panel/music-player.lua +++ b/.config/awesome/ui/info-panel/music-player.lua @@ -35,7 +35,7 @@ local filter_color = { type = "linear", from = { 0, 0 }, to = { 0, 160 }, - stops = { { 0, theme.xcolorS0 .. "cc" }, { 1, theme.xcolorS0 } }, + stops = { { 0, theme.color.surface0 .. "cc" }, { 1, theme.color.surface0 } }, } local music_art_filter = wibox.widget({ @@ -70,8 +70,8 @@ local function volume_control() bar_width = dpi(4), shape = helpers.ui.rrect(6), bar_shape = helpers.ui.rrect(6), - color = theme.xcolor2, - background_color = theme.xcolorS0, + color = theme.color.blue, + background_color = theme.color.surface0, border_width = 0, widget = wibox.widget.progressbar, }) @@ -198,7 +198,7 @@ local function music() }, forced_width = dpi(350), shape = helpers.ui.prrect(8, false, true, true, false), - bg = theme.xcolorS0, + bg = theme.color.surface0, widget = wibox.container.background, }) end @@ -215,7 +215,7 @@ local music_widget = wibox.widget({ layout = wibox.layout.align.horizontal, }, forced_height = dpi(150), - bg = theme.xcolorbase, + bg = theme.color.base, shape = helpers.ui.rrect(8), widget = wibox.container.background, }, @@ -239,17 +239,17 @@ playerctl_daemon:connect_signal("metadata", function(_, title, artist, album_pat end music_art:set_image(gears.surface.load_uncached(album_path)) - music_title:set_markup_silently(helpers.ui.colorize_text(title, theme.xcolorT2)) - music_artist:set_markup_silently(helpers.ui.colorize_text(artist, theme.xcolor2)) + music_title:set_markup_silently(helpers.ui.colorize_text(title, theme.color.subtext1)) + music_artist:set_markup_silently(helpers.ui.colorize_text(artist, theme.color.blue)) end) playerctl_daemon:connect_signal("playback_status", function(_, playing, _) if playing then - music_text:set_markup_silently(helpers.ui.colorize_text("Now Playing", theme.xcolorO0)) - toggle.markup = helpers.ui.colorize_text(config.icons.music.pause, theme.xcolor2) + music_text:set_markup_silently(helpers.ui.colorize_text("Now Playing", theme.color.overlay0)) + toggle.markup = helpers.ui.colorize_text(config.icons.music.pause, theme.color.blue) else - music_text:set_markup_silently(helpers.ui.colorize_text("Music", theme.xcolorO0)) - toggle.markup = helpers.ui.colorize_text(config.icons.music.play, theme.xcolor2) + music_text:set_markup_silently(helpers.ui.colorize_text("Music", theme.color.overlay0)) + toggle.markup = helpers.ui.colorize_text(config.icons.music.play, theme.color.blue) end end) diff --git a/.config/awesome/ui/info-panel/profile.lua b/.config/awesome/ui/info-panel/profile.lua index 246b567..1402807 100644 --- a/.config/awesome/ui/info-panel/profile.lua +++ b/.config/awesome/ui/info-panel/profile.lua @@ -36,7 +36,7 @@ hostname.font = helpers.ui.set_font("Regular 14") hostname.align = "left" awful.spawn.easy_async_with_shell("hostnamectl --static", function(stdout) - hostname.markup = helpers.ui.colorize_text("@" .. tostring(stdout), theme.xcolor1) + hostname.markup = helpers.ui.colorize_text("@" .. tostring(stdout), theme.color.lavender) end) -- Battery @@ -54,7 +54,7 @@ local shutdown = wibox.widget({ { { font = helpers.ui.set_font("30"), - markup = helpers.ui.colorize_text(config.icons.power, theme.xcolor10), + markup = helpers.ui.colorize_text(config.icons.power, theme.color.red), align = "center", valign = "center", widget = wibox.widget.textbox, @@ -65,7 +65,7 @@ local shutdown = wibox.widget({ right = dpi(11), widget = wibox.container.margin, }, - bg = theme.xcolorS1, + bg = theme.color.surface1, shape = helpers.ui.rrect(8), widget = wibox.container.background, }) @@ -74,7 +74,7 @@ local reboot = wibox.widget({ { { font = helpers.ui.set_font("30"), - markup = helpers.ui.colorize_text(config.icons.restart, theme.xcolor2), + markup = helpers.ui.colorize_text(config.icons.restart, theme.color.blue), align = "center", valign = "center", widget = wibox.widget.textbox, @@ -85,24 +85,24 @@ local reboot = wibox.widget({ right = dpi(11), widget = wibox.container.margin, }, - bg = theme.xcolorS1, + bg = theme.color.surface1, shape = helpers.ui.rrect(8), widget = wibox.container.background, }) shutdown:connect_signal("mouse::enter", function() - shutdown.bg = theme.xcolorS2 + shutdown.bg = theme.color.surface2 end) shutdown:connect_signal("mouse::leave", function() - shutdown.bg = theme.xcolorS1 + shutdown.bg = theme.color.surface1 end) reboot:connect_signal("mouse::enter", function() - reboot.bg = theme.xcolorS2 + reboot.bg = theme.color.surface2 end) reboot:connect_signal("mouse::leave", function() - reboot.bg = theme.xcolorS1 + reboot.bg = theme.color.surface1 end) shutdown:buttons(gears.table.join(awful.button({}, 1, function() @@ -149,7 +149,7 @@ local uptimebox = wibox.widget({ bottom = dpi(3), widget = wibox.container.margin, }, - bg = theme.xcolorS0, + bg = theme.color.surface0, shape = helpers.ui.rrect(7), widget = wibox.container.background, }) diff --git a/.config/awesome/ui/notif-panel/init.lua b/.config/awesome/ui/notif-panel/init.lua index dc95a31..3471e33 100644 --- a/.config/awesome/ui/notif-panel/init.lua +++ b/.config/awesome/ui/notif-panel/init.lua @@ -17,7 +17,7 @@ local notifs_text = wibox.widget({ }) local notifs_clear = wibox.widget({ - markup = helpers.ui.colorize_text(" ", theme.xcolor10), + markup = helpers.ui.colorize_text(" ", theme.color.red), font = helpers.ui.set_font("Bold 21"), align = "center", valign = "center", @@ -36,7 +36,7 @@ local notifs_empty = wibox.widget({ { nil, { - markup = helpers.ui.colorize_text("Nothing Here!", theme.xcolorT2), + markup = helpers.ui.colorize_text("Nothing Here!", theme.color.subtext1), font = helpers.ui.set_font("Bold 17"), align = "center", valign = "center", @@ -48,7 +48,7 @@ local notifs_empty = wibox.widget({ }, forced_height = dpi(730), widget = wibox.container.background, - bg = theme.xcolorS0, + bg = theme.color.surface0, shape = helpers.ui.rrect(8), }) @@ -127,7 +127,7 @@ local create_notif = function(icon, n) }, nil, { - markup = helpers.ui.colorize_text(time, theme.xcolorT2), + markup = helpers.ui.colorize_text(time, theme.color.subtext1), align = "right", valign = "bottom", font = helpers.ui.set_font("Bold 10"), @@ -163,7 +163,7 @@ local create_notif = function(icon, n) }, forced_height = dpi(85), widget = wibox.container.background, - bg = theme.xcolorS0, + bg = theme.color.surface0, shape = helpers.ui.rrect(8), }) @@ -225,7 +225,7 @@ local notifs = wibox.widget({ layout = wibox.container.margin, }, widget = wibox.container.background, - bg = theme.xcolorS0, + bg = theme.color.surface0, shape = helpers.ui.rrect(8), }, notifs_container, @@ -253,7 +253,7 @@ local actions = wibox.widget({ }, forced_height = dpi(120), widget = wibox.container.background, - bg = theme.xcolorS0, + bg = theme.color.surface0, shape = helpers.ui.rrect(8), }) @@ -266,7 +266,7 @@ local action = wibox({ y = dpi(60), bg = theme.bg_normal, border_width = dpi(3), - border_color = theme.xcolorS0, + border_color = theme.color.surface0, }) -- Sidebar widget setup diff --git a/.config/awesome/ui/notif-panel/widgets/bri_slider.lua b/.config/awesome/ui/notif-panel/widgets/bri_slider.lua index f505401..f4f8ce1 100644 --- a/.config/awesome/ui/notif-panel/widgets/bri_slider.lua +++ b/.config/awesome/ui/notif-panel/widgets/bri_slider.lua @@ -11,9 +11,9 @@ local slider = wibox.widget({ bar_shape = helpers.ui.rrect(9), bar_height = 6, bar_color = theme.bg_focus, - bar_active_color = theme.xcolor7, + bar_active_color = theme.color.yellow, handle_shape = gears.shape.circle, - handle_color = theme.xcolor7, + handle_color = theme.color.yellow, handle_width = dpi(12), value = dpi(25), widget = wibox.widget.slider, @@ -23,7 +23,7 @@ helpers.ui.add_hover_cursor(slider, "hand1") local bri_slider = wibox.widget({ { - markup = helpers.ui.colorize_text("󰃞 ", theme.xcolor7), + markup = helpers.ui.colorize_text("󰃞 ", theme.color.yellow), font = helpers.ui.set_font("14"), align = "center", valign = "center", diff --git a/.config/awesome/ui/notif-panel/widgets/mic_slider.lua b/.config/awesome/ui/notif-panel/widgets/mic_slider.lua index 371eb6e..debfb1b 100644 --- a/.config/awesome/ui/notif-panel/widgets/mic_slider.lua +++ b/.config/awesome/ui/notif-panel/widgets/mic_slider.lua @@ -13,10 +13,10 @@ local microphone = config.widget.mic.name local slider = wibox.widget({ bar_shape = helpers.ui.rrect(9), bar_height = dpi(6), - bar_color = theme.xcolorbase, - bar_active_color = theme.xcolor2, + bar_color = theme.color.base, + bar_active_color = theme.color.blue, handle_shape = gears.shape.circle, - handle_color = theme.xcolor2, + handle_color = theme.color.blue, handle_width = dpi(12), value = dpi(75), forced_width = dpi(239), @@ -29,7 +29,7 @@ local osd_value = wibox.widget({ widget = wibox.widget.textbox(), }) local icon = wibox.widget({ - markup = helpers.ui.colorize_text("󰍬", theme.xcolor2), + markup = helpers.ui.colorize_text("󰍬", theme.color.blue), font = helpers.ui.set_font("14"), align = "center", valign = "center", @@ -39,10 +39,10 @@ local icon = wibox.widget({ local function get_val() awesome.connect_signal("signal::mic", function(_, muted) if muted then - icon.markup = helpers.ui.colorize_text("󰍭", theme.xcolor2) + icon.markup = helpers.ui.colorize_text("󰍭", theme.color.blue) icon.font = helpers.ui.set_font("14") else - icon.markup = helpers.ui.colorize_text("󰍬", theme.xcolor2) + icon.markup = helpers.ui.colorize_text("󰍬", theme.color.blue) icon.font = helpers.ui.set_font("17") end end) diff --git a/.config/awesome/ui/notif-panel/widgets/vol_slider.lua b/.config/awesome/ui/notif-panel/widgets/vol_slider.lua index d488061..204ce72 100644 --- a/.config/awesome/ui/notif-panel/widgets/vol_slider.lua +++ b/.config/awesome/ui/notif-panel/widgets/vol_slider.lua @@ -10,10 +10,10 @@ local dpi = beautiful.xresources.apply_dpi local slider = wibox.widget({ bar_shape = helpers.ui.rrect(9), bar_height = dpi(6), - bar_color = theme.xcolorbase, - bar_active_color = theme.xcolor2, + bar_color = theme.color.base, + bar_active_color = theme.color.blue, handle_shape = gears.shape.circle, - handle_color = theme.xcolor2, + handle_color = theme.color.blue, handle_width = dpi(12), value = dpi(75), forced_width = dpi(239), @@ -26,7 +26,7 @@ local osd_value = wibox.widget({ widget = wibox.widget.textbox(), }) local icon = wibox.widget({ - markup = helpers.ui.colorize_text("󰕾 ", theme.xcolor2), + markup = helpers.ui.colorize_text("󰕾 ", theme.color.blue), font = helpers.ui.set_font("14"), align = "center", valign = "center", @@ -36,9 +36,9 @@ local icon = wibox.widget({ local function get_val() awesome.connect_signal("signal::volume", function(_, muted) if muted then - icon.markup = helpers.ui.colorize_text("󰖁", theme.xcolor2) + icon.markup = helpers.ui.colorize_text("󰖁", theme.color.blue) else - icon.markup = helpers.ui.colorize_text("󰕾", theme.xcolor2) + icon.markup = helpers.ui.colorize_text("󰕾", theme.color.blue) end end) end diff --git a/.config/awesome/ui/popups/notifications/init.lua b/.config/awesome/ui/popups/notifications/init.lua index 259734d..c8b9993 100644 --- a/.config/awesome/ui/popups/notifications/init.lua +++ b/.config/awesome/ui/popups/notifications/init.lua @@ -52,7 +52,7 @@ end) naughty.connect_signal("request::display", function(n) --- random accent color - local accent_colors = theme.xcolor2 + local accent_colors = theme.color.blue --- table of icons local app_icons = { @@ -74,7 +74,7 @@ naughty.connect_signal("request::display", function(n) local app_icon_n = wibox.widget({ { font = helpers.ui.set_font("Round 13"), - markup = helpers.ui.colorize_text(app_icon, theme.xcolorbase), + markup = helpers.ui.colorize_text(app_icon, theme.color.base), align = "center", valign = "center", widget = wibox.widget.textbox, @@ -132,7 +132,7 @@ naughty.connect_signal("request::display", function(n) local dismiss = wibox.widget({ { font = helpers.ui.set_font("Bold 10"), - markup = helpers.ui.colorize_text("", theme.xcolor2), + markup = helpers.ui.colorize_text("", theme.color.blue), widget = wibox.widget.textbox, valign = "center", align = "center", @@ -154,7 +154,7 @@ naughty.connect_signal("request::display", function(n) value = 0, thickness = dpi(4), rounded_edge = true, - bg = theme.xcolorbase, + bg = theme.color.base, colors = { { type = "linear", @@ -218,7 +218,7 @@ naughty.connect_signal("request::display", function(n) }, widget = wibox.container.place, }, - bg = theme.xcolorbase, + bg = theme.color.base, forced_height = dpi(25), forced_width = dpi(70), widget = wibox.container.background, @@ -235,7 +235,7 @@ naughty.connect_signal("request::display", function(n) type = "notification", cursor = "hand2", shape = helpers.ui.rrect(12), - border_color = theme.xcolorS0, + border_color = theme.color.surface0, border_width = dpi(3), maximum_width = dpi(350), maximum_height = dpi(180), @@ -255,7 +255,7 @@ naughty.connect_signal("request::display", function(n) margins = { top = dpi(3), bottom = dpi(3), left = dpi(15), right = dpi(15) }, widget = wibox.container.margin, }, - bg = theme.xcolorS0, + bg = theme.color.surface0, widget = wibox.container.background, }, { @@ -294,7 +294,7 @@ naughty.connect_signal("request::display", function(n) }, --- Anti-aliasing container shape = helpers.ui.rrect(0), - bg = theme.xcolorbase, + bg = theme.color.base, widget = wibox.container.background, }, }) diff --git a/.config/awesome/ui/popups/volume/init.lua b/.config/awesome/ui/popups/volume/init.lua index f336599..31698c4 100644 --- a/.config/awesome/ui/popups/volume/init.lua +++ b/.config/awesome/ui/popups/volume/init.lua @@ -46,9 +46,9 @@ local slider_osd = wibox.widget({ id = "vol_osd_slider", bar_shape = gears.shape.rounded_rect, bar_height = dpi(12), - bar_color = theme.xcolorS0, - bar_active_color = theme.xcolor2, - handle_color = theme.xcolor2, + bar_color = theme.color.surface0, + bar_active_color = theme.color.blue, + handle_color = theme.color.blue, handle_shape = gears.shape.circle, handle_width = dpi(24), handle_border_color = "#00000012", @@ -142,7 +142,7 @@ screen.connect_signal("request::desktop_decoration", function(s) bg = theme.transparent, offset = dpi(5), border_width = dpi(3), - border_color = theme.xcolorS0, + border_color = theme.color.surface0, ontop = true, visible = false, preferred_anchors = "middle", @@ -179,7 +179,7 @@ screen.connect_signal("request::desktop_decoration", function(s) right = dpi(24), widget = wibox.container.margin, }, - bg = theme.xcolorbase, + bg = theme.color.base, widget = wibox.container.background, }, }) @@ -231,12 +231,12 @@ local function get_vol() end if muted then - vol_osd_slider.bar_active_color = theme.xcolor10 - vol_osd_slider.handle_color = theme.xcolor10 + vol_osd_slider.bar_active_color = theme.color.red + vol_osd_slider.handle_color = theme.color.red icon3.image = theme.volume_off else - vol_osd_slider.bar_active_color = theme.xcolor2 - vol_osd_slider.handle_color = theme.xcolor2 + vol_osd_slider.bar_active_color = theme.color.blue + vol_osd_slider.handle_color = theme.color.blue icon3.image = theme.volume_on end end) diff --git a/.config/awesome/ui/top-panel/init.lua b/.config/awesome/ui/top-panel/init.lua index d8afbdd..0f05949 100644 --- a/.config/awesome/ui/top-panel/init.lua +++ b/.config/awesome/ui/top-panel/init.lua @@ -79,7 +79,7 @@ screen.connect_signal("request::desktop_decoration", function(s) s.border2 = awful.wibar({ position = "top", screen = s, - bg = theme.xcolorS0, + bg = theme.color.surface0, height = dpi(2), }) end) diff --git a/.config/awesome/ui/top-panel/widgets/clock.lua b/.config/awesome/ui/top-panel/widgets/clock.lua index 52033ec..b84def2 100644 --- a/.config/awesome/ui/top-panel/widgets/clock.lua +++ b/.config/awesome/ui/top-panel/widgets/clock.lua @@ -7,7 +7,7 @@ local beautiful = require("beautiful") local theme = beautiful.get() local dpi = beautiful.xresources.apply_dpi -local clock_icon = helpers.ui.create_icon(config.icons.clock, theme.xcolor12) +local clock_icon = helpers.ui.create_icon(config.icons.clock, theme.color.pink) local clock = wibox.widget.textbox() clock.font = helpers.ui.set_font("11") diff --git a/.config/awesome/ui/top-panel/widgets/cpu.lua b/.config/awesome/ui/top-panel/widgets/cpu.lua index 64fe78d..7f7af6d 100644 --- a/.config/awesome/ui/top-panel/widgets/cpu.lua +++ b/.config/awesome/ui/top-panel/widgets/cpu.lua @@ -7,7 +7,7 @@ local theme = beautiful.get() local dpi = beautiful.xresources.apply_dpi -- Icon -local icon = helpers.create_icon(config.icons.cpu, theme.xcolor9) +local icon = helpers.create_icon(config.icons.cpu, theme.color.maroon) -- Uptime local cpu = wibox.widget.textbox() diff --git a/.config/awesome/ui/top-panel/widgets/date.lua b/.config/awesome/ui/top-panel/widgets/date.lua index 5f44027..17dace5 100644 --- a/.config/awesome/ui/top-panel/widgets/date.lua +++ b/.config/awesome/ui/top-panel/widgets/date.lua @@ -7,7 +7,7 @@ local config = require("config") local theme = beautiful.get() local dpi = beautiful.xresources.apply_dpi -local icon = helpers.ui.create_icon(config.icons.cal, theme.xcolor5) +local icon = helpers.ui.create_icon(config.icons.cal, theme.color.teal) local date = wibox.widget.textbox() date.font = helpers.ui.set_font("11") diff --git a/.config/awesome/ui/top-panel/widgets/disk.lua b/.config/awesome/ui/top-panel/widgets/disk.lua index 11d3923..b7f0e28 100644 --- a/.config/awesome/ui/top-panel/widgets/disk.lua +++ b/.config/awesome/ui/top-panel/widgets/disk.lua @@ -7,7 +7,7 @@ local theme = beautiful.get() local dpi = beautiful.xresources.apply_dpi -- Icon -local icon = helpers.create_icon(config.icons.disk, theme.xcolor7) +local icon = helpers.create_icon(config.icons.disk, theme.color.yellow) -- Uptime local disk = wibox.widget.textbox() diff --git a/.config/awesome/ui/top-panel/widgets/mem.lua b/.config/awesome/ui/top-panel/widgets/mem.lua index 531d641..11a5edc 100644 --- a/.config/awesome/ui/top-panel/widgets/mem.lua +++ b/.config/awesome/ui/top-panel/widgets/mem.lua @@ -7,7 +7,7 @@ local theme = beautiful.get() local dpi = beautiful.xresources.apply_dpi -- Icon -local icon = helpers.create_icon(config.icons.mem, theme.xcolor6) +local icon = helpers.create_icon(config.icons.mem, theme.color.green) -- Uptime local mem = wibox.widget.textbox() diff --git a/.config/awesome/ui/top-panel/widgets/power.lua b/.config/awesome/ui/top-panel/widgets/power.lua index 3fde28c..a952d46 100644 --- a/.config/awesome/ui/top-panel/widgets/power.lua +++ b/.config/awesome/ui/top-panel/widgets/power.lua @@ -9,7 +9,7 @@ local theme = beautiful.get() -- Menu local menu = wibox.widget.textbox() menu.font = helpers.ui.set_font("16") -menu.markup = helpers.ui.colorize_text(config.icons.power, theme.xcolor10) +menu.markup = helpers.ui.colorize_text(config.icons.power, theme.color.red) menu:add_button(awful.button({}, 1, function() awesome.emit_signal("module::exit_screen:show") diff --git a/.config/awesome/ui/top-panel/widgets/pulseaudio.lua b/.config/awesome/ui/top-panel/widgets/pulseaudio.lua index b2445cd..69a2ae1 100644 --- a/.config/awesome/ui/top-panel/widgets/pulseaudio.lua +++ b/.config/awesome/ui/top-panel/widgets/pulseaudio.lua @@ -8,7 +8,7 @@ local theme = beautiful.get() local dpi = beautiful.xresources.apply_dpi -- Icon -local icon = helpers.ui.create_icon(config.icons.vol.on, theme.xcolor2) +local icon = helpers.ui.create_icon(config.icons.vol.on, theme.color.blue) -- Uptime local pulseaudio = wibox.widget.textbox() @@ -19,10 +19,10 @@ local function get_val() awesome.connect_signal("signal::volume", function(vol, muted) if muted then pulseaudio.markup = "muted" - icon.markup = helpers.ui.colorize_text(config.icons.vol.off, theme.xcolor2) + icon.markup = helpers.ui.colorize_text(config.icons.vol.off, theme.color.blue) else pulseaudio.markup = tonumber(vol) .. "%" - icon.markup = helpers.ui.colorize_text(config.icons.vol.on, theme.xcolor2) + icon.markup = helpers.ui.colorize_text(config.icons.vol.on, theme.color.blue) end end) end @@ -55,11 +55,11 @@ local update_volume = function() pulseaudio.markup = tonumber(stdout:match("%d+")) .. "%" if tonumber(stdout:match("%d+")) < 10 then - icon.markup = helpers.ui.colorize_text(config.icons.vol.low, theme.xcolor2) + icon.markup = helpers.ui.colorize_text(config.icons.vol.low, theme.color.blue) elseif tonumber(stdout:match("%d+")) < 50 then - icon.markup = helpers.ui.colorize_text(config.icons.vol.med, theme.xcolor2) + icon.markup = helpers.ui.colorize_text(config.icons.vol.med, theme.color.blue) elseif tonumber(stdout:match("%d+")) < 100 then - icon.markup = helpers.ui.colorize_text(config.icons.vol.high, theme.xcolor2) + icon.markup = helpers.ui.colorize_text(config.icons.vol.high, theme.color.blue) else end end) diff --git a/.config/awesome/ui/top-panel/widgets/seperator.lua b/.config/awesome/ui/top-panel/widgets/seperator.lua index d4b64da..183a7e1 100644 --- a/.config/awesome/ui/top-panel/widgets/seperator.lua +++ b/.config/awesome/ui/top-panel/widgets/seperator.lua @@ -7,6 +7,6 @@ local theme = beautiful.get() local seperator = wibox.widget.textbox() seperator.font = helpers.ui.set_font("14") -seperator.markup = helpers.ui.colorize_text("|", theme.xcolorT2) +seperator.markup = helpers.ui.colorize_text("|", theme.color.subtext1) return seperator