diff options
Diffstat (limited to 'awesome/rc.lua')
-rw-r--r-- | awesome/rc.lua | 113 |
1 files changed, 23 insertions, 90 deletions
diff --git a/awesome/rc.lua b/awesome/rc.lua index 54d17aa..32bc508 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -82,6 +82,9 @@ local inertmode = false local spawnatbottom = false +terminal="kitty" +editor = os.getenv("EDITOR") or "nvim" +editor_cmd = terminal .. " -e " .. editor -- Default modkey. -- Usually, Mod4 is the key with a logo between Control and Alt. @@ -112,18 +115,6 @@ awful.layout.layouts = { -- }}} -- Config function definitions {{{ - -function crcparse(substr) - local file=assert(io.open(config_dir .. "/computerrc","r")) - local line = "" - repeat - line=file:read("*line") - if line and line:find(string.format("^%s=",substr)) then - return string.sub(line,#substr + 2,-1) - end - until not line -end - function terminal_sp_cmd (spc, cmd, geo) if terminal == "st" then cflag = "-c" @@ -158,25 +149,6 @@ end -- }}} --- {{{ crcparse Definitions - --- terminal -terminal="kitty" -editor = os.getenv("EDITOR") or "nvim" -editor_cmd = terminal .. " -e " .. editor - --- is linux -function is_linux () - return crcparse("OS") == "Linux" -end - --- is openbsd -function is_obsd () - return crcparse("OS") == "OpenBSD" -end - --- }}} - --{{{ bling scratchpad definitions --{{{ sphtop local sphtop = bling.module.scratchpad { @@ -430,41 +402,6 @@ awful.screen.connect_for_each_screen(function(s) -- Create the wibox s.mywibox = awful.wibar({ position = "top", screen = s, height = 36}) - if (crcparse("snd") == "pipewire") or (crcparse("snd") == "pulseaudio") or (crcparse("snd") == "pulse") then - snd="pulse" - else - snd="default" - end - - net = crcparse("inet") - - batt = crcparse("batt") - - light = crcparse("bl") - - if batt == "y" then - 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_right" -- "top_left is default, or top_right, top_left, bottom_left, bottom_right, top_middle, bottom_middle - } - else - battery = nil - end - -- Add widgets to the wibox ---[[ Uncomment for Linux s.mywibox:setup { @@ -503,7 +440,7 @@ awful.screen.connect_for_each_screen(function(s) }), brightness_widget { type = "arc", - program = light, + program = "light", step = 5, base = 20, path_to_icon = "/usr/share/icons/Paper/scalable/status/display-brightness-symbolic.svg", @@ -515,30 +452,26 @@ awful.screen.connect_for_each_screen(function(s) path_to_icon = "/usr/share/icons/Paper/scalable/status/audio-volume-muted-symbolic.svg", widget_type = "arc", mute_color = "#ff111111", - device = snd, + device = "pulse", }, - battery, - mykeyboardlayout, - wibox.widget.systray(), - mytextclock, - s.mylayoutbox, - }, - } - --]] - --[[ Uncomment for OpenBSD - -- Add widgets to the wibox - s.mywibox:setup { - layout = wibox.layout.align.horizontal, - { -- Left widgets - layout = wibox.layout.fixed.horizontal, - mylauncher, - s.mytaglist, - s.mypromptbox, - }, - s.mytasklist, -- Middle widget - { - layout = wibox.layout.fixed.horizontal, - mpd_widget, + 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_right" -- "top_left is default, or top_right, top_left, bottom_left, bottom_right, top_middle, bottom_middle + }, mykeyboardlayout, wibox.widget.systray(), mytextclock, |