leinardi/gkraken


GUI that allows to control cooling (and soon lighting) of NZXT Kraken X (X42, X52, X62 or X72) pumps from Linux

Keywords: gkraken, gtk, kraken, linux, nzxt, x42, x52, x62, x72


GKraken

GKraken is a GTK application that allows you to control the cooling (and soon also the lighting) of a NZXT Kraken X (X42, X52, X62 or X72) pump from Linux.

TODO

  • [x] Show fan and pump rpm
  • [x] Show liquid temp in both app and app indicator
  • [x] Show chart of selected profile
  • [x] Show pump firmware version
  • [x] Allow to select and apply a profile
  • [x] Publish on PIP
  • [x] Add option to restore last applied profile on startup
  • [x] Allow to hide main app window
  • [x] Add command line option to start the app hidden
  • [x] Add command line option to add/remove udev rule
  • [x] Add Refresh timeout to settings
  • [x] Add command line option to add desktop entry
  • [x] Edit Fixed speed profile
  • [ ] Allow to select profiles from app indicator
  • [x] Add/Delete/Edit multi speed profiles
  • [x] About dialog
  • [x] Find better icons for app and app indicator
  • [ ] Disable unsupported preferences
  • [ ] Lighting
  • [ ] Provide Ubuntu PPA
  • [ ] Add support for i18n (internationalization and localization)

Screenshots

Video

Click here to see a short video of the application.

📦 How to get GKraken

Install from Flathub

This is the preferred way to get GKraken on any major distribution (Arch, Fedora, Linux Mint, openSUSE, Ubuntu, etc).

If you don't have Flatpak installed you can find step by step instructions here.

Make sure to have the Flathub remote added to the current user:

flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Install

flatpak --user install flathub com.leinardi.gkraken

Run

flatpak run com.leinardi.gkraken

Distro specific packages

Install from source code

Dependencies for (K/X)Ubuntu 18.10 or newer

sudo apt install git meson python3-pip libcairo2-dev libgirepository1.0-dev libglib2.0-dev libdazzle-1.0-dev gir1.2-gtksource-3.0 gir1.2-appindicator3-0.1 python3-gi-cairo appstream-util

Dependencies for Fedora 28 or newer

dnf install desktop-file-utils git gobject-introspection-devel gtk3-devel libappstream-glib libdazzle libnotify meson python3-cairocffi python3-devel python3-pip redhat-rpm-config

Clone project and install

If you have not installed GKraken yet:

git clone --recurse-submodules -j4 https://gitlab.com/leinardi/gkraken.git
cd gkraken
git checkout release
sudo -H pip3 install -r requirements.txt
meson . build --prefix /usr
ninja -v -C build
sudo ninja -v -C build install

Update old installation

If you installed GKraken from source code previously and you want to update it:

cd gkraken
git fetch
git checkout release
git reset --hard origin/release
git submodule init
git submodule update
sudo -H pip3 install -r requirements.txt
meson . build --prefix /usr
ninja -v -C build
sudo ninja -v -C build install

Run

Once installed, to start it you can simply execute on a terminal:

gkraken

Running the app

To start the app you have to run the command gkraken in a terminal. The app needs to access the USB interface of the Kranen that, normally, is not available to unprivileged users.

To allow normal users to access the Kraken's USB interface you can create a custom udev rule

Adding Udev rule

Using GKraken

Simply run:

gkraken --add-udev-rule

It will automatically refresh also the udev rules.

Manually

Create a new file in /lib/udev/rules.d/60-gkraken.rules containing this text:

SUBSYSTEM=="usb", ATTRS{idVendor}=="1e71", ATTRS{idProduct}=="170e", MODE="0666"

After that, run the following commands

sudo udevadm control --reload-rules
sudo udevadm trigger --subsystem-match=usb --attr-match=idVendor=1e71 --action=add

Command line options

