Open
Description
Related to Starship: Battery module is disabled in resolved config, even if toggled in custom config issue.
Environment
- Starship version: 1.16.0
- zsh version: zsh 5.8.1 (x86_64-ubuntu-linux-gnu)
- Operating system: Pop!_OS 22.04
- Terminal emulator: GNOME Terminal 3.44.0 using VTE 0.68.0 +BIDI +GNUTLS +ICU +SYSTEMD
- Git Commit Hash:
- Branch/Tag: master
- Rust Version: rustc 1.71.0 (8ede3aae2 2023-07-12)
- Rust channel: release
- Build Time: 2023-07-30 13:37:26 +00:00
I believe I've located where the problem might be coming from:
env STARSHIP_LOG=trace starship module battery output
[DEBUG] - (starship::config): Config parsed: {"$schema": String("https://starship.rs/config-schema.json"), "format": String("('$hostname $username')$os\u{f013e} $username$hostname$localip$kubernetes$directory$vcsh$fossil_branch$git_branch$git_commit$git_state$git_metrics$git_status$docker_context$package$c$cmake$dart$deno$dotnet$erlang$golang$guix_shell$haskell$haxe$helm$java$kotlin$lua$nim$nodejs$ocaml$perl$php$purescript$python$raku$rlang$ruby$rust$scala$solidity$swift$terraform$zig$buf$nix_shell$conda$meson$spack$aws$gcloud$openstack$azure$env_var$crystal\n$line_break$custom$sudo$jobs$container$shell $character"), "right_format": String("$cmd_duration$status$time$battery\n"), "add_newline": Boolean(true), "character": Table({"success_symbol": String("[\u{f054}](bold green)"), "error_symbol": String("[\u{f054}](bold red)")}), "aws": Table({"symbol": String("\u{e33d} ")}), "buf": Table({"symbol": String("\u{f49d} ")}), "c": Table({"symbol": String("\u{e61e} ")}), "conda": Table({"symbol": String("\u{f10c} ")}), "dart": Table({"symbol": String("\u{e798} ")}), "directory": Table({"truncation_length": Integer(0), "read_only": String(" \u{f033e}")}), "docker_context": Table({"symbol": String("\u{f308} ")}), "git_branch": Table({"symbol": String("\u{f418} ")}), "golang": Table({"symbol": String("\u{e627} ")}), "guix_shell": Table({"symbol": String("\u{f325} ")}), "haskell": Table({"symbol": String("\u{e777} ")}), "haxe": Table({"symbol": String("\u{e666} ")}), "hostname": Table({"ssh_symbol": String("\u{eb01} ")}), "java": Table({"symbol": String("\u{e256} ")}), "julia": Table({"symbol": String("\u{e624} ")}), "lua": Table({"symbol": String("\u{e620} ")}), "memory_usage": Table({"symbol": String("\u{f035b} ")}), "nim": Table({"symbol": String("\u{f01a5} ")}), "nix_shell": Table({"symbol": String("\u{f313} ")}), "nodejs": Table({"symbol": String("\u{e718} ")}), "status": Table({"disabled": Boolean(false), "format": String("[$symbol](dimmed blue) ")}), "time": Table({"disabled": Boolean(false), "format": String("🕙[$time]($style) "), "time_format": String("%T")}), "battery": Table({"full_symbol": String("\u{f17e2} "), "charging_symbol": String("\u{f0084} "), "unknown_symbol": String("\u{f0091} "), "empty_symbol": String("\u{f008e} "), "disabled": Boolean(false), "display": Array([Table({"threshold": Integer(10), "style": String("bold red"), "discharging_symbol": String("\u{f007a} ")}), Table({"threshold": Integer(20), "style": String("fg:#FFA500"), "discharging_symbol": String("\u{f007b} ")}), Table({"threshold": Integer(30), "style": String("yellow"), "discharging_symbol": String("\u{f007c} ")}), Table({"threshold": Integer(40), "style": String("fg:#ADFF2F"), "discharging_symbol": String("\u{f007d} ")}), Table({"threshold": Integer(50), "style": String("fg:#ADFF2F"), "discharging_symbol": String("\u{f007e} ")}), Table({"threshold": Integer(60), "style": String("green"), "discharging_symbol": String("\u{f007f} ")}), Table({"threshold": Integer(70), "style": String("green"), "discharging_symbol": String("\u{f0080} ")}), Table({"threshold": Integer(80), "style": String("green"), "discharging_symbol": String("\u{f0081} ")}), Table({"threshold": Integer(90), "style": String("green"), "discharging_symbol": String("\u{f0082} ")})])}), "os": Table({"format": String(" $symbol "), "disabled": Boolean(false), "symbols": Table({"Alpaquita": String("\u{eaa2} "), "Alpine": String("\u{f300} "), "Amazon": String("\u{f270} "), "Android": String("\u{f17b} "), "Arch": String("\u{f303} "), "Artix": String("\u{f31f} "), "CentOS": String("\u{f304} "), "Debian": String("\u{f306} "), "DragonFly": String("\u{e28e} "), "Emscripten": String("\u{f205} "), "EndeavourOS": String("\u{f197} "), "Fedora": String("\u{f30a} "), "FreeBSD": String("\u{f30c} "), "Garuda": String("\u{f06d3} "), "Gentoo": String("\u{f30d} "), "HardenedBSD": String("\u{f078c} "), "Illumos": String("\u{f0238} "), "Linux": String("\u{f31a} "), "Mabox": String("\u{eb29} "), "Macos": String("\u{f302} "), "Manjaro": String("\u{f312} "), "Mariner": String("\u{f1cd} "), "MidnightBSD": String("\u{f186} "), "Mint": String("\u{f30e} "), "NetBSD": String("\u{f024} "), "NixOS": String("\u{f313} "), "OpenBSD": String("\u{f023a} "), "openSUSE": String("\u{f314} "), "OracleLinux": String("\u{f0337} "), "Pop": String("\u{f32a} "), "Raspbian": String("\u{f315} "), "Redhat": String("\u{f316} "), "RedHatEnterprise": String("\u{f316} "), "Redox": String("\u{f0018} "), "Solus": String("\u{f0833} "), "SUSE": String("\u{f314} "), "Ubuntu": String("\u{f31b} "), "Unknown": String("\u{f22d} "), "Windows": String("\u{f0372} ")})}), "package": Table({"symbol": String("\u{f03d7} ")}), "pijul_channel": Table({"symbol": String("\u{f418} ")}), "python": Table({"symbol": String("\u{e235} ")}), "rlang": Table({"symbol": String("\u{f07d4} ")}), "ruby": Table({"symbol": String("\u{e791} ")}), "rust": Table({"symbol": String("\u{e7a8} ")}), "scala": Table({"symbol": String("\u{e737} ")})}
[TRACE] - (starship::context): Received completed pipestatus of None
[INFO] - (starship::modules::battery): Unable to access battery information:
stream did not contain valid UTF-8
[TRACE] - (starship::modules): Took 708.243µs to compute module "battery"
I found some related sources. It's interesting to know what's happening under the hood, especially because upower
is giving me the right information...
Command:
$ upower -i $(upower -e | grep 'BAT') | grep -E "state|to\ full|percentage"
Output:
state: discharging
percentage: 92%
Metadata
Metadata
Assignees
Labels
No labels