Created
February 2, 2017 20:58
-
-
Save r7vme/e45d449ff68773f6924ce6376cb49618 to your computer and use it in GitHub Desktop.
Script to switch between high and low dpi displays
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 | |
LAPTOP_DISP="eDP-1" | |
LAPTOP_DISP_DPI=120 | |
# Get first active display | |
EXTERN_DISP=$(xrandr -q | grep ' connected' | cut -f1 -d' ' | grep -v $LAPTOP_DISP | tail -1) | |
EXTERN_DISP_DPI=96 | |
if [ $EXTERN_DISP ]; then | |
echo Xft.dpi: $EXTERN_DISP_DPI | xrdb -merge | |
xrandr --output $EXTERN_DISP --auto \ | |
--output $LAPTOP_DISP --off | |
else | |
echo Xft.dpi: $LAPTOP_DISP_DPI | xrdb -merge | |
xrandr --output $LAPTOP_DISP --auto | |
fi | |
killall -1 awesome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello
Happy to meet you, my name is Miss Jessica Lawson, it is my pressure to meet you here today through this site, i will like you to write to me so that i can be able to tell you more about me and the reason of my contact with you. here is my private email address, please write to me here so that i can tell you more anout me and also to send my picture to you ( [email protected] ) thanks
Yours Miss Jessica Lawson