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 # 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 ### Building
`cargo build --release` `cargo build --release`
@@ -9,31 +10,50 @@ or get binary on release page
### Fetures ### Fetures
```shell ```shell
tmux-helper 0.3.2
Ultra Desu <ultradesu@hexor.ru>
Utility for printing system info for tmux status line. Utility for printing system info for tmux status line.
USAGE: Usage: tmux-helper [OPTIONS]
tmux-helper [FLAGS] [OPTIONS]
FLAGS: Options:
-c, --cpu Print cpu load bar. -c, --cpu
-h, --help Prints help information Print cpu load bar.
-m, --mem Print mem usage bar. -m, --mem
-d, --mpd Show mpd player using MPD native protocol. Print mem usage bar.
-p, --mpris Show player info using MPRIS2 interface. --low <low>
-V, --version Prints version information Low threshold (0.0 - 1.0) [default: 0.7]
--mid <mid>
OPTIONS: Mid threshold (0.0 - 1.0) [default: 0.9]
--COLOR_END <COLOR_END> Default color using to terminate others. -p, --mpris
--COLOR_HIGH <COLOR_HIGH> CPU and MEM bar color while high usage. Show player info using MPRIS2 interface.
--COLOR_LOW <COLOR_LOW> CPU and MEM bar color while low usage. -d, --mpd
--COLOR_MID <COLOR_MID> CPU and MEM bar color while mid usage. Show mpd player using MPD native protocol.
--COLOR_TRACK_ARTIST <COLOR_TRACK_ARTIST> Color of artist name filed. -l, --localtime [<localtime>]
--COLOR_TRACK_NAME <COLOR_TRACK_NAME> Color of track name filed. Local time
--COLOR_TRACK_TIME <COLOR_TRACK_TIME> Color of playing time field. -u, --utctime [<utctime>]
-l, --localtime <localtime> Local time UTC time
-a, --mpd-address <mpd_address> <ADDR>:<PORT> of MPD server. -s, --symbol [<bar_symbol>]
-u, --utctime <utctime> UTC time 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, config,
); );
print!("{:.1}% CPU#[default]", cpu_usage); print!("{:.1}%#[default]", cpu_usage);
} }
pub fn get_player() -> Result<Vec<String>, Box<dyn std::error::Error>> { pub fn get_player() -> Result<Vec<String>, Box<dyn std::error::Error>> {