stumpwm-devel
[Top][All Lists]
Advanced

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

Re: [STUMP] Using run-or-raise to manage pre-configured windows in atmux


From: David Bjergaard
Subject: Re: [STUMP] Using run-or-raise to manage pre-configured windows in atmux session
Date: Wed, 09 Apr 2014 11:25:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Just to be absolutely clear:
> Using (format nil "ls~%") is necessary, the C-style "ls\n" will not
> work.
Common Lisp strings don't respect the same set of escaped characters as
C, so "ls\n" is the literal character array #(#\l #\s #\n), If on the
other hand, you had: #(#\l #\s #\Newline) then you would send the right
command. In conclusion:
(defcommand ls () () 
(run-or-raise "urxvtc" '(:class "URxvt" :title "^(?!emacs)")) 
(window-send-string "ls
"))
Would also work, its just not very readable. 

    Dave

"J. David Smith" <address@hidden> writes:

> @Michael Raskin: that'll send the command to a *new* shell, not the
> existing mlterm session.
>
> Bjergaard's solution works -- at least with urxvt.
>
> Here is a sample that runs ls in a non-emacs urxvt client window:
>
> (defcommand ls () () 
> (run-or-raise "urxvtc" '(:class "URxvt" :title "^(?!emacs)")) 
> (window-send-string (format nil "ls~%")))
>
> Using (format nil "ls~%") is necessary, the C-style "ls\n" will not
> work.
>
> On Wed, Apr 9, 2014 at 10:47 AM, Michael Raskin <address@hidden>
> wrote:
>
>     >Is it possible to set (run-or-raise), that when a keybinding
>     calls a function that excutes it, will go to my configured mlterm,
>     and then run the command like "tmux select-window mutt" after
>     raising the current mlterm session? StumpWM is pretty fast as it
>     is, but this would make StumpWM the best experience I ever had on
>     Linux.
>     >
>     >I am sure this is going to be a macro of some kind and is most
>     certainly not default behavior. Any pointers would be very
>     welcome. If anyone has done this, or knows someone who has, I
>     would love a link to any .stumpwmrc file.
>     
>     
>     If I understand you correcly, you need run-or-raise and then
>     run-shell-command in the defcommand body.
>     
>     
>     (defcommand something () ()
>     "Description"
>     (run-or-raise …)
>     (run-shell-command "tmux …")
>     
>     
>     )
>     
>     
>     
>     
>     _______________________________________________
>     Stumpwm-devel mailing list
>     address@hidden
>     https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
>     
>
>
> _______________________________________________
> Stumpwm-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/stumpwm-devel



reply via email to

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