Skip to content

Instantly share code, notes, and snippets.

@chaeya
Created November 29, 2022 08:26
Show Gist options
  • Save chaeya/400b269459dad99a914e17dd13e76a27 to your computer and use it in GitHub Desktop.
Save chaeya/400b269459dad99a914e17dd13e76a27 to your computer and use it in GitHub Desktop.
vivobook screen resolution control at office
#!/bin/bash
screen_count=$(xrandr -q |grep -w "connected" | wc -l)
if [ $screen_count = "2" ]; then
xrandr --output eDP-1 --mode 2880x1800 --scale 0.5x0.5 --pos 0x0 --rotate normal --output DP-3 --primary --mode 3440x1440 --scale 1x1 --pos 2880x0 --rotate normal
else
xrandr --output eDP-1 --mode 2880x1800 --scale 1.2x1.2 --pos 0x0 --rotate normal --primary
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment