blob: 9580ed7595a517bd02118377cfc1686e021a3d48 [file] [log] [blame]
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Startup hook for the sommelier service. You should not need to modify this
# file as customizations may be placed in ~/.sommelierrc instead.
# For documentation, see:
set -e
# Set Xft.dpi. Some applications (e.g. Chrome) use this to detect HiDPI.
if command -v xdpyinfo >/dev/null && command -v xrdb >/dev/null; then
DPI=$(xdpyinfo | sed -n -E "/dots per inch/{s|^.* ([0-9]+)x.*$|\1|g; p}")
echo "Xft.dpi: ${DPI}" | xrdb -merge
if command -v xsetroot >/dev/null; then
xsetroot -cursor_name left_ptr
if [ -f ~/.sommelierrc ]; then
. ~/.sommelierrc
exit 0