update startup xorgs scripts

This commit is contained in:
Daylin Morgan 2022-05-15 09:42:55 -05:00
parent 48c4084ffb
commit 4dae99b7ef
4 changed files with 66 additions and 2 deletions

View file

@ -2,6 +2,7 @@
bin/lock
.xinitrc
.xprofile
.zprofile
.config/alacritty
.config/leftwm
.config/autorandr

5
home/dot_zprofile Normal file
View file

@ -0,0 +1,5 @@
# startx automatically if on first tty
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
startx
logout
fi

View file

@ -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

View file

@ -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 --addmode eDP1 "1920x1080_60.00"
xss-lock -- ~/bin/lock &
xsetroot -cursor_name left_ptr