From 79f69b4e996c0cb324e57cba977e1af9e1a08a4b Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Fri, 18 Oct 2024 12:24:53 +1030 Subject: [PATCH] fix: display scale for framework laptop --- .config/X11/Xresources | 2 ++ .config/alacritty/alacritty.toml | 2 +- .local/bin/scale-external-display.sh | 3 +++ .xinitrc | 38 ++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .config/X11/Xresources create mode 100755 .local/bin/scale-external-display.sh create mode 100644 .xinitrc diff --git a/.config/X11/Xresources b/.config/X11/Xresources new file mode 100644 index 0000000..4592b58 --- /dev/null +++ b/.config/X11/Xresources @@ -0,0 +1,2 @@ +# For laptop screen scale +Xft.dpi: 144 diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index 0276922..f461fc2 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -6,7 +6,7 @@ import = [ TERM = "xterm-256color" [font] -size = 11 +size = 10 [font.bold] family = "JetBrains Mono Nerd Font" diff --git a/.local/bin/scale-external-display.sh b/.local/bin/scale-external-display.sh new file mode 100755 index 0000000..bf3b319 --- /dev/null +++ b/.local/bin/scale-external-display.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +xrandr --output DP-3-1 --scale 1.5x1.5 diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..b6040ae --- /dev/null +++ b/.xinitrc @@ -0,0 +1,38 @@ +#!/bin/sh + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# start some nice programs + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +[[ -f ~/.config/X11/Xresources ]] && xrdb -merge -I$HOME ~/.config/X11/Xresources + +~/.local/bin/dwm-autostart & +exec dwm