Add a --replace argument
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
19111121ce
commit
f6e633eee4
11
awesome.c
11
awesome.c
|
@ -260,7 +260,7 @@ acquire_WM_Sn(bool replace)
|
|||
xcb_get_selection_owner(globalconf.connection, globalconf.selection_atom),
|
||||
NULL);
|
||||
if (!replace && get_sel_reply->owner != XCB_NONE)
|
||||
fatal("another window manager is already running (selection owned)");
|
||||
fatal("another window manager is already running (selection owned; use --replace)");
|
||||
|
||||
/* Acquire the selection */
|
||||
xcb_set_selection_owner(globalconf.connection, globalconf.selection_owner_window,
|
||||
|
@ -436,6 +436,7 @@ main(int argc, char **argv)
|
|||
xdgHandle xdg;
|
||||
bool no_argb = false;
|
||||
bool run_test = false;
|
||||
bool replace_wm = false;
|
||||
xcb_query_tree_cookie_t tree_c;
|
||||
static struct option long_options[] =
|
||||
{
|
||||
|
@ -444,6 +445,7 @@ main(int argc, char **argv)
|
|||
{ "config", 1, NULL, 'c' },
|
||||
{ "check", 0, NULL, 'k' },
|
||||
{ "no-argb", 0, NULL, 'a' },
|
||||
{ "replace", 0, NULL, 'r' },
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
|
@ -480,7 +482,7 @@ main(int argc, char **argv)
|
|||
luaA_init(&xdg);
|
||||
|
||||
/* check args */
|
||||
while((opt = getopt_long(argc, argv, "vhkc:a",
|
||||
while((opt = getopt_long(argc, argv, "vhkc:ar",
|
||||
long_options, NULL)) != -1)
|
||||
switch(opt)
|
||||
{
|
||||
|
@ -502,6 +504,9 @@ main(int argc, char **argv)
|
|||
case 'a':
|
||||
no_argb = true;
|
||||
break;
|
||||
case 'r':
|
||||
replace_wm = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (run_test)
|
||||
|
@ -578,7 +583,7 @@ main(int argc, char **argv)
|
|||
draw_test_cairo_xcb();
|
||||
|
||||
/* Acquire the WM_Sn selection */
|
||||
acquire_WM_Sn(true);
|
||||
acquire_WM_Sn(replace_wm);
|
||||
|
||||
/* initialize dbus */
|
||||
a_dbus_init();
|
||||
|
|
|
@ -35,6 +35,8 @@ OPTIONEN
|
|||
Überprüft die Konfigurationsdatei auf Syntaxfehler.
|
||||
*-a*, *--no-argb*::
|
||||
Verwende keine ARGB-Visuals
|
||||
*-r*, *--replace*::
|
||||
Existierenden Fenstermanager ersetzen
|
||||
|
||||
TASTENBELEGUNG FÜR MAUSZEIGER
|
||||
-----------------------------
|
||||
|
|
|
@ -52,6 +52,8 @@ OPCIONES
|
|||
Verifica la sintaxis del archivo de configuración.
|
||||
*-a*, *--no-argb*::
|
||||
No utilice colores ARGB.
|
||||
*-r*, *--replace*::
|
||||
Replace an existing window manager
|
||||
|
||||
ATAJOS DE RAtÓN POR OMISIÓN
|
||||
---------------------------
|
||||
|
|
|
@ -45,6 +45,8 @@ OPTIONS
|
|||
Vérifie la syntaxe du fichier de configuration.
|
||||
*-a*, *--no-argb*::
|
||||
N'utilise pas le codage ARGB.
|
||||
*-r*, *--replace*::
|
||||
Replace an existing window manager
|
||||
|
||||
ASSOCIATIONS AVEC LA SOURIS (PAR DÉFAUT)
|
||||
----------------------------------------
|
||||
|
|
|
@ -52,6 +52,8 @@ OPZIONI
|
|||
Verifica la sintassi del file di configurazione.
|
||||
*-a*, *--no-argb*::
|
||||
Non usare visuali ARGB.
|
||||
*-r*, *--replace*::
|
||||
Replace an existing window manager
|
||||
|
||||
DEFAULT SCORCIATOIE CON IL MOUSE
|
||||
--------------------------------
|
||||
|
|
|
@ -47,6 +47,8 @@ awesome - потрясающий оконный менеджер
|
|||
Проверить синтаксис конфигурационного файла.
|
||||
*-a*, *--no-argb*::
|
||||
Не использовать ARGB.
|
||||
*-r*, *--replace*::
|
||||
Replace an existing window manager
|
||||
|
||||
НАСТРОЙКИ МЫШИ ПО-УМОЛЧАНИЮ
|
||||
---------------------------
|
||||
|
|
|
@ -44,6 +44,8 @@ OPTIONS
|
|||
Check configuration file syntax.
|
||||
*-a*, *--no-argb*::
|
||||
Don't use ARGB visuals.
|
||||
*-r*, *--replace*::
|
||||
Replace an existing window manager
|
||||
|
||||
DEFAULT MOUSE BINDINGS
|
||||
-----------------------
|
||||
|
|
Loading…
Reference in New Issue