perjantai 31. tammikuuta 2014

Here is a tip how you get date and time displayed in the status bar of dwm window manager when installing it from the ubuntu or debian repository and are using a login manager. The commands are run as root. I use vim as my editor. If you are following these instructions replace vim with your own editor.

Copy the dwm xsession configuration entry:

cp /usr/share/xsessions/dwm.desktop /usr/share/xsessions/dwm-with-time.desktop

Edit the configuration:

vim /usr/share/xsessions/dwm-with-time.desktop

[Desktop Entry]
Encoding=UTF-8
Name=Dwm with time in status bar
Comment=Dynamic window manager
Exec=dwm-with-time
Icon=dwm
Type=XSession

Create the script that starts dwm:

vim /usr/local/bin/dwm-with-time

#!/bin/sh
while true; do
 xsetroot -name "$( date +"%F %R" )"
 sleep 1m
done &
exec dwm

Now select "Dwm with time in status bar" from the login manager and enjoy.

Ei kommentteja:

Lähetä kommentti