mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 18:01:37 -05:00
New optional EXIT_STATUS argument for 'quit'
Also removed the 'reload' message because of its uselessness.
This commit is contained in:
parent
243b39d3b8
commit
62f32bc655
5 changed files with 8 additions and 12 deletions
|
@ -206,10 +206,7 @@ The following messages are handled:
|
|||
reload_settings
|
||||
Reload the default settings.
|
||||
|
||||
reload
|
||||
Reload the autostart file and the default settings.
|
||||
|
||||
quit
|
||||
quit [EXIT_STATUS]
|
||||
Quit.
|
||||
|
||||
## Settings
|
||||
|
|
5
bspwm.1
5
bspwm.1
|
@ -229,10 +229,7 @@ Reload the autostart file.
|
|||
.BI reload_settings
|
||||
Reload the default settings.
|
||||
.TP
|
||||
.BI reload
|
||||
Reload the autostart file and the default settings.
|
||||
.TP
|
||||
.BI quit
|
||||
.BI quit " [EXIT_STATUS]"
|
||||
Quit.
|
||||
.SH SETTINGS
|
||||
Colors are either
|
||||
|
|
3
bspwm.c
3
bspwm.c
|
@ -139,6 +139,7 @@ void setup(void)
|
|||
last_entered = XCB_NONE;
|
||||
split_mode = MODE_AUTOMATIC;
|
||||
visible = true;
|
||||
exit_status = 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -250,5 +251,5 @@ int main(int argc, char *argv[])
|
|||
free(ewmh);
|
||||
xcb_flush(dpy);
|
||||
xcb_disconnect(dpy);
|
||||
return 0;
|
||||
return exit_status;
|
||||
}
|
||||
|
|
1
bspwm.h
1
bspwm.h
|
@ -28,6 +28,7 @@ rule_t *rule_head;
|
|||
pointer_state_t *frozen_pointer;
|
||||
xcb_point_t pointer_position;
|
||||
xcb_window_t last_entered;
|
||||
int exit_status;
|
||||
|
||||
bool visible;
|
||||
bool running;
|
||||
|
|
|
@ -343,14 +343,14 @@ void process_message(char *msg, char *rsp)
|
|||
return;
|
||||
} else if (strcmp(cmd, "adopt_orphans") == 0) {
|
||||
adopt_orphans();
|
||||
} else if (strcmp(cmd, "reload") == 0) {
|
||||
load_settings();
|
||||
run_autostart();
|
||||
} else if (strcmp(cmd, "reload_autostart") == 0) {
|
||||
run_autostart();
|
||||
} else if (strcmp(cmd, "reload_settings") == 0) {
|
||||
load_settings();
|
||||
} else if (strcmp(cmd, "quit") == 0) {
|
||||
char *arg = strtok(NULL, TOK_SEP);
|
||||
if (arg != NULL)
|
||||
sscanf(arg, "%i", &exit_status);
|
||||
quit();
|
||||
return;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue