5 years agoStart implementation of setters.scripting-python
Sadrul Habib Chowdhury [Fri, 26 Jun 2009 05:09:49 +0000]
Start implementation of setters.

Window title can be set now.
Also, non-functional implementation of 'script call'.

5 years agoImplement a robust ScriptCall and format the code.
Rui Guo [Fri, 12 Jun 2009 14:46:04 +0000]
Implement a robust ScriptCall and format the code.

5 years agoAllow hooking to object-specific events (partial).
Sadrul Habib Chowdhury [Wed, 17 Jun 2009 07:45:08 +0000]
Allow hooking to object-specific events (partial).

5 years agoComapre and Represent displays.
Sadrul Habib Chowdhury [Sat, 13 Jun 2009 00:00:13 +0000]
Comapre and Represent displays.

5 years agoRepresent!
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 21:09:26 +0000]

5 years agoFunction to compare windows.
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 20:55:07 +0000]
Function to compare windows.

5 years agoAdd a window.select() method.
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 20:15:26 +0000]
Add a window.select() method.

5 years agoRead interactive input from user from scripts.
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 19:07:40 +0000]
Read interactive input from user from scripts.

Python scripts can now read interactive user input. A sample script
has been added to demonstrate the use.

5 years agoUnhook event callbacks.
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 18:23:40 +0000]
Unhook event callbacks.

This change allows unhooking from event callbacks. A sample script
has been added to remonstrate the usage.

5 years agoAdd event-hooking.
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 16:00:26 +0000]
Add event-hooking.

Python scripts can now hook to events. I have tested with global
event hooking, and it's working OK. Object-event hooking will
likely require some more work. Unhooking is not implemented yet.

5 years agoscreen.displays() returns a list(?) of displays.
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 06:35:58 +0000]
screen.displays() returns a list(?) of displays.

5 years agoExpose Display type.
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 06:06:18 +0000]
Expose Display type.

5 years agoNo more crashy crashy\!
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 05:54:13 +0000]
No more crashy crashy\!

5 years agoSample python script for testing.
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 05:29:43 +0000]
Sample python script for testing.

5 years agoSome more rearrangement of code.
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 05:23:30 +0000]
Some more rearrangement of code.

5 years agoRearrange the python scripting support a bit.
Sadrul Habib Chowdhury [Fri, 12 Jun 2009 04:33:36 +0000]
Rearrange the python scripting support a bit.

This massive rearrange of the python scripting support should help
to add support for more objects and methods.

5 years agoExpose some of the 'window' structure.
Sadrul Habib Chowdhury [Thu, 11 Jun 2009 20:58:18 +0000]
Expose some of the 'window' structure.

For now, the 'number' and 'title' attributes of the 'window'
structure are exposed.

5 years agoWrap around with PY_BINDING for python scripting support.
Sadrul Habib Chowdhury [Thu, 11 Jun 2009 19:05:59 +0000]
Wrap around with PY_BINDING for python scripting support.

5 years agoSome auto-foo for python support.
Sadrul Habib Chowdhury [Thu, 11 Jun 2009 19:02:20 +0000]
Some auto-foo for python support.

5 years agoAdd minimalistic python scripting support.
Sadrul Habib Chowdhury [Thu, 11 Jun 2009 18:50:13 +0000]
Add minimalistic python scripting support.

For the initial python scripting support, there's only one function
exposed to get the list of the names of the windows.

5 years agoParse the params to 'script source' correctly.
Sadrul Habib Chowdhury [Thu, 11 Jun 2009 17:35:02 +0000]
Parse the params to 'script source' correctly.

5 years agoTrigger detach events.
Sadrul Habib Chowdhury [Thu, 11 Jun 2009 16:33:06 +0000]
Trigger detach events.

For detach-events, it's not enough to just listen to 'detach'
command, since this command is not used for remote detaches. So
scripts looking to do something on a detach event need to hook to
this event, instead of hooking to 'cmdexecuted' event and looking
for 'detach' command.

