From 30e6af7b65ab3b05cdd824c05a4c38cabc6555f6 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 6 May 2024 17:18:55 +0300 Subject: [PATCH] I also have got non-HiDPI display --- wish/.wishrc | 8 +++++--- x/.xinitrc | 7 +++++-- x/bin/mylock | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/wish/.wishrc b/wish/.wishrc index 2fa31fa..2bb5a40 100644 --- a/wish/.wishrc +++ b/wish/.wishrc @@ -1,4 +1,6 @@ -font create myDefaultFont -family Go -size 14 -option add *font myDefaultFont -tk scaling [expr {163 / 72.0}] +if {[file exists /tmp/hidpi]} { + font create myDefaultFont -family Go -size 12 + option add *font myDefaultFont + tk scaling [expr {163 / 72.0}] +} tk_setPalette grey diff --git a/x/.xinitrc b/x/.xinitrc index db58c85..20dee4a 100755 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -1,8 +1,11 @@ #!/bin/zsh xsetroot -solid \#222222 -xset s off b off -dpms -xset m 4 1 +[[ -e /tmp/hidpi ]] && { + xset s off b off -dpms + xset m 4 1 + xsetroot -xcf /usr/local/share/icons/whiteglass/cursors/left_ptr 28 +} setxkbmap -rules xorg -layout us,ru -option grp:caps_toggle,grp_led:caps xrdb ~/.Xresources xmodmap ~/.Xmodmap diff --git a/x/bin/mylock b/x/bin/mylock index e123f5b..0a3554c 100755 --- a/x/bin/mylock +++ b/x/bin/mylock @@ -1,6 +1,6 @@ #!/bin/sh -xset dpms force off +[ -e /tmp/hidpi ] && || xset dpms force off gpgconf --reload gpg-agent SSH_AUTH_SOCK=$HOME/.ssh/agent ssh-add -D slock -- 2.44.0