mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-14 12:14:20 +02:00
xsettingsd: compute DPI for each screen
We don't use the information yet.
This commit is contained in:
parent
2511f41461
commit
2fa5ff7a38
1 changed files with 8 additions and 0 deletions
|
@ -2,6 +2,14 @@
|
|||
|
||||
DISPLAY=${DISPLAY%.0}
|
||||
|
||||
# For information
|
||||
xrandr \
|
||||
| sed -n 's/^\([^ ]\)* connected.* \([0-9]*\)x.* \([0-9]*\)mm x .*/\1 \2 \3/p' \
|
||||
| while read output pixels mm; do
|
||||
dpi=$(($pixels * 25.4 / $mm))
|
||||
echo "$output: $dpi DPI"
|
||||
done
|
||||
|
||||
# Don't try to guess DPI. For a laptop, we don't want the same DPI as
|
||||
# for an external screen. Just hardcode stuff...
|
||||
case $(hostname),$(autorandr --current) in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue