ADVERTISEMENTS
Linux Apps

Blugon – A Blue Light Filter for X

Blugon – A Blue Light Filter for Linux Desktop
Written by Divine Okoi
ADVERTISEMENTS

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

ADVERTISEMENTS

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.

  Fedora Media Writer - A Necessary Tool for the Fedora User

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.

ADVERTISEMENTS

About the author

Divine Okoi

Divine Okoi is a cybersecurity postgrad with a passion for the open-source community. With 700+ articles covering different topics in IT, you can always trust him to inform you about the coolest tech.