From 4dae99b7ef9ec09323ba14a030316a610d7accb7 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sun, 15 May 2022 09:42:55 -0500 Subject: [PATCH] update startup xorgs scripts --- home/.chezmoiignore | 1 + home/dot_zprofile | 5 ++++ home/executable_dot_xinitrc | 57 +++++++++++++++++++++++++++++++++++- home/executable_dot_xprofile | 5 +++- 4 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 home/dot_zprofile diff --git a/home/.chezmoiignore b/home/.chezmoiignore index 4009c08..f174586 100644 --- a/home/.chezmoiignore +++ b/home/.chezmoiignore @@ -2,6 +2,7 @@ bin/lock .xinitrc .xprofile +.zprofile .config/alacritty .config/leftwm .config/autorandr diff --git a/home/dot_zprofile b/home/dot_zprofile new file mode 100644 index 0000000..7357e6f --- /dev/null +++ b/home/dot_zprofile @@ -0,0 +1,5 @@ +# startx automatically if on first tty +if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then + startx + logout +fi diff --git a/home/executable_dot_xinitrc b/home/executable_dot_xinitrc index bf6e3a0..c83c1e9 100644 --- a/home/executable_dot_xinitrc +++ b/home/executable_dot_xinitrc @@ -1,3 +1,58 @@ #!/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 ~/.xprofile ] && . ~/.xprofile + +eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) +export SSH_AUTH_SOCK + +# $1 is xterm +# $2 is the wm arg passed to startx +# i.e. startx plasma + +case $2 in + leftwm) + exec leftwm + ;; + plasma) + export DESKTOP_SESSION=plasma + exec startplasma-x11 + ;; + xmonad) + xmonad + ;; + *) + exec leftwm + ;; +esac -. ~/.xprofile diff --git a/home/executable_dot_xprofile b/home/executable_dot_xprofile index 88a6ecc..1d1c175 100644 --- a/home/executable_dot_xprofile +++ b/home/executable_dot_xprofile @@ -1,8 +1,11 @@ #!/bin/sh +# enable touch on only laptop monitor xinput --map-to-output 'ELAN901C:00 04F3:2C29' eDP1 -xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync +xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync xrandr --addmode eDP1 "1920x1080_60.00" xss-lock -- ~/bin/lock & + +xsetroot -cursor_name left_ptr