You are not logged in.

#1 2007-09-24 04:44:39

kandrews
Member
Registered: 2007-04-21
Posts: 119

xinitrc for dwm

Hi,

I followed the advice in the README for dwm for adding system information to the toolbar but have a funny problem with shutting down X. When I kill dwm, the loop continues to run and X doesn't shutdown. I have to kill X manually. This defeats the purpose of using slim. I'm using zsh as my default shell but I put a #!/bin/sh at the top of my .xinitrc. Here is the loop that won't die when dwm is killed:

while true
do
    acpi -b | sed -r 's/^[^,]+,//' | sed -r 's/,.+$//' 
    sleep 10
done | dwm

Any suggestions welcomed!

EDIT:

I inserted this line into my while loop and now it ends when I shutdown dwm.

pidof dwm > /dev/null || break

Last edited by kandrews (2007-10-14 23:58:09)

Offline

#2 2007-09-24 06:14:35

F
Member
Registered: 2006-10-09
Posts: 322

Re: xinitrc for dwm

I have the /same/ exact fscking problem, except for wmii. Also awaiting suggestions.

Offline

#3 2007-09-24 07:30:24

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: xinitrc for dwm

Heh, that's funny. I've always wondered why alt+q didn't kill X properly when running dwm.

Thanks for pointing this out and sorry, because I don't have a non-hack-ish solution.

I am using xmonad now, anyway.


Hail to the thief!

Offline

#4 2007-09-25 00:06:29

skymt
Member
Registered: 2006-11-27
Posts: 443

Re: xinitrc for dwm

I have my dwm status-bar loop in a separate script, and dwm dies properly when I tell it to. Here's the relevant line from my xinitrc:

exec ~/bin/dwm-status.sh | ~/.dwm/dwm

Also, X won't stop if there are any programs connected to it, and dwm doesn't kill anything when it quits. Maybe you're leaving something open?

Offline

#5 2007-09-25 03:22:08

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: xinitrc for dwm

haha no shit. i was wondering this myself. never would have thought that loop would do it.  thanks skymt.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

Board footer

Powered by FluxBB