Is a runcat port for Linux to place it somewhere of your bar
(Another useless cat here..)
⚠️ This was written mostly for waybar and has not yet been tested on others.
python
asyncio
pyjson5
(recommended)
- runcat-text
- requirements
- table of contents
- install/build
- start
- configuration
- styling
- todo
- resources
- motivation
- plans
- place main.py and config.json files somewhere in your system
- install all necessary from requirements.txt
highly recommended to create virtual environment
git clone ...
mkdir ~/.config/waybar/modules
cp -r runcat-text ~/.config/waybar/modules/
cd ~/.config/waybar/modules/runcat-text
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp -r runcat.ttf ~/.local/share/fonts
fc-cache -f
~/.config/waybar/config
...,
"modules-right": [
...,
"custom/runcat",
...,
],
...,
"custom/runcat": {
"exec": "~/.config/waybar/modules/runcat-text/main.py",
"return-type": "json"
},
...,
Here is some info about waybar's config options and some that personal for the module. If you are searching for more check your bar's wiki.
~/.config/waybar/config
option | typeof | default | description |
---|---|---|---|
exec |
string | path to python script | |
return-type |
string | json if you want to use waybar's CSS-classes or tooltips.Nothing or anything if you want to use with polybar |
|
restart-interval |
int | The restart interval (in seconds). Can't be used with the interval option, so only with continuous scripts. Once the script exit, it'll be re-executed after the restart-interval. |
|
format |
string | {} |
The format, how information should be displayed. On {} data gets inserted. |
module/config.json
option | typeof | default | description |
---|---|---|---|
icons |
string array[any] |
Icons to use for animation. I've converted original svg's to ttf-font so you don't need to (check above) |
|
return-type |
string | json if you want to use waybar's CSS-classes or tooltips. Nothing or anything if you want to use with polybar |
|
tooltip-format |
string | Custom format for your tooltip Valid values are: percentage |
|
ui |
object | Some UI setting Check below |
|
cpu |
object | Some CPU setting Check below |
option | typeof | default | description |
---|---|---|---|
fps_l |
int | 6 |
Minimal FPS |
fps_h |
int | 90 |
Maximum FPS |
option | typeof | default | description |
---|---|---|---|
interval |
float | 1 |
CPU info update time |
stat-file |
string | /proc/stat |
Path to proc stats file.dunno if it need somebody |
states |
object | State-classes used for styling check |
You can define here your custom classes to use it with waybar.
Format like {"class-name": lower-percent}
For example
"cpu": {
"states": {
"high": 90,
"medium": 40,
"low": 10
},
...,
},
...
With states like that your module will gets classes like
percent | class |
---|---|
1 | default |
10 | low |
20 | low |
40 | medium |
89 | medium |
90 | high |
100 | high |
#custom-runcat {
font-family: 'runcat';
font-size: 18px;
}
#custom-runcat.low {
font-family: 'runcat';
color: green;
}
#custom-runcat.medium {
font-family: 'runcat';
color: blue;
}
#custom-runcat.high {
font-family: 'runcat';
color: red;
}
- MORE CATS!!!
- test with other bars
- check font for line-height or something
- refactor
The default resources are from internet.
- from win0err/gnome-runcat
- icomoon for converting SVG-icons to font
- original repo for tray. Great work, thanks a lot
Cute little kitty running anywhere in the bar and not just in the tray
Rewrite C-code to python to easily modify and distribute
- refactor and reformat
- maybe rewrite in something like C but more user-friendly (Rust?)