summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--NEWS5
-rw-r--r--doc/ratpoison.texi3
-rw-r--r--src/main.c3
4 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index aa37f8c..3dc14f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-09 Shawn Betts <katia_dilkina@verizon.net>
+
+ * src/main.c (main): set the RATPOISON env. variable to the path
+ to this executable.
+
2005-02-06 Shawn Betts <katia_dilkina@verizon.net>
* src/actions.c (cmd_prompt): allow prompt to be run
diff --git a/NEWS b/NEWS
index 54b74ef..3d4b919 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,11 @@ Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
+* Changes since 1.4.0-beta1
+** RATPOISON environment variable
+RATPOISON is set to the location of the ratpoison binary. This is
+useful for scripts.
+
* Changes since 1.3.0
** command arguments can be wrapped in double quotes.
To include a space in a command argument, wrap the argument with ".
diff --git a/doc/ratpoison.texi b/doc/ratpoison.texi
index bf9e4e6..b2cf1e3 100644
--- a/doc/ratpoison.texi
+++ b/doc/ratpoison.texi
@@ -1569,6 +1569,9 @@ if it is switch to its window otherwise launch it.
It should also be noted that multiple @option{-c} options can be used.
+to facilitate writing scripts, the @env{RATPOISON} environment
+variable is set to the full path of the ratpoison binary.
+
@example
$ ratpoison -c split -c split
@end example
diff --git a/src/main.c b/src/main.c
index deef611..5b7bb25 100644
--- a/src/main.c
+++ b/src/main.c
@@ -624,6 +624,9 @@ main (int argc, char *argv[])
set_sig_handler (SIGHUP, hup_handler);
set_sig_handler (SIGCHLD, chld_handler);
+ /* Add RATPOISON to the environment */
+ putenv (xsprintf ("RATPOISON=%s", argv[0]));
+
/* Setup ratpoison's internal structures */
init_globals ();
init_defaults ();