diff options
Diffstat (limited to 'commands/helpers/list-outputs.c')
-rw-r--r-- | commands/helpers/list-outputs.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/commands/helpers/list-outputs.c b/commands/helpers/list-outputs.c deleted file mode 100644 index 183258c..0000000 --- a/commands/helpers/list-outputs.c +++ /dev/null @@ -1,33 +0,0 @@ -#include <stdio.h> -#include <X11/extensions/Xrandr.h> - -int main(int argc, char **argv) -{ - Display *dpy = XOpenDisplay(NULL); - XRRScreenResources *rr; - XRROutputInfo *output; - int i; - - XSynchronize(dpy, 1); - - rr = XRRGetScreenResources(dpy, DefaultRootWindow(dpy)); - - if (rr != NULL) { - for (i = 0; i < rr->noutput; i++) { - output = XRRGetOutputInfo(dpy, rr, rr->outputs[i]); - - if (output->connection == RR_Connected) { - printf("%s\n", output->name); - } - - XRRFreeOutputInfo(output); - } - } - - XRRFreeScreenResources(rr); - - XSync(dpy, 1); - XCloseDisplay(dpy); - - return 0; -} |