projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f16d320
)
when using openbox-gnome/kde-session, use a separate config file (rc-gnome/kde.xml)
author
Dana Jansens
<danakj@orodu.net>
Sun, 13 May 2007 22:49:20 +0000
(22:49 +0000)
committer
Dana Jansens
<danakj@orodu.net>
Sun, 13 May 2007 22:49:20 +0000
(22:49 +0000)
data/xsession/openbox-gnome-session.in
patch
|
blob
|
history
data/xsession/openbox-kde-session.in
patch
|
blob
|
history
doc/openbox.1.in
patch
|
blob
|
history
doc/openbox.1.sgml
patch
|
blob
|
history
openbox/openbox.c
patch
|
blob
|
history
openbox/startupnotify.c
patch
|
blob
|
history
diff --git
a/data/xsession/openbox-gnome-session.in
b/data/xsession/openbox-gnome-session.in
index
c2bc939
..
b522355
100644
(file)
--- a/
data/xsession/openbox-gnome-session.in
+++ b/
data/xsession/openbox-gnome-session.in
@@
-2,4
+2,5
@@
# Run GNOME with Openbox as its window manager
export WINDOW_MANAGER="@bindir@/openbox"
# Run GNOME with Openbox as its window manager
export WINDOW_MANAGER="@bindir@/openbox"
+export OPENBOX_CONFIG_NAMESPACE="gnome"
exec gnome-session "$@"
exec gnome-session "$@"
diff --git
a/data/xsession/openbox-kde-session.in
b/data/xsession/openbox-kde-session.in
index
0fe0094
..
a125e4c
100644
(file)
--- a/
data/xsession/openbox-kde-session.in
+++ b/
data/xsession/openbox-kde-session.in
@@
-2,4
+2,5
@@
# Run KDE with Openbox as its window manager
export KDEWM="@bindir@/openbox"
# Run KDE with Openbox as its window manager
export KDEWM="@bindir@/openbox"
+export OPENBOX_CONFIG_NAMESPACE="kde"
exec startkde "$@"
exec startkde "$@"
diff --git
a/doc/openbox.1.in
b/doc/openbox.1.in
index
a4b6d6f
..
e1e177a
100644
(file)
--- a/
doc/openbox.1.in
+++ b/
doc/openbox.1.in
@@
-4,7
+4,7
@@
openbox \(em Next generation, highly configurable window manager
.SH "SYNOPSIS"
.PP
.SH "SYNOPSIS"
.PP
-\fBopenbox\fR [\fB\-\-help\fP] [\fB\-\-version\fP] [\fB\-\-replace\fP] [\fB\-\-reconfigure\fP] [\fB\-\-sm-disable\fP] [\fB\-\-
config \fITYPE\fR\fP] [\fB\-\-
sync\fP] [\fB\-\-debug\fP] [\fB\-\-debug-focus\fP]
+\fBopenbox\fR [\fB\-\-help\fP] [\fB\-\-version\fP] [\fB\-\-replace\fP] [\fB\-\-reconfigure\fP] [\fB\-\-sm-disable\fP] [\fB\-\-sync\fP] [\fB\-\-debug\fP] [\fB\-\-debug-focus\fP]
.SH "DESCRIPTION"
.PP
Openbox is a next generation, highly
.SH "DESCRIPTION"
.PP
Openbox is a next generation, highly
@@
-59,8
+59,6
@@
If Openbox is already running on the display, tell it to
reload it's configuration.
.IP "\fB\-\-sm-disable\fP" 10
Do not connect to the session manager.
reload it's configuration.
.IP "\fB\-\-sm-disable\fP" 10
Do not connect to the session manager.
-.IP "\fB\-\-config\fITYPE\fR\fP" 10
-Specify the configuration profile to use.
.IP "\fB\-\-sync\fP" 10
Run in synchronous mode (for debugging).
.IP "\fB\-\-debug\fP" 10
.IP "\fB\-\-sync\fP" 10
Run in synchronous mode (for debugging).
.IP "\fB\-\-debug\fP" 10
@@
-77,4
+75,4
@@
The program's full documentation is available on the website:
.PP
Please report bugs to: \fBhttp://bugzilla.icculus.org/
\fP
.PP
Please report bugs to: \fBhttp://bugzilla.icculus.org/
\fP
-.\" created by instant / docbook-to-man, Sun 13 May 2007, 18:
06
+.\" created by instant / docbook-to-man, Sun 13 May 2007, 18:
47
diff --git
a/doc/openbox.1.sgml
b/doc/openbox.1.sgml
index
b2b4a83
..
b60fc54
100644
(file)
--- a/
doc/openbox.1.sgml
+++ b/
doc/openbox.1.sgml
@@
-41,7
+41,6
@@
manpage.1: manpage.sgml
<arg><option>--replace</option></arg>
<arg><option>--reconfigure</option></arg>
<arg><option>--sm-disable</option></arg>
<arg><option>--replace</option></arg>
<arg><option>--reconfigure</option></arg>
<arg><option>--sm-disable</option></arg>
- <arg><option>--config <replaceable>TYPE</replaceable></option></arg>
<arg><option>--sync</option></arg>
<arg><option>--debug</option></arg>
<arg><option>--debug-focus</option></arg>
<arg><option>--sync</option></arg>
<arg><option>--debug</option></arg>
<arg><option>--debug-focus</option></arg>
@@
-124,12
+123,6
@@
manpage.1: manpage.sgml
</listitem>
</varlistentry>
<varlistentry>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>--config<replaceable>TYPE</replaceable></option></term>
- <listitem>
- <para>Specify the configuration profile to use.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><option>--sync</option></term>
<listitem>
<para>Run in synchronous mode (for debugging).</para>
<term><option>--sync</option></term>
<listitem>
<para>Run in synchronous mode (for debugging).</para>
diff --git
a/openbox/openbox.c
b/openbox/openbox.c
index
2de1f7e
..
dfcda4b
100644
(file)
--- a/
openbox/openbox.c
+++ b/
openbox/openbox.c
@@
-104,6
+104,7
@@
static gchar *config_type = NULL;
static void signal_handler(gint signal, gpointer data);
static void remove_args(gint *argc, gchar **argv, gint index, gint num);
static void signal_handler(gint signal, gpointer data);
static void remove_args(gint *argc, gchar **argv, gint index, gint num);
+static void parse_env();
static void parse_args(gint *argc, gchar **argv);
static Cursor load_cursor(const gchar *name, guint fontval);
static void parse_args(gint *argc, gchar **argv);
static Cursor load_cursor(const gchar *name, guint fontval);
@@
-126,6
+127,8
@@
gint main(gint argc, gchar **argv)
/* parse the command line args, which can change the argv[0] */
parse_args(&argc, argv);
/* parse the command line args, which can change the argv[0] */
parse_args(&argc, argv);
+ /* parse the environment variables */
+ parse_env();
program_name = g_path_get_basename(argv[0]);
g_set_prgname(program_name);
program_name = g_path_get_basename(argv[0]);
g_set_prgname(program_name);
@@
-405,6
+408,10
@@
gint main(gint argc, gchar **argv)
argv = nargv;
}
argv = nargv;
}
+ /* we also remove some environment variables, so put them back */
+ if (config_type)
+ setenv("OPENBOX_CONFIG_NAMESPACE", config_type, 1);
+
/* re-run me */
execvp(argv[0], argv); /* try how we were run */
execlp(argv[0], program_name, (gchar*)NULL); /* last resort */
/* re-run me */
execvp(argv[0], argv); /* try how we were run */
execlp(argv[0], program_name, (gchar*)NULL); /* last resort */
@@
-461,7
+468,6
@@
static void print_help()
g_print(_(" --version Display the version and exit\n"));
g_print(_(" --replace Replace the currently running window manager\n"));
g_print(_(" --sm-disable Disable connection to the session manager\n"));
g_print(_(" --version Display the version and exit\n"));
g_print(_(" --replace Replace the currently running window manager\n"));
g_print(_(" --sm-disable Disable connection to the session manager\n"));
- g_print(_(" --config TYPE Specify the configuration profile to use\n"));
g_print(_("\nPassing messages to a running Openbox instance:\n"));
g_print(_(" --reconfigure Reload Openbox's configuration\n"));
g_print(_("\nDebugging options:\n"));
g_print(_("\nPassing messages to a running Openbox instance:\n"));
g_print(_(" --reconfigure Reload Openbox's configuration\n"));
g_print(_("\nDebugging options:\n"));
@@
-482,6
+488,18
@@
static void remove_args(gint *argc, gchar **argv, gint index, gint num)
*argc -= num;
}
*argc -= num;
}
+static void parse_env()
+{
+ /* unset this so we don't pass it on unknowingly */
+ unsetenv("DESKTOP_STARTUP_ID");
+
+ if (getenv("OPENBOX_CONFIG_NAMESPACE")) {
+ config_type = g_strdup(getenv("OPENBOX_CONFIG_NAMESPACE"));
+ /* don't pass it on except if we restart */
+ unsetenv("OPENBOX_CONFIG_NAMESPACE");
+ }
+}
+
static void parse_args(gint *argc, gchar **argv)
{
gint i;
static void parse_args(gint *argc, gchar **argv)
{
gint i;
@@
-524,14
+542,6
@@
static void parse_args(gint *argc, gchar **argv)
remote_control = 2;
*/
}
remote_control = 2;
*/
}
- else if (!strcmp(argv[i], "--config")) {
- if (i == *argc - 1) /* no args left */
- g_printerr(_("--config requires an argument\n"));
- else {
- config_type = g_strdup(argv[i+1]);
- ++i;
- }
- }
else if (!strcmp(argv[i], "--sm-save-file")) {
if (i == *argc - 1) /* no args left */
/* not translated cuz it's sekret */
else if (!strcmp(argv[i], "--sm-save-file")) {
if (i == *argc - 1) /* no args left */
/* not translated cuz it's sekret */
diff --git
a/openbox/startupnotify.c
b/openbox/startupnotify.c
index
03cb752
..
45a2b4c
100644
(file)
--- a/
openbox/startupnotify.c
+++ b/
openbox/startupnotify.c
@@
-24,10
+24,7
@@
#ifndef USE_LIBSN
#ifndef USE_LIBSN
-void sn_startup(gboolean reconfig) {
- /* unset this so we don't pass it on unknowingly */
- if (!reconfig) unsetenv("DESKTOP_STARTUP_ID");
-}
+void sn_startup(gboolean reconfig) {}
void sn_shutdown(gboolean reconfig) {}
gboolean sn_app_starting() { return FALSE; }
Time sn_app_started(const gchar *id, const gchar *wmclass)
void sn_shutdown(gboolean reconfig) {}
gboolean sn_app_starting() { return FALSE; }
Time sn_app_started(const gchar *id, const gchar *wmclass)