5 years agoMerge branch 'master' into lua-scripting
Sadrul Habib Chowdhury [Thu, 11 Jun 2009 14:58:51 +0000]
Merge branch 'master' into lua-scripting

5 years agoComplete unhook for the handlers.
Sadrul Habib Chowdhury [Tue, 9 Jun 2009 22:32:02 +0000]
Complete unhook for the handlers.

This allows unhooking from events. Why were we using the function
name before? Do we need it for something?

5 years agoAllow using unnamed functions as handlers.
Sadrul Habib Chowdhury [Tue, 9 Jun 2009 21:22:19 +0000]
Allow using unnamed functions as handlers.

Allow both named and unnamed functions for callbacks. This is pretty
cool, and should allow for interesting scripts.

[This breaks unregistering. Working on that shortly]

5 years agoThe script decides what value to return to the script system.
Sadrul Habib Chowdhury [Tue, 9 Jun 2009 20:59:28 +0000]
The script decides what value to return to the script system.

It might be of interest to let several callback functions to excute
for the same event. This change will be necessary for that.

5 years agoAdd a debugging function to dump the stack.
Sadrul Habib Chowdhury [Tue, 9 Jun 2009 20:58:13 +0000]
Add a debugging function to dump the stack.

5 years agoMark that the binding has been initialized.
Sadrul Habib Chowdhury [Tue, 9 Jun 2009 20:53:36 +0000]
Mark that the binding has been initialized.

5 years agoTyop.
Sadrul Habib Chowdhury [Mon, 8 Jun 2009 21:00:26 +0000]

Also, trying out some stuff on git.

5 years agoEvent dispatching: Improvement & bugfix
Rui Guo [Sun, 7 Jun 2009 16:03:38 +0000]
Event dispatching: Improvement & bugfix

1. The reg/unreg interfaces are now called hook/unhook, the listen_to method
no longer exists.
2. Implement unregister logic, The privlege is unsigned now, and default to 31.
3. Check to prevent double reg/unreg the same handler.
4. Modify cmdcallback demo to enable toogle of logging.

5 years agoScript event framework: improvement & cleanup.
Rui Guo [Sun, 7 Jun 2009 08:51:42 +0000]
Script event framework: improvement & cleanup.

1. Make event register robust. The object prefix in the event name is now
generated in the code. Demo script is modified accordingly.

2. Introduce the unregister interface, not fully implemented yet.
3. Eliminate duplicate code in error report. Report error on LuaSource
4. Remove some obsolete code.

5 years agoFirst working version of new event dispatching framwork.
Rui Guo [Sat, 6 Jun 2009 16:51:39 +0000]
First working version of new event dispatching framwork.

The cmdcallback.lua demo now works under the new framework.

Major changes:
1. Implemented lua event dispatcher.
2. Implemented an event register interface in Screen object.
3. Modify cmdcallback.lua to explicitly register callback.

Issues left:
1. Clean up the code.
2. unregister interface.
3. how to work if USEVARARGS not defined?

5 years agoAdded calling interface to binding.
Rui Guo [Sat, 6 Jun 2009 08:03:41 +0000]
Added calling interface to binding.

1. Added bd_call() interface to binding.
2. Tuned LuaCall() and fill it in the calling interface.
3. Do not directly call LuaCall anymore.

5 years agoCorrect the vararg related definition.
Rui Guo [Sat, 6 Jun 2009 07:48:04 +0000]
Correct the vararg related definition.

5 years agoMisc fix
Rui Guo [Sat, 6 Jun 2009 07:29:17 +0000]
Misc fix

1. Fix a warning about implicit const type cast.

2. Fix the initialization of ScriptFuncs

5 years agoAvoid using // style comment.
Rui Guo [Sat, 6 Jun 2009 07:14:40 +0000]
Avoid using // style comment.

