43 lines
810 B
Bash
43 lines
810 B
Bash
#!/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
|
|
|
|
#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 &
|
|
|
|
|
|
|
|
while true; do
|
|
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
|
|
done &
|
|
|
|
|
|
|
|
exec /home/frank/Programmation/dwm/dwm
|
|
|
|
|
|
|
|
|
|
#exec gnome-session
|
|
# exec startkde
|
|
# exec startxfce4
|
|
# ...or the Window Manager of your choice
|