A bash script to easily manage custom display resolutions on Linux using xrandr.
- Create custom resolutions with specified width, height, and refresh rate
- Adjust display position
- Remove custom resolutions
- Remove or restore black borders
- Automatic startup configuration
- Save previous resolution settings
- xrandr
- cvt
- Linux-based operating system
- Clone this repository:
git clone https://github.com/yourusername/custom-resolution-for-linux.git
cd custom-resolution-for-linux
chmod +x custom-resolution-en.sh
./custom-resolution-en.shWhen creating a new resolution the script accepts these arguments:
--no-apply: Creates the custom resolution but doesn't apply it immediately--apply-on-startup: Configures the custom resolution to be applied automatically on system startup
Examples:
./custom-resolution-en.sh --no-apply
./custom-resolution-en.sh --no-apply --apply-on-startupThe script manages several files across your system:
- Main config directory:
~/.config/custom-resolution/ - Resolution setup script:
~/.config/custom-resolution/setup.sh - Previous resolution backup:
~/.config/custom-resolution/previous_resolution
- Location:
~/.config/autostart/custom-resolution.desktop