-
Notifications
You must be signed in to change notification settings - Fork 3
Configure DPI for Sommelier (X11)
SupeChicken666 edited this page Aug 28, 2023
·
3 revisions
- Go to
chrome://os-settings/display
- Press Ctrl + Shift + J to open the debug console
- Paste the following into the debug console and press Enter:
div = document.createElement('div');
div.style = 'height: 1in; width: 1in;';
document.body.appendChild(div);
chrome.system.display.getInfo(displayUnitInfo => {
let displayZoomFactor = displayUnitInfo[0].displayZoomFactor.toFixed(1),
screenDPI = div.offsetWidth,
scaledDPI = screenDPI * (window.devicePixelRatio || 1),
defaultDPI = (scaledDPI / displayZoomFactor).toFixed(0);
console.log(`DPI in default scale: %c${defaultDPI}`, 'color: cyan;');
});
- An DPI value should be printed now, copy the DPI value
- Close the settings page and the console
- Paste the following to terminal and press Enter: (replace
[DPI_value]
with the DPI value you just copied)
echo '[DPI_value]' > ${CREW_PREFIX:-/usr/local}/etc/sommelier.dpi
restartsommelier
- Now the DPI should be configured correctly, you can verify it by starting an X11 application and checking the font size.