Changed lots of things, too lazy to comment it all.
This commit is contained in:
@@ -17,7 +17,7 @@ URxvt.intensityStyles: false
|
||||
|
||||
URxvt.saveLines: 10000
|
||||
|
||||
URxvt.fading: 30
|
||||
URxvt.fading: 20
|
||||
|
||||
URxvt.termName: urxvt
|
||||
|
||||
|
||||
64
x/xinitrc
64
x/xinitrc
@@ -1,5 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
export LOGDIR="$HOME/.var/log/"
|
||||
export RUNDIR="$HOME/.var/run"
|
||||
|
||||
[[ ! -d "LOGDIR" ]] && mkdir -p "$LOGDIR"
|
||||
|
||||
LOGFILE="$LOGDIR/xinitrc.log"
|
||||
|
||||
log() {
|
||||
echo "[$(date +%FT%T)] $*" >> "$LOGFILE"
|
||||
}
|
||||
|
||||
log "START"
|
||||
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/*; do
|
||||
[ -x "$f" ] && . "$f"
|
||||
@@ -21,43 +34,78 @@ keyboard_repeat_speed=30
|
||||
# path and options for the wallpaper changer script
|
||||
path_wallchanger="$HOME/.i3/scripts/wallchanger.bash"
|
||||
wallpaper_directory="$HOME/pictures/wallpaper/misc"
|
||||
wallpaper_logfile="$HOME/.i3/logs/wallpaper.log"
|
||||
wallpaper_logfile="$LOGDIR/wallpaper.log"
|
||||
wallpaper_fallback="$HOME/.i3/data/wallpaper/"
|
||||
wallpaper_interval="900"
|
||||
|
||||
# redshift settings
|
||||
redshift_lat_long="49.5:11"
|
||||
redshift_colortemp="5500:3700"
|
||||
redshift_colortemp="5500:4000"
|
||||
|
||||
# start mpd
|
||||
if [[ -z "$(pgrep --euid hannes --exact "^mpd$")" ]] ; then
|
||||
log "mpd is not running, starting mpd"
|
||||
mpd "$HOME/.mpd/mpd.conf"
|
||||
else
|
||||
log "mpd already running, will not start another instance"
|
||||
fi
|
||||
|
||||
# start the pulseaudio volume control tray applet
|
||||
log "starting pasystray"
|
||||
pasystray &
|
||||
|
||||
# start dropbox
|
||||
log "starting dropboxd"
|
||||
dropboxd &
|
||||
|
||||
# start the wallpaper changer
|
||||
log "starting $path_wallchanger"
|
||||
$path_wallchanger "$wallpaper_directory" "$wallpaper_interval" "$wallpaper_fallback" > "$wallpaper_logfile" &
|
||||
|
||||
# start redshift
|
||||
log "starting redshift-gtk"
|
||||
redshift-gtk -l "$redshift_lat_long" -t "$redshift_colortemp" &
|
||||
|
||||
# set keyboard layout
|
||||
log "setting keyboard layout"
|
||||
setxkbmap -layout "$keyboard_layout" -variant "$keyboard_variant" &
|
||||
|
||||
# set key repeat delay
|
||||
log "setting key repeat delay"
|
||||
xset r rate "$keyboard_repeat_delay" "$keyboard_repeat_speed" &
|
||||
|
||||
# execute the host-specific .xinitrc-addition
|
||||
hostfile="$HOME/.xinitrc.d/$(hostname).xinitrc"
|
||||
[[ -f "$hostfile" ]] && bash "$hostfile" &
|
||||
log "looking for host specific xinitrc addition at $hostfile"
|
||||
if [[ -f "$hostfile" ]] ; then
|
||||
log "found it. executing"
|
||||
bash "$hostfile" &
|
||||
else
|
||||
log "found none"
|
||||
fi
|
||||
|
||||
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources &
|
||||
if [[ -f ~/.Xresources ]] ; then
|
||||
log "found ~/.Xresources, merging it into xrdb"
|
||||
xrdb -merge ~/.Xresources &
|
||||
else
|
||||
log "~/.Xresources not found"
|
||||
fi
|
||||
|
||||
LOG="$HOME/.i3/logs/i3.log"
|
||||
LOGOLD="$HOME/.i3/logs/i3.log.old"
|
||||
I3_LOG="$LOGDIR/i3/i3.log"
|
||||
I3_LOGOLD="${I3_LOG}.old"
|
||||
|
||||
# simple logrotate so we can still get info about the last session
|
||||
[[ -f "$LOG" ]] && mv -f "$LOG" "$LOGOLD"
|
||||
if [[ -f "$I3_LOG" ]] ; then
|
||||
log "moving old i3 log at $I3_LOG to $I3_LOGOLD"
|
||||
mv -f "$I3_LOG" "$I3_LOGOLD"
|
||||
fi
|
||||
|
||||
[[ ! -d "$(dirname $I3_LOG)" ]] && mkdir -p "$(dirname $I3_LOG)"
|
||||
|
||||
log "generating i3 config"
|
||||
|
||||
|
||||
SESSION_CONF=$(bash "$HOME/.i3/scripts/genconfig.bash")
|
||||
exec i3 -c "$SESSION_CONF" >> ~/.i3/logs/i3.log
|
||||
log "generated, starting i3"
|
||||
exec i3 -c "$SESSION_CONF" >> "$LOGDIR/i3/i3.log"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user