Created
July 17, 2017 15:43
-
-
Save seidler2547/0e7f40c9c48edeade5c589abbffea6b4 to your computer and use it in GitHub Desktop.
True DPI settings in X
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
# change this to whatever you need | |
export DPI=165 | |
# hardly useful | |
xrandr --dpi $DPI | |
# used by a couple of legacy applications | |
echo 'Xft.dpi: '$DPI | xrdb -merge - | |
# the point here is to increase the mouse cursor size - adjust to your preference | |
echo 'Xcursor.size: 32' | xrdb -merge - | |
# select a larger default font for old X applications or terminals like urxvt | |
echo '*font: -*-helvetica-medium-r-*-*-*-140-*-*-*-*-iso10646-*' | xrdb -merge - | |
# this is probably the most important setting, most applications read the DPI from xsettings | |
echo Xft/DPI $((DPI*1024)) >> ~/.xsettingsd | |
xsettingsd & # or pkill -HUP xsettingsd if it is already running |
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
pref("general.config.obscure_value", 0); // only needed if you do not want to obscure the content with ROT-13 | |
pref("general.config.filename", "mozilla.cfg"); |
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
// | |
defaultPref('layout.css.devPixelsPerPx', ''+(Math.floor(parseFloat(getenv('DPI'))/9.6)/10)); | |
lockPref('layout.css.devPixelsPerPx', ''+(Math.floor(parseFloat(getenv('DPI'))/9.6)/10)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment