Skip to content

Instantly share code, notes, and snippets.

@arsane
Created November 9, 2010 03:28
Show Gist options
  • Save arsane/668647 to your computer and use it in GitHub Desktop.
Save arsane/668647 to your computer and use it in GitHub Desktop.
dwm bootup
#!/bin/bash
DIR=${HOME}/.dwm
if [ -f "${DIR}"/dwmrc ]; then
/bin/sh "${DIR}"/dwmrc &
else
while true; do
xsetroot -name "`date`"
sleep 1
done &
fi
# set up background.
WALLPAPERS="/usr/share/backgrounds"
while true; do
ALIST=( `ls -w1 $WALLPAPERS | grep jpg`)
RANGE=${#ALIST[*]}
SHOW=$(( $RANDOM % $RANGE ))
feh --bg-scale $WALLPAPERS/${ALIST[$SHOW]}
sleep 300
done &
#ibus-daemon -d
exec /usr/bin/dwm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment