Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Configuration file format for /etc/lightdm/slick-greeter.conf
# hidden-users=List of usernames (separated by semicolons) that are hidden until Ctr+Alt+Shift is pressed
# group-filter=List of groups that users must be part of to be shown (empty list shows all users)
# enable-hidpi=Whether to enable HiDPI support (on/off/auto)
# hidpi-detection-cutoff=DPI value above which the display is considered HiDPI when enable-hidpi is "auto" (144 by default)
# only-on-monitor=Sets the monitor on which to show the login window, -1 means "follow the mouse"
# stretch-background-across-monitors=Whether to stretch the background across multiple monitors (false by default)
# clock-format=What clock format to use (e.g., %H:%M or %l:%M %p)
Expand Down
16 changes: 15 additions & 1 deletion files/usr/bin/slick-greeter-check-hidpi
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,22 @@ from gi.repository import Gdk
import sys
import os
import syslog
import configparser

HIDPI_LIMIT = 192
HIDPI_LIMIT_DEFAULT = 144
CONF_PATH = "/etc/lightdm/slick-greeter.conf"

def get_hidpi_limit():
limit = HIDPI_LIMIT_DEFAULT
config = configparser.ConfigParser()
try:
if config.read(CONF_PATH) and config.has_option("Greeter", "hidpi-detection-cutoff"):
limit = config.getint("Greeter", "hidpi-detection-cutoff")
except Exception as detail:
syslog.syslog("Error while reading hidpi-detection-cutoff from %s: %s" % (CONF_PATH, detail))
return limit

HIDPI_LIMIT = get_hidpi_limit()

def get_window_scale():
window_scale = 1
Expand Down