5 years agoEvent dispatching (Binding independing part)
Rui Guo [Thu, 4 Jun 2009 17:33:36 +0000]
Event dispatching (Binding independing part)

Finished binding independing part of event dispatching framework.
Register interface provided for script to setup handler for event
notification. trigger interface provided for screen to notify scripts.

TODO: unregister interface.

5 years agoGroup script event declaration (suggested by Sadrul)
Rui Guo [Thu, 4 Jun 2009 17:32:50 +0000]
Group script event declaration (suggested by Sadrul)

5 years agoFix compile warning about type cast.
Rui Guo [Thu, 4 Jun 2009 17:30:18 +0000]
Fix compile warning about type cast.

5 years agoAllow user to bypass sleep of 5 seconds.
Juergen Weigert [Wed, 3 Jun 2009 19:52:12 +0000]
Allow user to bypass sleep of 5 seconds.

When used as a minicom replacement, the hard coded sleep(5)
is really annoying, when trying to find the correct line and parameters.

This patch makes this fatal error message behave more like an ordinary message.
We now honor msgwait variable and honors user input.

5 years agoUpdate the design document a little.
Rui Guo [Wed, 3 Jun 2009 04:08:00 +0000]
Update the design document a little.

1. Change the screen command interface as suggested by Sadrul.

2. Add an input() interface to the Screen object.

3. A short description about binding.

5 years agoChange the script command to the stlye of 'layout' commands.
Rui Guo [Wed, 3 Jun 2009 04:06:05 +0000]
Change the script command to the stlye of 'layout' commands.

5 years agoIntroduce the event register & dispatching framework. (not finished)
Rui Guo [Wed, 3 Jun 2009 04:01:06 +0000]
Introduce the event register & dispatching framework. (not finished)

1. Define the script_event structure, lookup table etc.
2. Implement the event lookup logic.
3. Some sample events defined.

5 years agoIntroduce the concept of binding.
Rui Guo [Tue, 2 Jun 2009 09:00:11 +0000]
Introduce the concept of binding.

Bindings are in fact script interpretors. We can have several different
language bindings at the same time, with each registered at the compiling time
and loaded (initialized) dynamically at runtime. It's an bridge between
scripts and screen itself.

1. Rename the scripts struct to binding. Related functions are renamed too.
For example, LoadScripts() is now LoadBindings(); ScriptFInit() is now

2. Do not need to initialize the binding explicitly.

3. Reorganize the structure of script.c, grouping binding related stuffs

4. Add myself to the copyright line of script.c.

5. Fully implement the logic of ScriptSource().

5 years agoDefine macro for lua bindings.
Rui Guo [Tue, 2 Jun 2009 08:55:15 +0000]
Define macro for lua bindings.

5 years agoFix the cmdcallback demo to create the logfile correctly.
Rui Guo [Tue, 2 Jun 2009 07:52:37 +0000]
Fix the cmdcallback demo to create the logfile correctly.

5 years agoUse language neutral description rather than lua.
Rui Guo [Tue, 2 Jun 2009 02:35:18 +0000]
Use language neutral description rather than lua.

sourcescript accept parameters but do not fully use them.

5 years agoA bit more in the design document.
Rui Guo [Tue, 2 Jun 2009 02:33:26 +0000]
A bit more in the design document.

5 years agoWrap script related code with compiler directive.
Rui Guo [Mon, 1 Jun 2009 08:54:57 +0000]
Wrap script related code with compiler directive.

5 years agoUpdate the window object interface a bit.
Rui Guo [Mon, 1 Jun 2009 08:21:42 +0000]
Update the window object interface a bit.

1. Make the title property read/write.
2. Add the get_monitor_status interface.
3. Get rid of a compiler warning.

5 years agoUpdate the scripting design document.
Rui Guo [Mon, 1 Jun 2009 08:20:35 +0000]
Update the scripting design document.

Still not complete yet.

