Linux Apps

Blugon – A Blue Light Filter for X

Blugon – A Blue Light Filter for Linux Desktop
Written by Martins D. Okoi

I have been covering a series of command-line apps/tool recently including Cookie, Sway, and takeover.sh. Today, I came across an app that will end all your (potential) blue light problems and it goes by the name of Blugon.

Blugon is a lightweight configurable command line Blue light filter for X. You can run it once or as a daemon (manually or via systemd). It works effectively by calculating the screen colour from your system time and configuration.

Blugon also supports several backends including tty for running blugon on your TTY, and xgamma.

Blugon – A Blue Light Filter for X

Blugon – A Blue Light Filter for X

Features in Blue Light Filter

  • Open source and freely available for Linux distributions.
  • Source code available on GitHub.
  • Supports several backends includingxgamma, tty, and scg.

Blugon’s dependencies are Python, libx11, libxrandr, and the optional xorg-xgamma backend.

How to Install Blugon in Linux

First, install the following required dependencies and clone the Blugon’s source code from the git repository as shown.

$ sudo apt install libxrandr2 libxrandr-dev libx11-dev
$ git clone https://github.com/jumper149/blugon.git

Now you can build and install Blugon in Linux as shown.

$ cd blugon/
$ make
$ sudo make install

Blugon Configuration

You can use the default configuration as a template:

$ mkdir -p ~/.config/blugon/
$ cp /usr/share/blugon/configs/default/gamma ~/.config/blugon/gamma
$ blugon --printconfig > ~/.config/blugon/config

Otherwise, you can find configuration examples in your /usr/share/blugon/configs/ directory.

  Jam - Listen to Google Play Music Straight From Your Console

Blugon Usage

Start blugon from the terminal:

$ blugon

Run it in the background with:

$ (blugon&)          # to start
$ killall blugon         # to stop

To run blugon with systemd, enable the service as a user with the command:

$ systemctl --user enable blugon.service

You can use the current-mode to manually control colour temperature (e.g. with keyboard shortcuts) without using a daemon:

$ blugon --setcurrent="+600"    # for more blue
$ blugon --setcurrent="-600"    # for more red

As usual, you can use the -h flag for help or the more intensive man-page:

$ man blugon

Blugon Options

  • -o or --once implements gamma values using the current time.
  • -S or --setcurrent sets the colour temperature.
  • -s or --simulation simulates the configuration for the whole day.
  • -f or --fade fades in screen colour on startup.
  • -i [secs] or --interval=[secs] sets the time between refreshes.
  • -c [path] or --configdir=[path] specifies a configuration directory.
  • -b [backend] or --backend=[backend] for choosing the backend for communicating with X.

Are there scripts or applications for managing blue light that you know of? Drop your comments, questions, and opinion on Blugon in the discussion section.

Your Unwavering Support Matters a Lot:

The cost of maintenance is skyrocketing as more readers are coming on board and the ad service that we employ in order to generate revenue is unfortunately no longer sufficient and this is especially due to the increased use of ad-blockers.

We humbly request that you consider disabling your ad-blockers to support us financially or by donating as anything from $1. Your donation(s) will go a long way in supporting FossMint and sister site, TecMint, in running efficiently. Thank you.

Make a Contribution via PayPal


Top Deals

About the author

Martins D. Okoi

Martins Divine Okoi is a graduate of Computer Science with a passion for Linux and the Open Source community. He works as a Graphic Designer, Web Developer, and programmer.