[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] run or raise?

From: Memnon Anon
Subject: [RP] run or raise?
Date: Fri, 20 Aug 2010 12:09:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)


I have been testing stumpwm for a couple of days; I liked it very much,
but I found myself using the advantages not extensively enough to run a
full blown lisp on my 512mb notebook.

Now, back at ratpoison, there was one feature I really missed: the
run-or-raise command.

Searching google and gmane, I found no solution out there, so
I made a very simple bash script: rp-run-or-raise.sh

--8<---------------cut here---------------start------------->8---
# emulate stumpwms run-or-raise with ratpoison
# Param1: Windowname to look for
# Param2: Command to start if not present yet

ratpoison -c windows|grep -q $1

if [ $? -eq 0 ] ; then
#    echo "Value grep: $? . selecting"
    ratpoison -c "select $1"
#    echo "Value grep: $? . starting"
--8<---------------cut here---------------end--------------->8---

and now have this in my .ratpoisonrc:

| set winname class
| bind c exec rp-run-or-raise.sh URxvt 'urxvt'
| bind e exec rp-run-or-raise.sh Emacs 'emacsclient -c'
| bind x exec rp-run-or-raise.sh Conkeror "conkeror"

And it works afaics.

Any suggestions for improvements are very welcome.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]