5 years agoAdded an empty Layout object interface to Lua script.
Rui Guo [Sun, 24 May 2009 08:21:41 +0000]
Added an empty Layout object interface to Lua script.

5 years agoAdded a design document for scripting support. Not finished yet.
Rui Guo [Sun, 24 May 2009 07:08:54 +0000]
Added a design document for scripting support. Not finished yet.

5 years agoFinish event dispatching section.
Rui Guo [Sat, 23 May 2009 12:05:44 +0000]
Finish event dispatching section.

Finish event dispatching section in screen_internal document.

5 years agoUpdate the screen_internal document.
Rui Guo [Wed, 20 May 2009 17:24:25 +0000]
Update the screen_internal document.

Finish most of the third section (important objects).

5 years agoNew document drafts.
Rui Guo [Wed, 20 May 2009 04:23:11 +0000]
New document drafts.

New directory to put some development documents in. Currently it includes
some nodes I got from code reading.

5 years agoImprove specifying custom digraphs.
Sadrul Habib Chowdhury [Fri, 15 May 2009 19:57:12 +0000]
Improve specifying custom digraphs.

With this change, instead of using the unicode value to create a
custom digraph, it will be possible to use the unicode character
itself. For example,

  digraph >= ≥

instead of

  digraph >= U+2265

5 years agoMerge branch 'master' into lua-scripting
Sadrul Habib Chowdhury [Wed, 8 Apr 2009 15:10:03 +0000]
Merge branch 'master' into lua-scripting

5 years agoFix another instance of unknown format strings.
Sadrul Habib Chowdhury [Wed, 8 Apr 2009 15:09:06 +0000]
Fix another instance of unknown format strings.

5 years agoAdd info about MakeWinMsgEv to HACKING.
Micah Cowan [Tue, 31 Mar 2009 19:00:05 +0000]
Add info about MakeWinMsgEv to HACKING.

5 years agoDon't send strings we don't control as the format string\!
Micah Cowan [Thu, 26 Mar 2009 21:52:29 +0000]
Don't send strings we don't control as the format string\!

5 years agoSend ti _after_ is.
Micah Cowan [Thu, 26 Mar 2009 21:49:57 +0000]
Send ti _after_ is.

6 years agoAllow c-style escapes with parameters.
Sadrul Habib Chowdhury [Sat, 28 Feb 2009 06:23:00 +0000]
Allow c-style escapes with parameters.

With this change, it's possible to use '\n' to represent a new line,
instead of '\012' This will be particularly useful for the 'stuff'
command. Fixes #25647.

6 years agoChange the default renditions.
Sadrul Habib Chowdhury [Sat, 28 Feb 2009 06:14:09 +0000]
Change the default renditions.

6 years agoUpdate manual for 'rendition'
Sadrul Habib Chowdhury [Sat, 28 Feb 2009 05:23:28 +0000]
Update manual for 'rendition'

Fixes #25668.

6 years agoDon't segfault on "layout number" when not on a layout (thanks Soliton)
Micah Cowan [Fri, 27 Feb 2009 04:17:33 +0000]
Don't segfault on "layout number" when not on a layout (thanks Soliton)

6 years agoRevert d9795ca13, which broke back-tab. END key and C-a ^H seem still to work somehow.
Micah Cowan [Wed, 25 Feb 2009 18:08:54 +0000]
Revert d9795ca13, which broke back-tab. END key and C-a ^H seem still to work somehow.

6 years agoRevert 6357c4f1 (wtf was I thinking?)
Micah Cowan [Wed, 25 Feb 2009 18:05:11 +0000]
Revert 6357c4f1 (wtf was I thinking?)

6 years ago$STY still reflects the old session name, but only in existing shells.
Micah Cowan [Tue, 24 Feb 2009 05:18:03 +0000]
$STY still reflects the old session name, but only in existing shells.

6 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/screen into lua-scripting
Sadrul Habib Chowdhury [Sun, 22 Feb 2009 13:53:17 +0000]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/screen into lua-scripting

6 years agoDon't push bell/monitor attributes onto stack without removing.
Micah Cowan [Sun, 22 Feb 2009 08:19:57 +0000]
Don't push bell/monitor attributes onto stack without removing.

6 years agoReturn proper tables
Sadrul Habib Chowdhury [Sun, 22 Feb 2009 05:19:24 +0000]
Return proper tables

For the list of windows, displays and canvases, return proper lua
tables. For the list of windows, use the window-number as the key for
the returned table.

6 years agoAllow a callback after every command
Sadrul Habib Chowdhury [Sat, 21 Feb 2009 08:40:28 +0000]
Allow a callback after every command

Scripts can choose to do some additional task after selected commands.
It may be possible to have some callbacks that will be triggered before
the original callback, thus possibly overriding it.

6 years agoMerge branch 'master' into lua-scripting
Sadrul Habib Chowdhury [Sat, 21 Feb 2009 02:11:02 +0000]
Merge branch 'master' into lua-scripting


src/screen.c -- resolved

6 years agoFix caption for 'select -'
Sadrul Habib Chowdhury [Fri, 20 Feb 2009 18:50:26 +0000]
Fix caption for 'select -'

6 years agoDon't trim the trailing spaces from %-w !
Micah Cowan [Fri, 20 Feb 2009 07:46:36 +0000]
Don't trim the trailing spaces from %-w !

6 years agoCorrect version from 4.01.00devel to 4.10.00devel
Micah Cowan [Wed, 18 Feb 2009 20:58:20 +0000]
Correct version from 4.01.00devel to 4.10.00devel

6 years agoCustomizable digraphs
Sadrul Habib Chowdhury [Sat, 14 Feb 2009 03:51:42 +0000]
Customizable digraphs

