Last active
February 18, 2026 11:59
-
-
Save rakotomandimby/c7e38164da696b538d4e5d2b636ee4e3 to your computer and use it in GitHub Desktop.
switch to wide screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # check if the new mode already exists | |
| if ! xrandr | grep -q "3440x1440_60.00"; then | |
| # create the new mode | |
| xrandr --newmode "3440x1440_60.00" 419.50 3440 3696 4064 4688 1440 1443 1453 1493 -hsync +vsync | |
| xrandr --addmode Virtual-1 "3440x1440_60.00" | |
| fi | |
| # check if the current mode is already set to 3440x1440_60.00 | |
| if ! xrandr | grep -q "Virtual-1 connected 3440x1440"; then | |
| # set the new mode | |
| xrandr --output Virtual-1 --mode "3440x1440_60.00" | |
| else | |
| echo "Virtual-1 is already set to mode 3440x1440_60.00." | |
| fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment