diff --git a/awesomerc.5.txt b/awesomerc.5.txt index ccc35dca..4b2de28d 100644 --- a/awesomerc.5.txt +++ b/awesomerc.5.txt @@ -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. diff --git a/awesomerc.in b/awesomerc.in index 68b4d40a..67c6acde 100644 --- a/awesomerc.in +++ b/awesomerc.in @@ -395,8 +395,7 @@ keys { modkey = {"Mod4", "Control"} key = "r" - command = "exec" - arg = "awesome" + command = "restart" } key { diff --git a/uicb.c b/uicb.c index bc1d023b..57a8faa9 100644 --- a/uicb.c +++ b/uicb.c @@ -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 diff --git a/uicb.h b/uicb.h index cf30e0e4..add284d1 100644 --- a/uicb.h +++ b/uicb.h @@ -26,6 +26,7 @@ typedef void (Uicb)(int, char *); int parse_control(char *); +Uicb uicb_restart; Uicb uicb_exec; Uicb uicb_spawn;