diff --git a/spectrwm.1 b/spectrwm.1 index 01e55c4..c8f74d5 100644 --- a/spectrwm.1 +++ b/spectrwm.1 @@ -772,6 +772,8 @@ menu quit .It Cm M-q restart +.It Aq Ar unbound +restart_of_day .It Cm M- Ns Aq Cm Space cycle_layout .It Cm M-S-\e @@ -941,6 +943,10 @@ Quit .It Cm restart Restart .Nm . +.It Cm restart_of_day +Same as +.Ic restart +but configuration file is loaded in full. .It Cm cycle_layout Cycle layout. .It Cm flip_layout diff --git a/spectrwm.c b/spectrwm.c index 6e88f83..2f479e3 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -711,6 +711,7 @@ union arg { #define SWM_ARG_ID_CYCLERG_MOVE_DOWN (113) #define SWM_ARG_ID_WS_EMPTY (120) #define SWM_ARG_ID_WS_EMPTY_MOVE (121) +#define SWM_ARG_ID_RESTARTOFDAY (130) char **argv; }; @@ -981,6 +982,7 @@ enum actionid { FN_RESIZE, FN_RESIZE_CENTERED, FN_RESTART, + FN_RESTART_OF_DAY, FN_RG_1, FN_RG_2, FN_RG_3, @@ -4258,6 +4260,9 @@ restart(struct binding *bp, struct swm_region *r, union arg *args) shutdown_cleanup(); + if (args->id == SWM_ARG_ID_RESTARTOFDAY) + unsetenv("SWM_STARTED"); + execvp(start_argv[0], start_argv); warn("execvp failed"); quit(NULL, NULL, NULL); @@ -8248,6 +8253,7 @@ struct action { { "resize", resize, FN_F_NOREPLAY, {.id = SWM_ARG_ID_DONTCENTER} }, { "resize_centered", resize, FN_F_NOREPLAY, {.id = SWM_ARG_ID_CENTER} }, { "restart", restart, 0, {0} }, + { "restart_of_day", restart, 0, {SWM_ARG_ID_RESTARTOFDAY} }, { "rg_1", focusrg, 0, {.id = 0} }, { "rg_2", focusrg, 0, {.id = 1} }, { "rg_3", focusrg, 0, {.id = 2} },