Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

61 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

xsct GUI icon

xsct GUI

A focused Qt 6 interface for comfortable X11 screen colour and brightness control.

Python 3 PyQt 6 Platform Display server Debian packaging i18n License: GPL-3.0 GitHub stars

xsct GUI makes xsct approachable through two simple sliders. Adjust the colour temperature for warmer evening light and reduce software brightness without memorising command-line options. Changes are applied immediately through XRandR.

Important

xsct GUI requires an X11 session. It does not work on Wayland because xsct controls the display through XRandR.

Highlights

Capability
🌑️ Colour temperature control from 2000 K to 6500 K
β˜€οΈ Software brightness control from 0.300 to 1.000
⚑ Immediate updates while moving either slider
🌍 Runtime language switching with Qt internationalisation
πŸ“¦ Policy-oriented Debian source and binary packaging
πŸͺΆ Small, native-looking interface with minimal dependencies

Contents

Quick start

sudo apt install python3 python3-pyqt6 python3-pyqt6.qtsvg xsct
python3 xsct_gui.py

When running directly from the source tree, install qt6-l10n-tools as well. It lets the application compile updated .ts catalogs into the user cache on demand. Installed Debian packages already contain the compiled catalogs.

The application is suitable for GNOME, KDE Plasma, Xfce, LXQt, LXDE, MATE, Openbox, Fluxbox, JWM, and other environments when logged into an X11 session.

Install runtime dependencies

sudo apt install python3 python3-pyqt6 python3-pyqt6.qtsvg xsct
Package Purpose
python3 Python interpreter
python3-pyqt6 Qt 6 graphical interface for Python
python3-pyqt6.qtsvg SVG icon support
xsct X11 screen colour and brightness control

Install translation tools

These packages are only needed when creating, editing, or compiling translations. They are not required for normal use of the application.

sudo apt install pyqt6-dev-tools qt6-l10n-tools linguist-qt6
Package Purpose
pyqt6-dev-tools Provides pylupdate6 to extract translatable strings into .ts catalogs
qt6-l10n-tools Provides /usr/lib/qt6/bin/lrelease to compile .ts catalogs into .qm files
linguist-qt6 Provides the linguist6 graphical translation editor

Using the application

Run from the source tree

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

You can configure the installed application to run automatically when your desktop session starts.

XDG autostart entry

Create the autostart directory and copy the desktop entry:

mkdir -p ~/.config/autostart
cp /usr/share/applications/xsct-gui.desktop \
    ~/.config/autostart/xsct-gui.desktop

This desktop entry runs xsct-gui, the command installed by the Debian package. To disable autostart later, remove the copied file:

rm ~/.config/autostart/xsct-gui.desktop

Controls and recommendations

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.


Translations and Qt Linguist

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.

The language menu currently supports these Qt locales:

en     de_DE  fr_CA  fr_FR  id_ID  ja_JP  ko  pt_BR
pt_PT  th_TH  tr_TR  ru_RU  zh_HK  zh_CN  zh_TW

English is the source language, so it is available in the menu without a separate .ts or .qm file. The other 15 catalogs, including Spanish, contain a finished translation for every user-visible string. Native speakers are welcome to review wording and regional terminology through Qt Linguist.

Note

Native speakers and language testers wanted! If you speak German, French, Indonesian, Japanese, Korean, Portuguese, Thai, Turkish, Russian, or Chinese, please run xsct GUI in your language and help us verify that the translation feels natural and accurate. Regional feedback is especially useful for fr_CA/fr_FR, pt_BR/pt_PT, and zh_HK/zh_CN/zh_TW.

When reviewing a translation, please check:

  • The language name and System default option.
  • Temperature and brightness labels.
  • The About dialog and its Close button.
  • Error messages and installation instructions.
  • Grammar, punctuation, technical vocabulary, and regional expressions.
  • Whether text fits inside the interface without being cut off.

Please report corrections through the GitHub issue tracker, or edit the corresponding .ts file with Qt Linguist and submit a pull request. In your report, include the locale, the original translation, your suggested wording, andβ€”when usefulβ€”a screenshot showing the problem.

At startup the application uses QLocale.system(). A different language can be selected immediately from the Language menu, without restarting the application. When running from the source tree, catalogs are loaded from translations/; Debian installations use /usr/share/xsct-gui/translations/.

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_FR.ts

Step 2 β€” Translate the strings

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

linguist6 translations/xsct_gui_fr_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:

/usr/lib/qt6/bin/lrelease translations/xsct_gui_fr_FR.ts \
    -qm translations/xsct_gui_fr_FR.qm

Compile every translation catalog at once:

for ts in translations/xsct_gui_*.ts; do
    /usr/lib/qt6/bin/lrelease "$ts" -qm "${ts%.ts}.qm"
done

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, run pylupdate6 again. It merges new and changed source strings into the existing .ts file while preserving translations that are still valid.

Update one catalog:

pylupdate6 xsct_gui.py --ts translations/xsct_gui_fr_FR.ts

Update every catalog supported by the application:

for locale in \
    es de_DE fr_CA fr_FR id_ID ja_JP ko pt_BR pt_PT th_TH tr_TR \
    ru_RU zh_HK zh_CN zh_TW
do
    pylupdate6 xsct_gui.py --ts "translations/xsct_gui_${locale}.ts"
done

After updating the catalogs, translate any entries marked unfinished and compile the resulting .qm files.

Compile one catalog:

/usr/lib/qt6/bin/lrelease translations/xsct_gui_fr_FR.ts \
    -qm translations/xsct_gui_fr_FR.qm

Compile every catalog:

for ts in translations/xsct_gui_*.ts; do
    /usr/lib/qt6/bin/lrelease "$ts" -qm "${ts%.ts}.qm"
done

The .ts files are source files and should be committed to version control. The generated .qm files are build artifacts; the Debian package recreates them automatically during its build.

Development and Debian builds

Install the build and test dependencies declared by the package:

sudo apt build-dep .

Run the test suite without opening a display or changing the real screen:

QT_QPA_PLATFORM=offscreen python3 -m unittest discover -s tests -v

Build the Debian binary package locally:

dpkg-buildpackage --no-sign -b

The project includes Debian source metadata, AppStream metadata, an XDG desktop entry, a manual page, translation compilation, and smoke tests. Packaging changes should pass lintian --pedantic before submission.

Contributing

Contributions are welcome, particularly translations, accessibility improvements, tests, documentation, and Debian packaging review.

  1. Fork the repository and create a focused branch.
  2. Keep user-visible strings inside Qt translation calls.
  3. Add or update tests for behavioural changes.
  4. Run the test suite and build the Debian package.
  5. Open a pull request explaining the motivation and verification performed.

Project links


Author and license

Created and maintained by Washington Indacochea Delgado.

Released under the GNU General Public License, version 3.

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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages