Created
January 6, 2021 18:02
-
-
Save obfusk/b3664231f75576b4a7c52f49f844d780 to your computer and use it in GitHub Desktop.
external-screen-fu
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
#!/bin/bash | |
case "${1:-on}" in | |
on) | |
xrandr --output HDMI-1 --auto --output eDP-1 --off | |
xrdb -merge <<< 'Xft.dpi: 96' | |
;; | |
off) | |
xrandr --output HDMI-1 --off --output eDP-1 --auto | |
xrdb -merge <<< 'Xft.dpi: 120' | |
;; | |
*) | |
echo "Usage: external-screen-fu { on | off }" >&2 | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment