all repos — fluxbox @ 24c023192fd5757bd1e1308f3aa00a41d0e21728

custom fork of the fluxbox windowmanager

minor cosmetics to fluxbox-remote, display of usage
mathias mathias
commit

24c023192fd5757bd1e1308f3aa00a41d0e21728

parent

b70f4c144c0428324952f40939b2ada2a2d173a9

1 files changed, 14 insertions(+), 6 deletions(-)

jump to
M util/fluxbox-remote.ccutil/fluxbox-remote.cc

@@ -24,15 +24,21 @@

#include <X11/Xlib.h> #include <X11/Xatom.h> #include <string.h> +#include <stdlib.h> +#include <stdio.h> int main(int argc, char **argv) { - if (argc <= 1) - return 1; + if (argc <= 1) { + printf("fluxbox-remote <fluxbox-command>\n"); + return EXIT_SUCCESS; + } Display *disp = XOpenDisplay(NULL); - if (!disp) - return 1; + if (!disp) { + perror("error, can't open display."); + return EXIT_FAILURE; + } Atom fbcmd_atom = XInternAtom(disp, "_FLUXBOX_COMMAND", False); Window root = DefaultRootWindow(disp);

@@ -44,6 +50,8 @@ (unsigned char *) str, strlen(str));

XCloseDisplay(disp); if (ret == Success) - return 0; - return 1; + return EXIT_SUCCESS; + + return EXIT_FAILURE; } +