A command-line tool to manage TearFree settings for X11 displays, allowing users to enable, disable, or query the TearFree status of connected monitors.
xtearfree is a lightweight utility written in Nim that simplifies the management of the TearFree feature on X11 displays. It uses xrandr to detect connected displays and apply or query TearFree settings. The tool supports enabling/disabling TearFree across all connected displays and provides status information. Notifications are displayed using notify-send (optional) unless the --silent flag is used.
- Enable TearFree on all connected displays (
oncommand). - Disable TearFree on all connected displays (
offcommand). - Query the current TearFree status for each display (
statuscommand). - Silent mode (
--silent) to suppress graphical notifications and show console output only. - Simple and lightweight, built with Nim for performance.
- MIT-licensed, open-source software.
Before installing and using xtearfree, ensure you have the following:
- Nim (version 2.0.8 or higher).
- xrandr: Required to detect and configure displays (usually included in X11 environments).
- notify-send (libnotify): Optional, for graphical notifications (not required in
--silentmode). - A Linux system with an X11 display server.
To check if xrandr and notify-send are installed, run:
xrandr --version
notify-send --versionnimble install https://github.com/gabrielcapilla/xtearfree.git-
Clone the repository:
git clone https://github.com/gabrielcapilla/xtearfree.git cd xtearfree -
Install dependencies and build the project using Nimble:
nimble install
-
(Optional) The binary
fswill be generated in the project directory and can be moved to a system path (e.g.,/usr/local/bin) for global access:sudo mv fs /usr/local/bin
Run fs with one of the following commands:
fs [COMMAND] [OPTIONS]on: Enable TearFree on all connected displays.off: Disable TearFree on all connected displays.status: Display the current TearFree status for each connected display.
--silent: Suppress graphical notifications and show console output only.
- Enable TearFree on all displays:
fs on
- Disable TearFree:
fs off
- Check TearFree status:
fs status
- Enable TearFree without notifications:
fs on --silent
- Enable TearFree only in your Steam games:
fs on ; %command% ; fs off
To uninstall xtearfree:
-
Uninstall using Nimble:
nimble uninstall fs
-
Remove the binary (if moved to a system path):
sudo rm /usr/local/bin/fs
*Documentation automatically generated by the artificial intelligence model Gemma 3n.