Add battery indicator

This commit is contained in:
Warren Hood 2022-11-27 16:30:20 +02:00
parent eee7cec9c4
commit 3d9af397a8
4 changed files with 22 additions and 4 deletions

3
.gitmodules vendored
View file

@ -4,3 +4,6 @@
[submodule "awesome/.config/awesome/freedesktop"]
path = awesome/.config/awesome/freedesktop
url = https://github.com/lcpz/awesome-freedesktop
[submodule "awesome/.config/awesome/awesome-wm-widgets"]
path = awesome/.config/awesome/awesome-wm-widgets
url = https://github.com/streetturtle/awesome-wm-widgets

@ -0,0 +1 @@
Subproject commit 3bb3d56c26ac3500aab33381af0cccebf6aaa05c

View file

@ -168,6 +168,13 @@ local function set_wallpaper(s)
end
end
-- WIDGETS
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
local cpu = lain.widget.cpu()
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
screen.connect_signal("property::geometry", set_wallpaper)
@ -218,9 +225,17 @@ awful.screen.connect_for_each_screen(function(s)
s.mytasklist, -- Middle widget
{ -- Right widgets
-- Colors: #DDDD77 #77DDDD #DD77DD #7777DD #77DD77
layout = wibox.layout.fixed.horizontal,
arrow("alpha", "#DD77DD"),
wibox.container.background( mykeyboardlayout, "#DD77DD"),
arrow("alpha", "#DDDD77"),
wibox.container.background( mykeyboardlayout, "#DDDD77"),
arrow("#DDDD77", "#77DDDD"),
wibox.container.background( nil , "#77DDDD"),
arrow("#77DDDD", "#DD77DD"),
wibox.container.background( battery_widget({
show_current_level = true,
margin_right = 2,
}), "#DD77DD"),
arrow("#DD77DD", "#7777DD"),
wibox.container.background( wibox.widget.systray(), "#7777DD"),
arrow("#7777DD", "#77DD77"),
@ -593,7 +608,6 @@ client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_n
awful.spawn.once("lxsession") -- Let's run an lxsession which has a polkit
awful.spawn.once("picom") -- Compositor
awful.spawn.once("nm-applet") -- Network Manager applet
awful.spawn.once("volumeicon") -- Volume icon
awful.spawn.once("autorandr -l dual") -- Load my dual monitor autorandr config
-- Wallpaper

2
setup
View file

@ -12,7 +12,7 @@ else
echo "Updating Arch"
sudo pacman -Syyu
echo "Installing tools/utils"
sudo pacman -S ripgrep fd neovim make stow tmux awesome dmenu arandr autorandr volumeicon picom nitrogen network-manager-applet lxsession thunar lxappearance-gtk3 power-profiles-daemon thermald
sudo pacman -S ripgrep fd neovim make stow tmux awesome dmenu arandr autorandr volumeicon picom nitrogen network-manager-applet lxsession thunar lxappearance-gtk3 power-profiles-daemon thermald acpi arc-icon-theme
sudo systemctl enable --now power-profiles-daemon
sudo thermald --systemd