Skip to content

Instantly share code, notes, and snippets.

@naota
Created January 4, 2019 14:31
Show Gist options
  • Save naota/f1b349be7412c42bf536308ad6798042 to your computer and use it in GitHub Desktop.
Save naota/f1b349be7412c42bf536308ad6798042 to your computer and use it in GitHub Desktop.
#!/bin/bash
set_dpi() {
DPI=$1
echo "Xft.dpi: $DPI" | xrdb -merge
echo "Xft/DPI $(( ${DPI} * 1024 ))" > $HOME/.config/xsettingsd/xsettingsd.conf
kill -HUP $(pgrep xsettingsd)
}
case ${AUTORANDR_CURRENT_PROFILE} in
lab)
set_dpi 144
;;
home)
set_dpi 168
;;
*)
set_dpi 188
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment