nwg Control Center (Go version)
nwg Control Center is a highly customisable, GTK-based GUI, intended for use with window managers. It may serve as an
extension to bars / panels, providing built-in and user-defined controls. Default theme may be overridden with custom
css style sheets.
Main window, Nordic-bluish-accent GTK theme, icons Custom light:
More screenshots
This code was primarily written in python and published as nwgcc. As I wanted it
to work a bit faster, and also to learn something new, I translated it into Go, using the
gotk3 library. This is my very first more serious code in golang. I'm 100% sure it
may be improved in many ways.
Dependencies
The above seems to be enough on Arch Linux. On other distributions you may also need libgtk-3
, libglib2
and
libgdk-pixbuf2
. Check the reference on https://github.com/gotk3/gotk3.
Components
For built-in components to work, you need external commands / dependencies as below. If you don't need one, you may
skip installing related packages (e.g. on a desktop machine, you probably don't need the brightness slider).
light
: for Brightness slider
alsa
, alsa-utils
: for Volume slider
playerctl
: for mpris media player controller buttons
wireless_tools
: for Wi-fi status
bluez
, bluez-utils
: for Bluetooth status
Sample user defined commands use blueman
and NetworkManager
.
Installation
- Install dependencies and your selection of optional dependencies.
git clone https://github.com/nwg-piotr/nwgocc.git
cd nwgocc
make get
(This may take a while; provided that no new libraries added, you may skip this step next time.)
make build
sudo make install
To uninstall
sudo make uninstall
Usage
Usage of nwgocc:
-c string
user's templates: Config file name (default "config.json")
-d Do checks, print results
-p place window at the mouse Pointer position (Xorg only)
-r Restore defaults (preferences, templates and icons)
-s string
custom Styling: css file name (default "style.css")
-v display Version information
Click the Preferences button to adjust the window to your needs. For your own custom styling, either modify the
~/.config/nwgocc/style.css
file, or place your own whatever.css
in the same folder, and use the -s
flag.
You may also make a copy of ~/.config/nwgocc/config.json
under another name, for further use with the -c
flag.
Credits