mirror of
				https://github.com/kastdeur/dotfiles.git
				synced 2025-10-31 03:06:35 +01:00 
			
		
		
		
	[X11]: rewrote xinitrc, moved to xprofile instead of xsession
This commit is contained in:
		
							parent
							
								
									4a1ee2deb0
								
							
						
					
					
						commit
						08ae066a7a
					
				
					 4 changed files with 47 additions and 59 deletions
				
			
		|  | @ -22,7 +22,7 @@ | |||
|     ~/.tmux.conf: tmux/tmux.conf | ||||
|     ~/.vimrc: vim/vimrc | ||||
|     ~/.xinitrc: X11/xinitrc | ||||
|     ~/.xsession: X11/xsession | ||||
|     ~/.xprofile: X11/xprofile | ||||
|     ~/.Xresources: X11/Xresources | ||||
|     ~/.Xresources.d/urxvt: urxvt/Xresources | ||||
|     ~/.config/user-dirs.dirs: X11/user-dirs.dirs | ||||
|  |  | |||
							
								
								
									
										74
									
								
								X11/xinitrc
									
										
									
									
									
								
							
							
						
						
									
										74
									
								
								X11/xinitrc
									
										
									
									
									
								
							|  | @ -1,5 +1,11 @@ | |||
| #!/bin/sh | ||||
| #Standard Stuff | ||||
| 
 | ||||
| # Default values for session and term | ||||
| [ "$1" ] || set -- cinnamon | ||||
| 
 | ||||
| TERM=urxvt | ||||
| 
 | ||||
| # Source the Standard Stuff from this machine | ||||
| . /etc/X11/xinit/xinitrc-common | ||||
| if [ -f $HOME/.Xclients ]; then | ||||
|     exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients || \ | ||||
|  | @ -15,60 +21,22 @@ else | |||
|     [ -x /usr/bin/xterm ] && xterm -geometry 80x50-50+150 & | ||||
|     [ -x /usr/bin/twm ] && /usr/bin/twm | ||||
| fi | ||||
| # --------------------------------------------------------------- | ||||
| #	 OWN | ||||
| # --------------------------------------------------------------- | ||||
| 
 | ||||
| # Load Main Xresources | ||||
| [ -f ~/.Xresources ] && xrdb -merge $HOME/.Xresources | ||||
| # Source the xprofile files | ||||
| [ -f /etc/xprofile ] && . /etc/xprofile | ||||
| [ -f ~/.xprofile ] && . ~/.xprofile | ||||
| 
 | ||||
| # Load specific Xresources | ||||
| XRESD="$HOME/.Xresources.d/" | ||||
| for f in "$XRESD*" | ||||
| do | ||||
| 	xrdb -merge "$f" | ||||
| done | ||||
| 
 | ||||
| numlockx on # turn on numlock | ||||
| setxkbmap -option caps:escape # caps lock works as escape | ||||
| 
 | ||||
| 
 | ||||
| # Load session | ||||
| DEFAULT_SESSION="awesome >> $HOME/.cache/awesome/stdout 2>> $HOME/.cache/awesome/stderr" | ||||
| XTERM=xterm | ||||
| # Set Desktop or Window Manager | ||||
| case $1 in | ||||
| 	xfce4) | ||||
| 		RUN=startxfce4 | ||||
| 		;; | ||||
| 	awesome) | ||||
| 		xscreensaver -nosplash & | ||||
| 		nm-applet & | ||||
| 		RUN=awesome | ||||
| 		;; | ||||
| 	enlightenment) | ||||
| 		RUN=enlightenment_start | ||||
| 		;; | ||||
| 	openbox) | ||||
| 		RUN=openbox | ||||
| 		;; | ||||
| 	cinnamon) | ||||
| 		RUN=cinnamon | ||||
| 		;; | ||||
| 	kde) | ||||
| 		RUN=startkde | ||||
| 		;; | ||||
| 	gnome) | ||||
| 		RUN=gnome-session | ||||
| 		;; | ||||
| 	unity) | ||||
| 		RUN=unity | ||||
| 		;; | ||||
| 	xterm) | ||||
| 		RUN=xterm | ||||
| 		;; | ||||
| 	*) | ||||
| 		RUN=$DEFAULT_SESSION | ||||
| 		;; | ||||
| 	cinnamon)	set -- cinnamon-session;; | ||||
| 	gnome)		set -- gnome-session;; | ||||
| 	kde)		set -- startkde;; | ||||
| 	xfce)		set -- xfce4-session;; | ||||
| 	awesome)	set -- awesome;; | ||||
| 	enlightenment) set -- enlightenment_start;; | ||||
| esac | ||||
| 
 | ||||
| exec "$RUN" || exec "$XTERM" | ||||
| # Run the session, if it doesn't work try TERM, | ||||
| # finally fallback to xterm if there's nothing | ||||
| exec "$@" || exec "$TERM" || exec xterm | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										25
									
								
								X11/xprofile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								X11/xprofile
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | |||
| #~/bin/sh | ||||
| 
 | ||||
| # This file is the equivalent of .profile when using X. | ||||
| # It is hopefully sourced by the DE.  | ||||
| # It is definitely sourced from .xinitrc  | ||||
| 
 | ||||
| # Merge the Main Xresources | ||||
| [ -f ~/.Xresources ] && xrdb -merge $HOME/.Xresources | ||||
| 
 | ||||
| # Turn on numlock | ||||
| numlockx on | ||||
| 
 | ||||
| # Caps Lock works as escape key: whoever uses CapsLock? | ||||
| setxkbmap -option caps:escape | ||||
| 
 | ||||
| # Start redshift if it exists | ||||
| if [[ $(command -v redshift) ]]; then | ||||
| 	redshift & | ||||
| fi | ||||
| # See if we can set the background using feh | ||||
| [ -x ~/.fehbg ] && ~/.fehbg | ||||
| 
 | ||||
| # Source the local xprofiles | ||||
| [ -r ~/.xprofile.local ] && . ~/.xprofile.local | ||||
| [ -r ~/.local/.xprofile ] && . ~/.local/.xprofile | ||||
|  | @ -1,5 +0,0 @@ | |||
| #!/bin/bash | ||||
| 
 | ||||
| if [[ $(command -v redshift) ]]; then | ||||
| 	redshift & | ||||
| fi | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue