Cleanup configs for no DM, fix gksu issues, add addditional configs
This commit is contained in:
@ -3,30 +3,7 @@
|
||||
# this file is executed when calling startx
|
||||
|
||||
# To run different WM, run:
|
||||
# startx ~/.xinitrc SESSION
|
||||
# eg. startx ~/.xinitrc openbox
|
||||
|
||||
# Commands for autologin with Systemd & Arch
|
||||
# No editing files or messing about required
|
||||
#--------------------------------------#
|
||||
# This copies the default getty service file so we can modify it
|
||||
# 1. sudo cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service
|
||||
|
||||
# This removes the existing link and creates a link to the file copied above
|
||||
# 2. sudo rm -f /etc/systemd/system/getty.target.wants/getty@tty1.service && sudo ln -s /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
|
||||
|
||||
# This command sets your user as the autologin user
|
||||
# 3. sudo sed -i "/ExecStart/ c ExecStart=-/sbin/agetty -a ${USER} %I \$TERM" /etc/systemd/system/autologin@.service
|
||||
|
||||
# This command will back up existing ~/.zprofile or ~/.bash_profile
|
||||
# 4. for f in $HOME/.{zprofile,bash_profile}; do if [[ -f $f ]]; then mv $f $HOME/${f}.bak; fi; done
|
||||
|
||||
# This command creates a new ~/.zprofile & ~/.bash_profile.. you can delete the one you don't need
|
||||
# 5. for x in $HOME/.{zprofile,bash_profile}; do echo -e "# $x\n\nif [[ \$DISPLAY ]] && [[ -n \$XDG_VTNR ]] && [[ \$XDG_VTNR -eq 1 ]]; then\n exec startx\nfi\n" > $x; done
|
||||
|
||||
# Finish up
|
||||
# 6. Remove Your Current Display Manager and Reboot!!
|
||||
#--------------------------------------#
|
||||
# startx ~/.xinitrc WM
|
||||
|
||||
|
||||
# Session to run if none given
|
||||
@ -38,7 +15,6 @@ export WM="$session"
|
||||
# bspwm requires this to be set
|
||||
export XDG_CONFIG_HOME=$HOME/.config
|
||||
|
||||
|
||||
# Default Arch xinit scripts
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/*.sh; do
|
||||
@ -63,11 +39,16 @@ if [ -f ~/.xprofile ]; then
|
||||
source ~/.xprofile
|
||||
fi
|
||||
|
||||
# keyring for storing passwords
|
||||
gnome-keyring-daemon --start --components=pkcs11 &
|
||||
|
||||
# run policy kit
|
||||
lxpolkit &
|
||||
if hash gnome-keyring &>/dev/null; then
|
||||
# keyring for storing passwords
|
||||
gnome-keyring-daemon --start --components=pkcs11 &
|
||||
fi
|
||||
|
||||
if [ -x "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" ]; then
|
||||
# run policy kit
|
||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||
fi
|
||||
|
||||
# keyboard repeat rate
|
||||
kbdrate -d 400 -r 50
|
||||
@ -79,9 +60,6 @@ xset s 3600 3600
|
||||
|
||||
# Do NOT put code below this case statement
|
||||
case $session in
|
||||
dwm)
|
||||
exec dwm
|
||||
;;
|
||||
i3|i3wm)
|
||||
exec i3
|
||||
;;
|
||||
@ -94,6 +72,9 @@ case $session in
|
||||
openbox)
|
||||
exec openbox-session
|
||||
;;
|
||||
dwm)
|
||||
exec dwm
|
||||
;;
|
||||
*)
|
||||
exec "$1" # Unknown, try running it
|
||||
esac
|
||||
|
Reference in New Issue
Block a user