Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support Us

Top Posters

using trap to close one program when another is closed

wchouser3wchouser3 Registered
edited October 2015 in Bash Scripting's my goal....I use dwm, so normally I have no need for a compositing manager. That being said, there are times when I would like to have it running temporarily. There are times when I want to have a browser open, with lxterminal floating on top. I'm a relative new-comer to scripting, meaning I do know how to accomplish simple tasks. 

What I want to do is write a script that starts xcompmgr automatically when I start lxterminal, then exit xcompmgr when I close lxterminal. I'm told using "trap" is the proper way to get this done; I just don't know how to write it.

Here's what I got so far:

xcompmgr &
# here's where I get stumped


can anyone help me with this little script?
Sign In or Register to comment.