Now understood how xinitrc and xprofile files work
Now it should work correctly which DM, a problem that I did not know it didn't worked.
This commit is contained in:
parent
33d5277a13
commit
9497ba3762
58
xinitrc
58
xinitrc
|
@ -1,56 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# ~/.xinitrc
|
# ~/.xinitrc
|
||||||
#
|
#
|
||||||
# Executed by startx (run your window manager from here)
|
# Executed by startx (run your window manager from here)
|
||||||
#
|
|
||||||
|
|
||||||
[ -f ~/.Xresources ] && xrdb -merge -I$HOME ~/.Xresources
|
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
||||||
|
for f in /etc/X11/xinit/xinitrc.d/*; do
|
||||||
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
|
[ -x "$f" ] && . "$f"
|
||||||
|
done
|
||||||
found=0
|
unset f
|
||||||
tryDM() {
|
|
||||||
if [ $found -eq 0 ]; then
|
|
||||||
parameters=''
|
|
||||||
case $1 in
|
|
||||||
awesome ) executable=awesome;;
|
|
||||||
bspwm ) executable=bspwm;;
|
|
||||||
catwm ) executable=catwm;;
|
|
||||||
cinnamon ) executable=cinnamon-session;;
|
|
||||||
dwm ) executable=dwm;;
|
|
||||||
enlightenment ) executable=enlightenment_start;;
|
|
||||||
ede ) executable=startede;;
|
|
||||||
fluxbox ) executable=startfluxbox;;
|
|
||||||
gnome ) executable=gnome-session;;
|
|
||||||
gnome-classic ) executable=gnome-session; parameters="--session=gnome-classic";;
|
|
||||||
i3|i3wm ) executable=i3;;
|
|
||||||
icewm ) executable=icewm-session;;
|
|
||||||
jwm ) executable=jwm;;
|
|
||||||
kde ) executable=startkde;;
|
|
||||||
mate ) executable=mate-session;;
|
|
||||||
monster|monsterwm ) executable=monsterwm;;
|
|
||||||
notion ) executable=notion;;
|
|
||||||
openbox ) executable=openbox-session;;
|
|
||||||
unity ) executable=unity;;
|
|
||||||
xfce|xfce4 ) executable=startxfce4;;
|
|
||||||
xmonad ) executable=xmonad;;
|
|
||||||
*) executabke=$1;;
|
|
||||||
esac
|
|
||||||
path=$(which $executable 2> /dev/null)
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
found=1
|
|
||||||
exec $path $parameters
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ ! -z $1 ]; then
|
|
||||||
tryDM $1
|
|
||||||
fi
|
fi
|
||||||
tryDM i3
|
|
||||||
tryDM xfce4
|
[ -f /etc/xprofile ] && source /etc/xprofile
|
||||||
tryDM mate
|
[ -f ~/.xprofile ] && source ~/.xprofile
|
||||||
tryDM gnome
|
|
||||||
tryDM kde
|
|
||||||
|
|
57
xprofile
Normal file
57
xprofile
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# ~/.xprofile
|
||||||
|
#
|
||||||
|
# sourced by your display manager
|
||||||
|
#
|
||||||
|
|
||||||
|
[ -f ~/.Xresources ] && xrdb -merge -I$HOME ~/.Xresources
|
||||||
|
|
||||||
|
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
|
||||||
|
|
||||||
|
found=0
|
||||||
|
tryDM() {
|
||||||
|
if [ $found -eq 0 ]; then
|
||||||
|
parameters=''
|
||||||
|
case $1 in
|
||||||
|
awesome ) executable=awesome;;
|
||||||
|
bspwm ) executable=bspwm;;
|
||||||
|
catwm ) executable=catwm;;
|
||||||
|
cinnamon ) executable=cinnamon-session;;
|
||||||
|
dwm ) executable=dwm;;
|
||||||
|
enlightenment ) executable=enlightenment_start;;
|
||||||
|
ede ) executable=startede;;
|
||||||
|
fluxbox ) executable=startfluxbox;;
|
||||||
|
gnome ) executable=gnome-session;;
|
||||||
|
gnome-classic ) executable=gnome-session; parameters="--session=gnome-classic";;
|
||||||
|
i3|i3wm ) executable=i3;;
|
||||||
|
icewm ) executable=icewm-session;;
|
||||||
|
jwm ) executable=jwm;;
|
||||||
|
kde ) executable=startkde;;
|
||||||
|
mate ) executable=mate-session;;
|
||||||
|
monster|monsterwm ) executable=monsterwm;;
|
||||||
|
notion ) executable=notion;;
|
||||||
|
openbox ) executable=openbox-session;;
|
||||||
|
unity ) executable=unity;;
|
||||||
|
xfce|xfce4 ) executable=startxfce4;;
|
||||||
|
xmonad ) executable=xmonad;;
|
||||||
|
*) executable=$1;;
|
||||||
|
esac
|
||||||
|
path=$(which $executable 2> /dev/null)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
found=1
|
||||||
|
exec $path $parameters
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ! -z $1 ]; then
|
||||||
|
tryDM $1
|
||||||
|
fi
|
||||||
|
tryDM i3
|
||||||
|
tryDM xfce4
|
||||||
|
tryDM mate
|
||||||
|
tryDM gnome
|
||||||
|
tryDM kde
|
||||||
|
|
Loading…
Reference in a new issue