Last active
March 2, 2024 05:24
-
-
Save tstellanova/a042b0696d77b2615b029c52129477ff to your computer and use it in GitHub Desktop.
one liners for wmctrl and xrandr on ubuntu 22 with wayland
This file contains 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
# wmctrl one-liners | |
# DISPLAY is needed if you're running from eg an ssh shell | |
# list all windows | |
DISPLAY=:0 wmctrl -lG | |
# Resize the "active" window | |
# dimensions are: X,Y,width,height | |
DISPLAY=:0 wmctrl -r :ACTIVE: -e 0,40,40,1000,500 | |
# Resize a specific (named) window | |
# dimensions are: X,Y,width,height | |
DISPLAY=:0 wmctrl -r "X-System" -e 0,1920,54,2048,1152 | |
# close a named window | |
DISPLAY=:0 wmctrl -c "X-System" | |
# list GPU modes / ports on DISPLAY=:0 | |
xrandr -d :0 | |
# set display mode for a specific output | |
xrandr -d :0 --output XWAYLAND13 --mode 2560x1440 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment