From 553d3b11250e1e538d9ba570e419a36211faa5b9 Mon Sep 17 00:00:00 2001 From: zachir Date: Sun, 12 Feb 2023 00:18:23 -0600 Subject: change rc.lua to use theme font and add default config options for widgets --- awesome/rc.lua | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/awesome/rc.lua b/awesome/rc.lua index 943419b..41c8332 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -59,7 +59,7 @@ theme.dir = string.format("%s/awesome/themes/%s", config_dir, theme.name) beautiful.init(theme.dir .. "/theme.lua") beautiful.useless_gap = 5 beautiful.wallpaper = awful.util.get_configuration_dir() .. "../../background.png" -font = "mononoki Nerd Font Mono 12" +font = beautiful.font or "mononoki Nerd Font Mono 12" -- Widget definitions/initializations @@ -283,7 +283,24 @@ awful.screen.connect_for_each_screen(function(s) batt = crcparse("batt") if batt == "y" then - battery = battery_widget { path_to_icons = "/usr/share/icons/Paper/scalable/status/" } + battery = battery_widget { + font = font, + arc_thickness = 2, + show_current_level = false, + size = 18, + timeout = 10, + main_color = beautiful.fg_color, + bg_color = "#ffffff11", + low_level_color = "#e53935", + medium_level_color = "#c0ca33", + warning_msg_title = "Houston, we have a problem", + warning_msg_text = "Battery is dying", + warning_msg_position = "bottom_right", -- "bottom_right" is default, or top_right, top_left, bottom_left, bottom_right, top_middle, bottom_middle + warning_msg_icon = "~/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg", + enable_battery_warning = true, + show_notification_mode = "on_click", -- "on_hover" is default, or "on_click" or "off" + notification_position = "top_left" -- "top_left is default, or top_right, top_left, bottom_left, bottom_right, top_middle, bottom_middle + } else battery = nil end @@ -306,13 +323,33 @@ awful.screen.connect_for_each_screen(function(s) font = font, interface = net }, - ram_widget(), - cpu_widget(), + ram_widget({ + color_used=beautiful.bg_focus, + color_free=beautiful.fg_normal, + color_buf=beautiful.bg_accent, + widget_height=25, + widget_width=25, + widget_show_buf=true, + timeout=1 + }), + cpu_widget({ + width=50, + step_width=2, + step_spacing=1, + color=beautiful.fg_normal, + enable_kill_button=false, + process_info_max_length=-1, + timeout=1 + }), brightness_widget { + type = "arc", program = "light", - path_to_icon = "/usr/share/icons/Paper/scalable/status/display-brightness-symbolic.svg", step = 5, + base = 20, + path_to_icon = "/usr/share/icons/Paper/scalable/status/display-brightness-symbolic.svg", timeout = 1, + tooltip = false, + percentage = false }, volume_widget { path_to_icon = "/usr/share/icons/Paper/scalable/status/audio-volume-muted-symbolic.svg", -- cgit v1.2.3