Batery widget
- For hyprlock - For waybar
This commit is contained in:
parent
31ce60194d
commit
dba0dd05cf
3 changed files with 106 additions and 4 deletions
|
|
@ -1,5 +1,7 @@
|
|||
{ pkgs, lib, hwconfig, ... }:
|
||||
|
||||
let
|
||||
battery = (import ./battery-status.nix {inherit pkgs; inherit hwconfig;});
|
||||
in
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
|
|
@ -37,7 +39,7 @@
|
|||
#"memory"
|
||||
#"temperature"
|
||||
"hyprland/language"
|
||||
] ++ (if hwconfig.isLaptop then [ "battery" ] else [ ])
|
||||
] ++ lib.optional battery.available "custom/battery"
|
||||
++ [
|
||||
"tray"
|
||||
"custom/notification"
|
||||
|
|
@ -55,6 +57,14 @@
|
|||
warning = 20;
|
||||
};
|
||||
};
|
||||
"custom/battery" = {
|
||||
exec ="${pkgs.writeShellScriptBin "battery-widget" ''
|
||||
${battery.labelAdaptive}
|
||||
${battery.labelPercent}
|
||||
''}/bin/battery-widget";
|
||||
interval = 20;
|
||||
tooltip = true;
|
||||
};
|
||||
clock = {
|
||||
format-alt = "{:%d-%m-%Y}";
|
||||
tooltip-format = "{:%d-%m-%Y | %H:%M}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue