minor cosmetics to fluxbox-remote, display of usage
This commit is contained in:
parent
b70f4c144c
commit
24c023192f
1 changed files with 14 additions and 6 deletions
|
@ -24,15 +24,21 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
if (argc <= 1)
|
if (argc <= 1) {
|
||||||
return 1;
|
printf("fluxbox-remote <fluxbox-command>\n");
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
Display *disp = XOpenDisplay(NULL);
|
Display *disp = XOpenDisplay(NULL);
|
||||||
if (!disp)
|
if (!disp) {
|
||||||
return 1;
|
perror("error, can't open display.");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
Atom fbcmd_atom = XInternAtom(disp, "_FLUXBOX_COMMAND", False);
|
Atom fbcmd_atom = XInternAtom(disp, "_FLUXBOX_COMMAND", False);
|
||||||
Window root = DefaultRootWindow(disp);
|
Window root = DefaultRootWindow(disp);
|
||||||
|
@ -44,6 +50,8 @@ int main(int argc, char **argv) {
|
||||||
XCloseDisplay(disp);
|
XCloseDisplay(disp);
|
||||||
|
|
||||||
if (ret == Success)
|
if (ret == Success)
|
||||||
return 0;
|
return EXIT_SUCCESS;
|
||||||
return 1;
|
|
||||||
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue