You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my notebook, I have starship installed.
It works without any warnings.
I copied notebook's config into Termux on my Pixel 4 XL.
And after that when I login it shows such warning (and battery percentage indicator doesn't work)
[WARN] - (starship::config): Failed to load config value: Error in 'StarshipRoot' at 'battery': Unknown key
Phone's prompt does not have battery info
u0_a291 in 🌐 localhost in ~ on 🌱 main
❯
Expected Behavior
When I login on termux, warning does not show up and in my prompt I see my battery percentage as on my notebook:
~ on 🌱 main
💀97% ❯ phone
Motivation for this is when users don't have direct or easy access to their phones, and they log into their phones via ssh to see some info like battery charge percent.
Additional context/Screenshots
Version of starship package in termux:
u0_a291 in 🌐 localhost in ~ on 🌱 main took 4s
❯ apt show starship
Package: starship
Version: 1.11.0
Maintainer: @termux
Installed-Size: 7647 kB
Depends: openssl, zlib
Homepage: https://starship.rs
Download-Size: 2140 kB
APT-Manual-Installed: yes
APT-Sources: https://packages.termux.dev/apt/termux-main stable/main aarch64 Packages
Description: A minimal, blazing fast, and extremely customizable prompt for any shell
Termux has the solution to use android APIs from CLI present as termux-api package:
u0_a291 in 🌐 localhost in ~ on 🌱 main
✗ apt install termux-api
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
termux-api
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 22.0 kB of archives.
After this operation, 295 kB of additional disk space will be used.
Get:1 https://packages.termux.dev/apt/termux-main stable/main aarch64 termux-api aarch64 0.57 [22.0 kB]
Fetched 22.0 kB in 2s (12.2 kB/s)
Selecting previously unselected package termux-api.
(Reading database ... 10060 files and directories currently installed.)
Preparing to unpack .../termux-api_0.57_aarch64.deb ...
Unpacking termux-api (0.57) ...
Setting up termux-api (0.57) ...
u0_a291 in 🌐 localhost in ~ on 🌱 main took 2s
❯ termux-battery-status
I think this is going to be because the version you are using on your phone has been compiled without support for the battery module (this is an optional feature).
edit yep this has been removed in the termux package because the battery crate doesn't support termux.
Current Behavior
On my notebook, I have starship installed.
It works without any warnings.
I copied notebook's config into Termux on my Pixel 4 XL.
And after that when I login it shows such warning (and battery percentage indicator doesn't work)
Phone's prompt does not have battery info
Expected Behavior
When I login on termux, warning does not show up and in my prompt I see my battery percentage as on my notebook:
Motivation for this is when users don't have direct or easy access to their phones, and they log into their phones via ssh to see some info like battery charge percent.
Additional context/Screenshots
Version of starship package in termux:
Version of starship on my notebook:
Possible Solution
Termux has the solution to use android APIs from CLI present as
termux-api
package:Environment in termux
Relevant Shell Configuration
Starship Configuration
The text was updated successfully, but these errors were encountered: