mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2026-09-30 14:49:06 +02:00
fix bat.nu
This commit is contained in:
parent
7b6b1fedd1
commit
cf487e6ed0
1 changed files with 2 additions and 2 deletions
|
|
@ -21,7 +21,7 @@ def "main auto" [] {
|
|||
loop {
|
||||
let paths = ls "/sys/class/power_supply"
|
||||
| each {|it| $it.name | path basename}
|
||||
| filter {|it| $it starts-with "BAT"};
|
||||
| where $it starts-with "BAT";
|
||||
|
||||
if ($paths | is-not-empty) {
|
||||
let result = $paths
|
||||
|
|
@ -74,5 +74,5 @@ def get_bat_icon [
|
|||
frac: float
|
||||
is_charging = false
|
||||
] {
|
||||
$ICONS | get (($frac * 10) | math round) | get (if ($is_charging) { "charging" } else { "normal" })
|
||||
$ICONS | get (($frac * 10) | math round | into cell-path) | get (if ($is_charging) { "charging" } else { "normal" })
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue