Skip to content

wachin/xsct_gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

xsct_gui

Topic

LEEME EN ESPAΓ‘OL

xsct_gui – Easy Screen Light Control, for X11 Window Manager

This program helps you adjust the color and brightness of your screen on Linux, making it more comfortable to look at β€” especially at night.

It’s like adding a β€œwarm light filter” (similar to your phone’s night mode that diminishes the blue light) to reduce eye strain and make late-night screen time easier on your eyes.

xsct_gui is a graphical interface for xsct, a small command-line tool that changes your screen’s color temperature using xrandr.


What does this program do?

  • πŸ”† Adjusts screen color: Make your screen more orange (warm) or more white (cool).
  • πŸ’‘ Controls brightness: Make the screen dimmer or brighter.
  • πŸ–±οΈ All through a simple, easy-to-use interface with sliders.

βœ… Perfect for nighttime use, studying, or working on your computer. πŸ’‘ Try to match your screen color to the lighting in your room β€” and avoid blue-heavy lights at night!


The Operating System you need

You’ll need a Linux system using the X11 Window Manager (not Wayland). As of 2025, these desktop environments still support X11 sessions:

  • GNOME
  • KDE
  • Linux Mint
  • XFCE
  • LXQt
  • LXDE
  • openbox, fluxbox, jwm, and other X11 window managers

❗ This tool won’t work on Wayland. Make sure you log in using an X11 session.


Install dependencies

sudo apt install python3 python3-pyqt6 python3-pyqt6.qtsvg pyqt6-dev-tools qt6-l10n-tools xsct
Package Purpose
Python 3 The programming language
PyQt6 Modern GUI framework
PyQt6 QtSvg SVG icon support
pyqt6-dev-tools Provides pylupdate6 (extracts translatable strings)
qt6-l10n-tools Provides lrelease (compiles translations to .qm)
xsct Screen color control

How to use the program

Run

python3 xsct_gui.py

Alternatively, you can use the included Launcher.sh script:

bash Launcher.sh

Make it executable first if needed: chmod +x Launcher.sh

Autostart (Run at startup)

You can configure the program to run automatically when your system starts.


PyQt6 Autostart Launcher

Create file:

nano ~/.config/autostart/xsct_gui_pyqt6.desktop

Content:

[Desktop Entry]
Type=Application
Name=xsct_gui (PyQt6)
Comment=Control de luz de pantalla (PyQt6)
Exec=python3 /home/wachin/Dev/xsct_gui/xsct_gui.py
Terminal=false
X-GNOME-Autostart-enabled=true

Interface Controls

1. 🌑️ Color Temperature (2000K to 6500K)

  • Left (2000K): Warm, orange tone β†’ best for nighttime.
  • Right (6500K): Cool, white-blue tone β†’ best for daytime.

πŸ“Œ Move the slider to choose your preferred color.

2. πŸ’‘ Brightness (0.300 to 1.000)

  • Left (0.300): Very dim β†’ great for dark rooms.
  • Right (1.000): Full brightness β†’ best in bright environments.

πŸ“Œ Adjust the slider to set your desired brightness.


Are changes applied automatically?

βœ… Yes! As soon as you move a slider, the change takes effect immediately.

You can also click the "About..." button to see information about the program. When running in Spanish, the button and dialog will appear as "Acerca de...".


Tips for best results

Situation Recommended Settings
πŸŒ™ Night or dark room 3000K – 4000K temperature, 0.700 – 0.800 brightness
β˜€οΈ Daytime or bright room 5500K – 6500K temperature, 1.000 brightness
πŸ‘€ Eyes feel tired Try warmer color and lower brightness

πŸ” Experiment! Find the combo that feels best for your eyes and room lighting.


Translating the program into another language

The program uses Qt Linguist for internationalization. Translation files live in the translations/ folder.

How it works

File Purpose
translations/xsct_gui_es.ts Spanish translation source (XML, human-editable)
translations/xsct_gui_es.qm Compiled binary loaded at runtime

The filename suffix is the ISO 639-1 language code (e.g. es for Spanish, fr for French, de for German). You can also use a full locale like fr_FR or pt_BR.

Step 1 β€” Create a new .ts file for your language

Run pylupdate6 to extract all translatable strings from the source and create a fresh .ts file. Replace fr with your language code:

pylupdate6 xsct_gui.py -ts translations/xsct_gui_fr.ts

Step 2 β€” Translate the strings

Open the .ts file with Qt Linguist (GUI tool):

linguist translations/xsct_gui_fr.ts

Or edit it directly in any text editor β€” it is plain XML. For each <message> block, fill in the <translation> tag with your translated text:

<message>
    <source>About...</source>
    <translation>Γ€ propos...</translation>
</message>

Step 3 β€” Compile to .qm

Once all strings are translated, compile the .ts file into the binary .qm format that Qt loads at runtime:

lrelease translations/xsct_gui_fr.ts -qm translations/xsct_gui_fr.qm

Step 4 β€” Test your translation

Run the program on a system whose locale matches your language, or temporarily override the locale:

LANG=fr_FR.UTF-8 python3 xsct_gui.py

Keeping translations up to date

When the source code changes and new strings are added, re-run pylupdate6 to merge the new strings into your existing .ts file without losing already-translated entries:

pylupdate6 xsct_gui.py -ts translations/xsct_gui_fr.ts

Then translate the new entries and recompile with lrelease.


Can I modify the program?

Absolutely! The program is written in Python, so you can open xsct_gui.py in any text editor (like Geany, Thonny, or Mousepad) to:

  • Change colors
  • Edit labels
  • Add new features

More information


About this program

Created by Washington Indacochea Delgado License: GNU GPL3

About

πŸŒ™ A simple GUI for xsct to adjust screen color temperature and brightness on X11. Reduce eye strain at night with warm colors and dimmer brightness β€” no auto-mode, just full manual control.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors