|
|
发表于 2009-5-7 18:19:38
|
显示全部楼层
我的xinitrc
[j@myhost ~]$ cat /etc/xdg/jdesktop/xinitrc
#!/bin/sh
# fix broken $UID on some system...
#if test "x$UID" = "x"; then
# if test -x /usr/xpg4/bin/id; then
# UID=`/usr/xpg4/bin/id -u`;
# else
# UID=`id -u`;
# fi
#fi
# $XDG_CONFIG_HOME defines the base directory relative to which user specific
# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
# or empty, a default equal to $HOME/.config should be used.
#if test "x$XDG_CONFIG_HOME" = "x" ; then
# XDG_CONFIG_HOME=$HOME/.config
#fi
#[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
# $XDG_CACHE_HOME defines the base directory relative to which user specific
# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
# set or empty, a default equal to $HOME/.cache should be used.
#if test "x$XDG_CACHE_HOME" = "x" ; then
# XDG_CACHE_HOME=$HOME/.cache
#fi
#[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
# For now, start with an empty list
#XRESOURCES=""
# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
#test -r "/etc/xdg/jdesktop/Xft.xrdb" && XRESOURCES="$XRESOURCES /etc/xdg/jdesktop/Xft.xrdb"
#test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"
#BASEDIR=$XDG_CONFIG_HOME/jdesktop
#if test -r "$BASEDIR/Xft.xrdb"; then
# XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
#elif test -r "$XFCE4HOME/Xft.xrdb"; then
# mkdir -p "$BASEDIR"
# cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
# XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
#fi
# merge in X cursor settings
#test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"
# ~/.Xresources contains overrides to the above
#test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
#cat /dev/null $XRESOURCES | xrdb -nocpp -merge -
# load local modmap
#test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
# Use dbus-launch if installed.
if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
dbuslaunch=`which dbus-launch`
if test x"$dbuslaunch" != x"" -a x"$dbuslaunch" != x"no"; then
eval `$dbuslaunch --sh-syntax --exit-with-session`
fi
fi
##################
# IMPORTANT NOTE #
##################
# Everything below here ONLY gets executed if you are NOT using jdesktop-session
# (jDesktop's session manager). If you are using the session manager, everything
# below is handled by it, and the code below is not executed at all. If you're
# not sure if you're using the session manager, type 'ps -e|grep jdesktop-session'
# in a terminal while jdesktop is running.
##################
# this is only necessary when running w/o xfce4-session
#xsetroot -solid dark -cursor_name watch
# or use old-fashioned startup script otherwise
#xfwm4 --daemon
#fusion-icon -u
#BGL_ALWAYS_INDIRECT=1 INTEL_BATCH=1 compiz --replace --indirect-rendering --sm-disable ccp &
metacity --sm-disable --no-composite &
sleep 1
#avant-window-navigator
#gnome-settings-daemon
#gnome-power-manager
#sleep 1
#gnome-panel
#lxpanel
#xterm
#xsetroot -bitmap /home/j/Books/SCTOs.xbm #-bg black -fg red -solid black -cursor_name watch
#Wallpaper shifts between day and night and appears over differences on weekend
TIME=`env LANG="en_US.UTF-8" date`
day_night ()
{
shift=0
if [ $1 -lt 6 ]
then
shift=-1
fi
if [ $1 -ge 19 ]
then
shift=1
fi
echo $shift
}
day_week ()
{
shift=0
if [ $1 == "Fri" ]
then
shift=1
fi
if [ $1 == "Sat" ]
then
shift=2
fi
if [ $1 == "Sun" ]
then
shift=3
fi
echo $shift
}
WALL_DAY="/Share/Walls/TobagoCays.jpg"
WALL_NIGHT="/Share/Walls/marstwins.jpg"
WALL_WEEK_DAY="/Share/Walls/beach.jpg"
WALL_WEEK_NIGHT="/Share/Walls/Sealife.jpg"
WALL=
SHIFT_DAY=$(day_night `echo $TIME|cut -d" " -f4|cut -d":" -f1`)
SHIFT_WEEK=$(day_week `echo $TIME|cut -d" " -f1`)
if [ $SHIFT_WEEK -eq 0 ]
then
if [ $SHIFT_DAY -eq 0 ]
then
WALL=$WALL_DAY
else
WALL=$WALL_NIGHT
fi
fi
if [ $SHIFT_WEEK -eq 1 ]
then
if [ $SHIFT_DAY -eq 0 ]
then
WALL=$WALL_DAY
fi
if [ $SHIFT_DAY -eq -1 ]
then
WALL=$WALL_NIGHT
fi
if [ $SHIFT_DAY -eq 1 ]
then
WALL=$WALL_WEEK_NIGHT
fi
fi
if [ $SHIFT_WEEK -eq 2 ]
then
if [ $SHIFT_DAY -eq 0 ]
then
WALL=$WALL_WEEK_DAY
fi
if [ $SHIFT_DAY -eq 1 ]
then
WALL=$WALL_WEEK_NIGHT
fi
fi
if [ $SHIFT_WEEK -eq 3 ]
then
if [ $SHIFT_DAY -eq 0 ]
then
WALL=$WALL_WEEK_DAY
fi
if [ $SHIFT_DAY -eq -1 ]
then
WALL=$WALL_WEEK_NIGHT
fi
if [ $SHIFT_DAY -eq 1 ]
then
WALL=$WALL_NIGHT
fi
fi
Esetroot -fit $WALL &
#Esetroot -fit /Share/Walls/marstwins.jpg &
sleep 2
syndaemon -t -d
batterymon &
#stalonetray &
tilda & # use F1 toggle
#env LANG="zh_CN.UTF-8" conky -y 700 -d
#adesklets --do-it-once
#ibus-daemon -r -x -d
#sleep 1
env LANG="zh_CN.UTF-8" bmpanel #arch
#env LANG="zh_CN.UTF-8" icewm |
|