This closes a debian wishlist more than 10 years old (#25096), and also
a less old feature request on savannah (#25279).

6 years agoterminfo goodness for 256-color support
Sadrul Habib Chowdhury [Sat, 14 Feb 2009 00:42:05 +0000]
terminfo goodness for 256-color support

Taken from http://www.xvx.ca/~awg/emacs-colors-howto.txt, written by Trent W Buck.

6 years agoMultiple input history
Sadrul Habib Chowdhury [Fri, 13 Feb 2009 04:28:58 +0000]
Multiple input history

Based on initial patch by Romain Francoise. I had actually committed his
patch in a branch, but some bits of the implementation looked a bit more
complicated than necessary. So I scratched that for this, which looks
pretty similar, but I think is a bit simpler to understand. The
behaviour is mostly the same, e.g. duplicate commands are moved at the
beginning of the history, and not added again.

There is currently no limit to the number of inputs to save in history.
But it can certainly be added if necessary.

Fixes #25074.

6 years agoFix the rendition of some specific %w flags.
Sadrul Habib Chowdhury [Sun, 8 Feb 2009 21:14:46 +0000]
Fix the rendition of some specific %w flags.

6 years agoCopyright for 2009
Sadrul Habib Chowdhury [Sun, 8 Feb 2009 01:00:26 +0000]
Copyright for 2009

6 years agoAllow highlighting bell/monitor windows in caption
Sadrul Habib Chowdhury [Sun, 8 Feb 2009 00:44:54 +0000]
Allow highlighting bell/monitor windows in caption

The command is 'rendition'. Details in man-page. The defaults are
currently set in a way to make sure that the new settings are
noticeable. This changeset is preferred over either of the patches in
savannah #18382, because it allows specifying the renditions for both
bell and monitor windows, and is flexible enough that new renditions
can be added if desired.

6 years agoMake sure NAME_MAX is defined.
Sadrul Habib Chowdhury [Sat, 7 Feb 2009 01:14:24 +0000]
Make sure NAME_MAX is defined.

A different fix for this, suggested by Emanuele Giaquinta, was to
 #undef NAME_MAX before #define-ing it, but somehow I like this better.

6 years agoDO_NOT_POLL_MASTER is never defined.
Emanuele Giaquinta [Fri, 6 Feb 2009 20:09:54 +0000]
DO_NOT_POLL_MASTER is never defined.

6 years agoFix compiling when multiuser mode is disabled.
Sadrul Habib Chowdhury [Fri, 6 Feb 2009 20:03:40 +0000]
Fix compiling when multiuser mode is disabled.

6 years agoProperly parse the commands coming from -X
Sadrul Habib Chowdhury [Sun, 1 Feb 2009 07:31:00 +0000]
Properly parse the commands coming from -X

Between parsing the command before and after sending the commands over
the socket, I decided on the latter option. Fixes #24924.

6 years agoMove the tilde-expansion code to a better place
Sadrul Habib Chowdhury [Sun, 1 Feb 2009 00:50:59 +0000]
Move the tilde-expansion code to a better place

The tilde-expansion didn't happen with the following screenrc command:

  screen 0 screen -S name -c ~/file

With this change, proper tilde-expansion happens for the nested screen.

6 years agoUse AC_SYS_LONG_FILE_NAMES to check if the system supports file names longer than...
Emanuele Giaquinta [Wed, 28 Jan 2009 21:20:34 +0000]
Use AC_SYS_LONG_FILE_NAMES to check if the system supports file names longer than 14 characters.

6 years agoecho -> printf in info.
Emanuele Giaquinta [Tue, 27 Jan 2009 04:24:55 +0000]
echo -> printf in info.

6 years agoDon't forget the startup command.
Sadrul Habib Chowdhury [Mon, 26 Jan 2009 21:19:47 +0000]
Don't forget the startup command.

Fixes savannah bug #25348, launchpad bug #311443.

6 years agoUse printf rather than echo -n -e in bash example.
Emanuele Giaquinta [Mon, 26 Jan 2009 00:51:15 +0000]
Use printf rather than echo -n -e in bash example.

6 years agoUse AC_USE_SYSTEM_EXTENSIONS to make the socket code compile on solaris, https:/...
Emanuele Giaquinta [Sun, 25 Jan 2009 19:02:47 +0000]
Use AC_USE_SYSTEM_EXTENSIONS to make the socket code compile on solaris, https://savannah.gnu.org/bugs/?25058.

6 years agoFix union wait vs. int issue
William Pursell [Sun, 21 Dec 2008 19:19:43 +0000]
Fix union wait vs. int issue

On OS X, screen fails to compile because WindowDied is
unconditionally declared to take an int, but is called
with an argument of type union wait.  This wraps the
declaration and two associated calls.

Signed-off-by: William Pursell <bill.pursell@gmail.com>

6 years agoMerge branch 'cmd-alias' into lua-scripting
Sadrul Habib Chowdhury [Sat, 24 Jan 2009 02:21:55 +0000]
Merge branch 'cmd-alias' into lua-scripting

6 years agoMerge branch 'master' into lua-scripting
Sadrul Habib Chowdhury [Sat, 24 Jan 2009 01:54:23 +0000]
Merge branch 'master' into lua-scripting

6 years agoMerge branch 'master' into cmd-alias
Sadrul Habib Chowdhury [Sat, 24 Jan 2009 01:53:36 +0000]
Merge branch 'master' into cmd-alias

6 years agoDo not crash when terminal height is zero.
Sadrul Habib Chowdhury [Wed, 21 Jan 2009 18:56:09 +0000]
Do not crash when terminal height is zero.

Fixes savannah bug #25338, ubuntu launchpad bug #315237.

6 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/screen into cmd-alias
Sadrul Habib Chowdhury [Wed, 12 Nov 2008 22:21:45 +0000]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/screen into cmd-alias

6 years agoJust use string.h, strings.h if they're available.
Micah Cowan [Wed, 12 Nov 2008 04:54:30 +0000]
Just use string.h, strings.h if they're available.