feat(waybar): add battery indicator

This commit is contained in:
toast 2026-05-01 00:33:28 +09:00
parent 282f97f848
commit a552cbd08c
2 changed files with 12 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, inputs, ... }:
{ config, lib, inputs, ... }:
{
imports = [
inputs.nixvim.homeModules.nixvim

View file

@ -7,10 +7,11 @@
settings = [{
position = "top";
height = 5;
output = "HDMI-A-1";
output = "!DP-1";
modules-left = [ "custom/mouse-actions" ];
modules-center = [ "privacy" ];
modules-right = [
"battery"
"pulseaudio"
"network"
"cpu"
@ -74,6 +75,15 @@
icon-size = 14;
};
battery = {
interval = 60;
format = "{capacity}% {icon}";
format-icons = {
default = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
charge = ["󰢟" "󰢜" "󰂆" "󰂇" "󰂈" "󰢝" "󰂉" "󰢞" "󰂊" "󰂋" "󰂅"];
};
};
"custom/mouse-actions" = {
format = " {}";
exec = "tail -n 1 -F ~/.config/mouse-actions/state 2>/dev/null";