Add uicb_restart to restart awesome with the real command line

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-03-21 14:31:10 +01:00
parent cef6c116f9
commit eabe161522
4 changed files with 18 additions and 4 deletions

View File

@ -252,7 +252,9 @@ General
*spawn* client::
Execute an external program.
*exec* program::
Replace awesome with another window manager (or itself; i.e. reload config).
Replace awesome with another window manager.
*restart*::
Restart awesome.
*widget_tell* widget-identifier data::
Feed information to your widgets.

View File

@ -395,8 +395,7 @@ keys
{
modkey = {"Mod4", "Control"}
key = "r"
command = "exec"
arg = "awesome"
command = "restart"
}
key
{

14
uicb.c
View File

@ -46,9 +46,21 @@ extern AwesomeConf globalconf;
#include "uicbgen.h"
/** Restart awesome with the current command line
* \param screen ID (unused)
* \param arg arg (unused)
* \ingroup ui_callback
*/
void
uicb_restart(int screen __attribute__ ((unused)),
char *arg __attribute__ ((unused)))
{
uicb_exec(0, globalconf.argv);
}
/** Execute another process, replacing the current instance of Awesome
* \param screen Screen ID
* \param arg Command
* \param cmd Command
* \ingroup ui_callback
*/
void

1
uicb.h
View File

@ -26,6 +26,7 @@ typedef void (Uicb)(int, char *);
int parse_control(char *);
Uicb uicb_restart;
Uicb uicb_exec;
Uicb uicb_spawn;