8 releases (5 breaking)
Uses new Rust 2024
new 0.6.0 | May 18, 2025 |
---|---|
0.5.0 | May 15, 2025 |
0.4.0 | May 11, 2025 |
0.3.0 | May 8, 2025 |
0.1.2 | May 3, 2025 |
#72 in Hardware support
672 downloads per month
95KB
2K
SLoC
cctv
A terminal client for CoolerControl.
⚠️ Requires the CoolerControl service daemon to be running either locally or remotely, see Configuration.
[[TOC]]
Building
Clone the git repo and build with cargo. Requires a working Rust installation.
git clone https://gitlab.com/coolercontrol/cctv.git
cd cctv
cargo build --release
cargo run --release
Installing/Upgrading
There are no packages for distributions yet but you can download and install the latest binary artifact built from master or build from source yourself.
Latest release
curl -LOJ --clobber --output-dir "/tmp" \
https://gitlab.com/api/v4/projects/69657520/packages/generic/master/latest/cctv
sudo install -Dm 755 /tmp/cctv -t /usr/bin
From source
Install with cargo. Requires a working Rust installation.
cargo install --git https://gitlab.com/coolercontrol/cctv.git
From crates.io
cctv
is also published to crates.io. Note that the version there may be slightly outdated.
cargo install cctv
Make sure $HOME/.cargo/bin
is in your path:
# Bash users
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# zsh users
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Usage
CLI
While primarily a TUI application, cctv
also has a command line interface for some common operations.
Usage: cctv [OPTIONS]
TUI client for CoolerControl
Options:
--list-modes, -l Lists all available modes.
--activate-mode <mode-name>, -a <mode-name> Activates the specified mode.
--help, -h Shows this help message.
If no options are passed, the application will launch into the TUI.
TUI
Keybindings:
Down, e, j: Select next item
Up, i, k: Select previous item
Right, o, l: Go to the next page
Left, n, h: Go to the previous page
R: Refresh app data
s: Toggle legend visibility on charts.
Ctrl+q: Quit
Devices Page
Additional keybindings:
a: Toggle between the default and the alternative chart.
Modes Page
Additional keybindings:
Enter: Activate the currently highlighted mode.
Profiles Page
Editing profiles
Profile editing is a work-in-progress. There's experimental support for manipulating graph and fixed profiles.
⚠️ Take a backup of your config before editing - there may be breakages.
There are two input modes: edit and normal. Normal mode is the default.
When you enter edit mode you will see a popup populated with the current settings.
Edits are in one of three states: working, saved, and applied.
- Working changes are the changes you made but haven't saved within
cctv
. These aren't visualized anywhere but in the text box. - Saved changes are the changes saved in
cctv
but haven't been submitted to CoolerControl. These will be used for drawing the graphs but won't be effective until applied. - Applied changes are final and have been successfully sent to the daemon.
:light_bulb: Your changes are kept (without being saved) when moving between edit and normal modes.
Changes are validated when moving between stages.
- working -> saved: all syntactially correct changes are accepted.
- saved -> applied: all changes deemed valid by the daemon are accepted.
There are no guard rails beyond these. You will be notified of any errors. Lack of a notification indicates success.
:light_bulb: To discard saved changes: press 'R' to sync cctv
with the daemon.
⚠️ Note that the official GUI will not update automatically. You will need to refresh the page to see the changes there. The reverse is also true.
Additional keybindings when in normal mode:
E: Enter edit mode.
D: Discard working changes.
A: Apply saved changes to the daemon.
Additional keybindings when in edit mode:
Following characters can be inserted:
- digits
- space
- .
- ,
- [
- ]
Esc: Exit edit mode.
Enter: Save working changes.
D: Discard working changes.
Right, o, l: Move cursor to the right.
Left, n, h: Move cursor to the left.
Backspace: Delete one character.
Configuration
Configuration is optional. cctv
will attempt to construct configurations from
below locations, in order of precedence:
- Environment variables listed below.
coolercontrold
configuration file- CoolerControl defaults
This means that if you're overriding CoolerControl's defaults, cctv
will
automatically pick some of them up. But you can still override them specifically for
cctv
with the environment variables e.g. to have cctv
connect to a remote
CoolerControl instance instead of your local daemon.
Note that there's currently no SSL or IPv6 support.
Environment variables
CCTV_DAEMON_PORT
- The port CoolerControl is listening on. CoolerControl default: 11987CCTV_DAEMON_ADDRESS
- The address CoolerControl is listening on. CoolerControl default: 127.0.0.1CCTV_DAEMON_CONFIG_FILE_PATH
- The path to CoolerControl's config file. CoolerControl default: /etc/coolercontrol/config.tomlCCTV_TIME_RANGE
- Time range in seconds to look back to for device charts. cctv default: 60CCTV_USERNAME
- CoolerControl username if you've set one. Otherwise the internal default is used.CCTV_PASSWORD
- CoolerControl password if you've set one. Otherwise the internal default is used.CCTV_NO_SPLASH
- Skips the splash screen when set to true. cctv default: false
Dependencies
~13–27MB
~418K SLoC