Re: [STUMP] Using run-or-raise to manage pre-configured windows inatmux session

Alexander Stein <[email protected]>
Newsgroups gmane.comp.window-managers.stumpwm.devel
Message-ID <20140410115548.GA27291@localhost>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Wed, Apr 09, 2014 at 10:40:20PM +0430, Mostafa Razavi wrote:
> Alexander,
> 
> This is from my .stumpwmrc. Perhaps something like this works for you too.
> 
> (defcommand emacs-in-tmux () ()
>   "attempts to switch to an emacs instance run in a tmux window
>    called 'emacs', itself inside a urxvt instance."
> 
>   (let ((ret
>  (run-shell-command "tmux select-window -t emacs ; echo $?" t)))
> 
>     (if (eql (elt ret 0) #\0)
>         (run-or-raise "urxvt" '(:class "URxvt"))
>         (message "no tmux session found."))))
> (define-key *root-map* (kbd "C-e") "emacs-in-tmux")

This is the one I ended up using and it is working swimmingly after changing the variables around.

Thanks so much to you and everyone on this list.  I love this WM and this community is making my choice seem very worthwhile.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCgAGBQJTRobDAAoJEBGW63ETeHHR6ncQANP3Mg1c9Tun6DSHVYlpuQnI
NGn7Sul0BBzKQMnhTCoeLyVbPzo03XZBLfesSFhAbpaXs3fs0j9Lr8nUa+osR3QQ
FrlKMxJSLjheUPo4ULXbcgOb3kNWWLQiWbc9FhpUoCLQoqB5/+kQlbHXfviYGX/c
zqqNl7yIBP3BYBor4JzhkzMRG7wfw8VxwKTjTBZM7BBYfisADe9NT1o9miFg7l7g
6T7GqcPyEnI5jKNSh3dpiAE6rnPtJf9BfwfVDR3AvXxW8MW3I7W+cfeXVTNtJ3Fq
4h4BM+LbT3gDYUFr+oH6JW5RnnLERpIdKmw6GYqHNlxHZ8zMATl/CvujKvOS6NLs
i4jI9igcn1KGvWv5AbN8wW2T8W6Gf5XtDMOCr8c/rpArMNTsnHx9/7jikjXY91dF
YFqhQ2hTV5BPIlTLe6WknZXmX/EvlKebZGmwBn7NJolRcqPechqrMW7YFbpgB+fp
D0j0k5/AjMEQBQ1aWdynjA6l0DXEqLBxY6jmzVpnOrZ8rFEGVSdr2YwXtZ5HEkKj
sIglSjUQmCN6phyP0qwM0qu6hxePZ3qBo9hz3NuQ3sk6UMqOiyi4i1uU/uh14RUv
qmQU5oPmL5mex2v5csB0mc9TpeObQOG0/jhsonZGwUXowq+RBG1n+x/FKsBGvwkR
5fqB9Kl/UIScTITx9VbH
=7JT3
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.