From 31ed35fee0152242ad74f0364119ecc7c00e3ad7 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sat, 22 Feb 2025 12:04:58 -0600 Subject: optimize x11 config --- x11/Xresources.desktop | 4 ---- x11/Xresources.hidpi | 4 ++++ x11/Xresources.hp-envy-office | 1 + x11/Xresources.optiplex | 1 + x11/xinitrc | 6 +++--- x11/xprofile | 5 ++--- x11/xprofile.T495 | 2 +- x11/xprofile.hp-envy-office | 4 ---- 8 files changed, 12 insertions(+), 15 deletions(-) delete mode 100755 x11/Xresources.desktop create mode 100755 x11/Xresources.hidpi create mode 120000 x11/Xresources.hp-envy-office create mode 120000 x11/Xresources.optiplex diff --git a/x11/Xresources.desktop b/x11/Xresources.desktop deleted file mode 100755 index c59bda5..0000000 --- a/x11/Xresources.desktop +++ /dev/null @@ -1,4 +0,0 @@ -Xft.dpi: 144 - -Xcursor.theme: Adwaita -Xcursor.size: 36 diff --git a/x11/Xresources.hidpi b/x11/Xresources.hidpi new file mode 100755 index 0000000..c59bda5 --- /dev/null +++ b/x11/Xresources.hidpi @@ -0,0 +1,4 @@ +Xft.dpi: 144 + +Xcursor.theme: Adwaita +Xcursor.size: 36 diff --git a/x11/Xresources.hp-envy-office b/x11/Xresources.hp-envy-office new file mode 120000 index 0000000..5fe298e --- /dev/null +++ b/x11/Xresources.hp-envy-office @@ -0,0 +1 @@ +Xresources.hidpi \ No newline at end of file diff --git a/x11/Xresources.optiplex b/x11/Xresources.optiplex new file mode 120000 index 0000000..5fe298e --- /dev/null +++ b/x11/Xresources.optiplex @@ -0,0 +1 @@ +Xresources.hidpi \ No newline at end of file diff --git a/x11/xinitrc b/x11/xinitrc index 261a42b..4302948 100755 --- a/x11/xinitrc +++ b/x11/xinitrc @@ -1,7 +1,7 @@ #!/bin/sh -X11CONFIG=${X11CONFIG:=${XDG_CONFIG_HOME:+$XDG_CONFIG_HOME/x11}}; X11CONFIG=${X11CONFIG:-$HOME/.config/x11} +X11CONFIG=${X11CONFIG:=${XDG_CONFIG_HOME:+$XDG_CONFIG_HOME/x11}}; export X11CONFIG=${X11CONFIG:-$HOME/.config/x11} if [ ! "$SKIPCONFIG" ]; then - X11CONFIG=$X11CONFIG $X11CONFIG/xprofile - [ -e $X11CONFIG/xprofile.$(hostname) ] && X11CONFIG=$X11CONFIG $X11CONFIG/xprofile.$(hostname) + $X11CONFIG/xprofile + [ -e $X11CONFIG/xprofile.$(hostname) ] && $X11CONFIG/xprofile.$(hostname) fi exec dbus-launch --exit-with-session ${WM:-timmywm} diff --git a/x11/xprofile b/x11/xprofile index af4895c..c0e445a 100755 --- a/x11/xprofile +++ b/x11/xprofile @@ -1,7 +1,6 @@ #!/bin/sh -# TODO make nicer -XRESOURCES=$X11CONFIG/Xresources.$(hostname); [ -f "$XRESOURCES" ] || XRESOURCES=$X11CONFIG/Xresources -#xrdb -merge $X11CONFIG/Xresources -merge $X11CONFIG/Xresources.$(hostname) 2>/dev/null & xrdbpid=$! +XRESOURCES=${XRESOURCES:-$X11CONFIG/Xresources.$(hostname)} +[ -f "$XRESOURCES" ] || XRESOURCES=$X11CONFIG/Xresources xrdb -merge $XRESOURCES 2>/dev/null & xrdbpid=$! redshift & unclutter -noevents & diff --git a/x11/xprofile.T495 b/x11/xprofile.T495 index 124c45e..46470e6 100755 --- a/x11/xprofile.T495 +++ b/x11/xprofile.T495 @@ -8,7 +8,7 @@ xinput --set-prop "SynPS/2 Synaptics TouchPad" "libinput Disable While Typing En # docking station if xrandr | grep "HDMI-A-0 connected 3840x2160" > /dev/null; then - xrdb -merge $X11CONFIG/Xresources.desktop 2>/dev/null & xrdbpid=$! + xrdb -merge $X11CONFIG/Xresources.hidpi 2>/dev/null & xrdbpid=$! input-leaps --config "$XDG_CONFIG_HOME/input-leap/input-leap.conf" --disable-crypto & # make HDMI-A-0 the primary display diff --git a/x11/xprofile.hp-envy-office b/x11/xprofile.hp-envy-office index 4236f3c..3a554a0 100755 --- a/x11/xprofile.hp-envy-office +++ b/x11/xprofile.hp-envy-office @@ -1,8 +1,4 @@ #!/bin/sh -xrdb -merge $X11CONFIG/Xresources.desktop 2>/dev/null & xrdbpid=$! - # set options for unicomp pointer xinput set-prop "pointer:Unicomp Inc Unicomp 10x Kbrd R7_2_w_PS_R7_38" "libinput Scroll Method Enabled" 0 0 1 # enable scroll while holding left + right mouse xinput set-prop "pointer:Unicomp Inc Unicomp 10x Kbrd R7_2_w_PS_R7_38" "Coordinate Transformation Matrix" 2.5 0 0 0 2.5 0 0 0 1 # speed up trackpoint - -wait $xrdbpid # wait for xrdb like in base xprofile -- cgit v1.2.3