I like cwm -- my cwm desktop makes for a nice clean screenshot (nothing at all on a dark background). The normal way, I suppose, of autostarting applications in cwm is to start them in .xinitrc. The next question to ask is "How do I get my login manager to execute my .xinitrc?" It can be done nicely using x11/slim, which will pass the exec line from the chosen session file to your ~/.xinitrc. For cwm the session file (/usr/local/share/xsessions/cwm.desktop) defines the command to be executed as "cwm", so your ~/.xinitrc can start all of the applications you want on every login and end by exec'ing cwm..xinitrc, .xwmrc or what?
# .xinitrc
# On OpenBSD cwm and xterm (and all of x11) are in the base operating system
# and so are available at all times even before any packages are installed.
# For everything else there's fluxbox :)
if which cwm >/dev/null 2>&1 ; then
SESSION=${1:-cwm}
else
SESSION=${1:-startfluxbox}
fi
if which gnome-keyring-daemon >/dev/null 2>&1 ; then
eval $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gpg)
export SSH_AUTH_SOCK
export GPG_AGENT_INFO
fi
if which compton >/dev/null 2>&1; then
compton &
fi
# ...etc...
echo "`date`: $SESSION" >>~/sessions
if which ck-launch-session >/dev/null 2>&1 ; then
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session "$SESSION"
else
exec "$SESSION"
fi
and thank you for reminding me to use the...if I try to launch it in my ~/.xsession I see a window flicker up and disappear.
[port] and [/port]
# ~/everything/.run
prompt="`date +%H:%M`"
font='Monospace-11:normal'
selection="`LC_COLLATE=C ls | dmenu -p $prompt -b -sb green -sf black -fn $font`"
# ^ or v
# selection="`ls | rofi -case-sensitive -dmenu`"
if [ "$selection" ]; then
if [ -d "$selection" ]; then
if [ -x "$selection/.run" ]; then
./"$selection/.run"
elif [ -x "$selection/AppRun" ]; then
./"$selection/AppRun"
else
#xdg-open "$selection"
# ^ or v
rox "$selection"
fi
else
#- xdg-open "$selection"
# ^ or v
rox "$selection"
fi
fi
fi
## Run tmux command
~/.config/tmux.sh &
## Start dmenu
dmenu &
## Start CWM
exec cwm
> cat .config/tmux.sh
### TMUX xonfiguration
#tmux new-session \; split-window -h \; select-pane -t 0 \; split-window -v -p 66 \; split-window -v \;
tmux new-session \; split-window -h \; select-pane -t 0 \; split-window -v -p 66 \;
# Key bindings
bind-key CM-p "dmenu_run"