On Sat, Nov 03, 2012 at 11:14:32AM +0000, Philip Herron wrote:
> Hey
> 
> Yeah i didn't think it would be included in tmux proper since i end up
> reworking the cmd_table a lot and get rid of the const in it all and
> allocate it memory so i can change it at runtime etc. Probably not
> really in the spirit of tmux in some ways. But yeah i am not that

I don't see any harm in making the command list structure
allocated.

> great when it comes to figuring out how to using git outside of
> merging branches etc i never really know how to handle sending patches
> etc.

Well, the patch would be easier to deal with if you just send it as one
patch, just diff against the master of tmux.

> 
> I might make a little tutorial on my blog later to show it all in
> action and silly things you can do with it. I am making the
> __TMUX_COMMANDS dictionary useable at the moment just figuring out
> argument passing. So i want to get rid of my .tmux.conf so i use
> python to configure my tmux lol.

Fair enough.

> 
> --Phil
> 
> On 3 November 2012 07:34, Nicholas Marriott <nicholas.marri...@gmail.com> 
> wrote:
> > Hi
> >
> > This looks nice on a quick look but I'm not sure I want to include it in
> > tmux proper, I like Python but even an optional dependency on it is a
> > big deal.
> >
> > It might be easier for people to plau with if you could send it as one
> > patch, or split up as a logical set of changes rather than, for example,
> > including patches that are just bug fixes on top of previous `patches
> > (such as 06/17 and others) - I'm sure some of the git wizards on the
> > list could tell you how to do that latter if you wish.
> >
> >
> >
> > On Sat, Nov 03, 2012 at 01:04:04AM +0000, Philip Herron wrote:
> >> Hey
> >>
> >> Not sure if this patches will ever be useful to anyone but i decided i
> >> wanted to be able to add commands to tmux in python as i wanted to
> >> interact in a nice way with my system. So i made these patches.
> >>
> >> You compile with:
> >>
> >> sh autogen.sh
> >> ./configure --enable-python
> >> make
> >>
> >> pyscript script.py
> >>
> >> It checks currently in $HOME/tmux.conf.d/script.py
> >> But i hard coded a test in the exec command to run tmux-test.py you
> >> can then run the command:
> >>
> >> pytest
> >>
> >> This is a silly command to open a web page on your broswer just to
> >> have a visual test. This is all very initial its just a small pet
> >> project i will work on time to time. To access the code its probably
> >> simpliest to use:
> >>
> >> git remote add python git://buildy.org/tmux.git
> >> git fetch python
> >> git checkout --track -b python-scripting python/python-scripting
> >>
> >> Might be interesing to someone :). But i don't know if its in the
> >> spirit of tmux to have this as default feature. But i think its nice.
> >>
> >> The python so far is:
> >>
> >> import tmux
> >>
> >> You can iterate over the dictionary:
> >>
> >> __TMUX_COMMANDS
> >> I am working on support where you can access the cmd_entry and execute
> >> the commands most of the code is there just needs finished so you
> >> could script your tmux in python
> >>
> >> def callable_python ():
> >>   pass
> >>
> >> tmux.append_command ("name", callable_python)
> >> Thats how easy it is to add a command to tmux in python just pass a
> >> callable function.
> >>
> >> --Phil
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >> ------------------------------------------------------------------------------
> >> LogMeIn Central: Instant, anywhere, Remote PC access and management.
> >> Stay in control, update software, and manage PCs from one command center
> >> Diagnose problems and improve visibility into emerging IT issues
> >> Automate, monitor and manage. Do more in less time with Central
> >> http://p.sf.net/sfu/logmein12331_d2d
> >
> >> _______________________________________________
> >> tmux-users mailing list
> >> tmux-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/tmux-users
> >

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to