dotfiles/xinitrc

44 lines
810 B
Text
Raw Normal View History

2013-06-02 11:02:37 +00:00
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
2013-06-02 18:38:35 +00:00
#DWM
#First, choose the wallpaper (important, isn't it ? :p)
wallpaper_path=/home/frank/Pictures/wallpapers/
image=$(ls $wallpaper_path | grep -E '(jpg|png)$' | sort -R | tail -1)
feh --bg-scale $wallpaper_path/$image &
2013-06-02 11:02:37 +00:00
while true; do
2013-06-02 18:38:35 +00:00
DATE=`date +"%F, %H:%M:%S - %s"`
BATT=$( acpi -b | sed 's/.*[charg.|], \([0-9]*\)%.*/\1/gi' )
# STATUS=$( acpi -b | sed 's/.*: \([a-zA-Z]*\),.*/\1/gi' )
xsetroot -name "$MEM :: $BATT :: $DATE"
sleep 2
2013-06-02 11:02:37 +00:00
done &
2013-06-02 18:38:35 +00:00
2013-06-02 11:02:37 +00:00
exec /home/frank/Programmation/dwm/dwm
2013-06-02 18:38:35 +00:00
#exec gnome-session
2013-06-02 11:02:37 +00:00
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice