3 Commits

Author SHA1 Message Date
Alexandr Bogomyakov
7f62bcf55e Update README.md 2025-07-16 16:21:52 +03:00
Alexandr Bogomyakov
a420204e5d Update README.md 2025-07-16 16:20:41 +03:00
Ultradesu
b5db03203c Remove from cpu_bar 2025-07-16 16:12:38 +03:00
2 changed files with 46 additions and 26 deletions

View File

@@ -1,7 +1,8 @@
# Tmux helper
Small app that perform system check and print TMUX friendly output.
Small app that perform system check and print TMUX friendly output. Prebuilded for MacOS M chip and Linux AMD64
<img width="1495" height="1264" alt="image" src="https://github.com/user-attachments/assets/7b9ffc97-0b59-4028-9b5d-f29347d16000" />
![Preview](.github/prev.png)
### Building
`cargo build --release`
@@ -9,31 +10,50 @@ or get binary on release page
### Fetures
```shell
tmux-helper 0.3.2
Ultra Desu <ultradesu@hexor.ru>
Utility for printing system info for tmux status line.
USAGE:
tmux-helper [FLAGS] [OPTIONS]
Usage: tmux-helper [OPTIONS]
FLAGS:
-c, --cpu Print cpu load bar.
-h, --help Prints help information
-m, --mem Print mem usage bar.
-d, --mpd Show mpd player using MPD native protocol.
-p, --mpris Show player info using MPRIS2 interface.
-V, --version Prints version information
OPTIONS:
--COLOR_END <COLOR_END> Default color using to terminate others.
--COLOR_HIGH <COLOR_HIGH> CPU and MEM bar color while high usage.
--COLOR_LOW <COLOR_LOW> CPU and MEM bar color while low usage.
--COLOR_MID <COLOR_MID> CPU and MEM bar color while mid usage.
--COLOR_TRACK_ARTIST <COLOR_TRACK_ARTIST> Color of artist name filed.
--COLOR_TRACK_NAME <COLOR_TRACK_NAME> Color of track name filed.
--COLOR_TRACK_TIME <COLOR_TRACK_TIME> Color of playing time field.
-l, --localtime <localtime> Local time
-a, --mpd-address <mpd_address> <ADDR>:<PORT> of MPD server.
-u, --utctime <utctime> UTC time
Options:
-c, --cpu
Print cpu load bar.
-m, --mem
Print mem usage bar.
--low <low>
Low threshold (0.0 - 1.0) [default: 0.7]
--mid <mid>
Mid threshold (0.0 - 1.0) [default: 0.9]
-p, --mpris
Show player info using MPRIS2 interface.
-d, --mpd
Show mpd player using MPD native protocol.
-l, --localtime [<localtime>]
Local time
-u, --utctime [<utctime>]
UTC time
-s, --symbol [<bar_symbol>]
Symbol to build bar [default: ▮]
-e, --empty-symbol [<bar_empty_symbol>]
Symbol to represent the empty part of the bar [default: ▯]
-a, --mpd-address <mpd_address>
<ADDR>:<PORT> of MPD server. [default: 127.0.0.1:6600]
--COLOR_LOW <COLOR_LOW>
CPU and MEM bar color while low usage. [default: 119]
--COLOR_MID <COLOR_MID>
CPU and MEM bar color while mid usage. [default: 220]
--COLOR_HIGH <COLOR_HIGH>
CPU and MEM bar color while high usage. [default: 197]
--COLOR_TRACK_NAME <COLOR_TRACK_NAME>
Color of track name filed. [default: 46]
--COLOR_TRACK_ARTIST <COLOR_TRACK_ARTIST>
Color of artist name filed. [default: 46]
--COLOR_TRACK_TIME <COLOR_TRACK_TIME>
Color of playing time field. [default: 153]
--COLOR_END <COLOR_END>
Default color using to terminate others. [default: 153]
-h, --help
Print help
-V, --version
Print version
```

View File

@@ -102,7 +102,7 @@ pub fn cpu_load_bar(bar_len: i32, config: &config::Config) {
config,
);
print!("{:.1}% CPU#[default]", cpu_usage);
print!("{:.1}%#[default]", cpu_usage);
}
pub fn get_player() -> Result<Vec<String>, Box<dyn std::error::Error>> {