Parameter Description Source Flatpak
-v, --version Show the app version x x
--debug Show debug messages x x
--hide-window Start with the main window hidden x x
--add-udev-rule Add udev rule to allow execution without root permission x x
--remove-udev-rule Remove udev rule that allow execution without root permission x x
--autostart-on Enable automatic start of the app on login x
--autostart-off Disable automatic start of the app on login x

🖥️ Build, install and run with Flatpak

If you don't have Flatpak installed you can find step by step instructions here.

Make sure to have the Flathub remote added to the current user:

flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Clone the repo

git clone --recurse-submodules -j4 https://gitlab.com/leinardi/gkraken.git

It is possible to build the local source or the remote one (the same that Flathub uses)

Local repository

./build.sh --flatpak-local --flatpak-install

Remote repository

./build.sh --flatpak-remote --flatpak-install

Run

flatpak run com.leinardi.gkraken --debug

🖥️ How to build and run the source code

If you want to clone the project and run directly from the source you need to manually install all the needed dependencies.

(K/X)Ubuntu 18.04 or newer

See Install from source

Fedora 28+ (outdated, please let me know if new dependencies are needed)

Install (K)StatusNotifierItem/AppIndicator Support

Python dependencies

git clone --recurse-submodules -j4 https://gitlab.com/leinardi/gkraken.git
cd gkraken
pip3 install -r requirements.txt

Build and Run

./run.sh

❓ FAQ

The Flatpak version of GKraken is not using my theme, how can I fix it?

Due to sandboxing, Flatpak applications use the default Gnome theme (Adwaita), and not whatever Gtk theme you're currently using.
The fix for this issue is to install your current Gtk theme from Flathub. This way, Flatpak applications will automatically pick the installed Gtk theme and use that instead of Adwaita.

Use this command to get a list of all the available Gtk themes on Flathub:

flatpak --user remote-ls flathub | grep org.gtk.Gtk3theme

And then just install your preferred theme. For example, to install Yaru:

flatpak install flathub org.gtk.Gtk3theme.Yaru

Where are the settings and profiles stored on the filesystem?

Installation type Location
Flatpak $HOME/.var/app/com.leinardi.gkraken/
Source code $XDG_CONFIG_HOME (usually $HOME/.config/gkraken)

💚 How to help the project

Can I support this project some other way?

Something simple that everyone can do is to star it on both GitLab and GitHub. Feedback is always welcome: if you found a bug or would like to suggest a feature, feel free to open an issue on the issue tracker.

⚠ Dropped PyPI support

Production builds were previously distributed using PyPI. This way of distributing the software is simple but requires the user to manually install all the non Python dependencies like cairo, glib, appindicator3, etc.
A solution for all this problems is distributing the app via Flatpak, since with it all the dependencies will be bundled and provided automatically, making possible to use new GTK features also on distributions using an older version of Gnome.

No new build will be published on PyPI.

Uninstall pip version

If you have already installed GKraken via pip, please make sure to uninstall it completely before moving to a newer version:

pip3 uninstall gkraken
rm -rf ~/.config/gkraken

ℹ️ Acknowledgements

Thanks to:

License

This file is part of gkraken.

Copyright (c) 2019 Roberto Leinardi

gkraken is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

gkraken is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with gkraken.  If not, see <http://www.gnu.org/licenses/>.

Project Statistics

Sourcerank 4
Stars 57
Forks 8
Open issues 7
Dependencies 0
Tags 9
Created
Last updated

Packages Referencing this Repo

gkraken
GUI to control cooling and lighting of NZXT Kraken X (X42, X52, X62 or X72) pumps
Latest release 0.12.2 - Updated - 57 stars

Recent Tags See all

0.13.0-flatpak September 26, 2019
0.13.0 September 26, 2019
0.12.1 October 20, 2018
0.12.0 October 20, 2018
0.11.0 October 14, 2018
0.10.0 October 12, 2018
0.9.0 October 12, 2018
0.8.0 October 10, 2018
0.7.0 October 09, 2018

Something wrong with this page? Make a suggestion

Last synced: 2019-09-27 09:29:36 UTC

Login to resync this repository