wmutils

X windows manipulation utilities
git clone git://z3bra.org/wmutils
Log | Files | Refs | LICENSE

commit 474b18958441e83442d6c0f0e6f8310401b4a508
parent 0fe8af749716d9e4ccd43533b82192c1dfbb374d
Author: z3bra <willyatmailoodotorg>
Date:   Sat Nov 14 15:58:44 2015

Update func names to cope with libwm

Diffstat:
 chwb.c  |  6 +++---
 chwso.c |  6 +++---
 ignw.c  |  4 ++--
 killw.c |  4 ++--
 lsw.c   | 10 +++++-----
 mapw.c  |  6 +++---
 pfw.c   |  4 ++--
 wattr.c | 22 +++++++++++-----------
 wmp.c   | 10 +++++-----
 wmv.c   |  8 ++++----
 wrs.c   |  8 ++++----
 wtf.c   |  6 +++---
 wtp.c   |  6 +++---
 13 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/chwb.c b/chwb.c @@ -43,15 +43,15 @@ main(int argc, char **argv) /* NOTREACHED */ } ARGEND - init_xcb(&conn); + wm_init_xcb(&conn); /* assume remaining arguments are windows */ while (*argv) - set_border(width, color, strtoul(*argv++, NULL, 16)); + wm_set_border(width, color, strtoul(*argv++, NULL, 16)); xcb_flush(conn); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/chwso.c b/chwso.c @@ -30,7 +30,7 @@ main(int argc, char **argv) if (argc != 3) usage(argv[0]); - init_xcb(&conn); + wm_init_xcb(&conn); win = strtoul(argv[2], NULL, 16); if (!win) @@ -51,8 +51,8 @@ main(int argc, char **argv) break; } ARGEND - restack(win, mode); + wm_restack(win, mode); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/ignw.c b/ignw.c @@ -42,14 +42,14 @@ main(int argc, char **argv) default: usage(argv0); } ARGEND; - init_xcb(&conn); + wm_init_xcb(&conn); while (*argv) set_override(strtoul(*argv++, NULL, 16), setflag); xcb_flush(conn); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/killw.c b/killw.c @@ -25,7 +25,7 @@ main(int argc, char **argv) if (argc < 2) usage(argv[0]); - init_xcb(&conn); + wm_init_xcb(&conn); /* assume remaining arguments are windows */ while (*argv) @@ -33,7 +33,7 @@ main(int argc, char **argv) xcb_flush(conn); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/lsw.c b/lsw.c @@ -27,13 +27,13 @@ list_windows(xcb_window_t w, int listmask) int i, wn; xcb_window_t *wc; - wn = get_windows(w, &wc); + wn = wm_get_windows(w, &wc); if (wc == NULL) errx(1, "0x%08x: unable to retrieve children", w); for (i=0; i<wn; i++) { - if (is_listable(wc[i], listmask)) + if (wm_is_listable(wc[i], listmask)) printf("0x%08x\n", wc[i]); } @@ -64,8 +64,8 @@ main(int argc, char **argv) /* NOTREACHED */ } ARGEND - init_xcb(&conn); - get_screen(conn, &scrn); + wm_init_xcb(&conn); + wm_get_screen(conn, &scrn); if (rootflag == 1) { printf("0x%08x\n", scrn->root); @@ -78,7 +78,7 @@ main(int argc, char **argv) while (*argv) list_windows(strtoul(*argv++, NULL, 16), listmask); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/mapw.c b/mapw.c @@ -45,14 +45,14 @@ main(int argc, char **argv) if (argc < 1 || mapflag == 0) usage(argv0); - init_xcb(&conn); + wm_init_xcb(&conn); while (*argv) { w = strtoul(*argv++, NULL, 16); - remap(w, mapflag); + wm_remap(w, mapflag); } - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/pfw.c b/pfw.c @@ -31,10 +31,10 @@ focus_window(void) int main(int argc, char **argv) { - init_xcb(&conn); + wm_init_xcb(&conn); printf("0x%08x\n", focus_window()); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/wattr.c b/wattr.c @@ -31,11 +31,11 @@ main(int argc, char **argv) usage(argv[0]); } - init_xcb(&conn); + wm_init_xcb(&conn); if (argc == 2) { w = strtoul(argv[1], NULL, 16); - ret = is_alive(w) ? 0 : 1; + ret = wm_is_alive(w) ? 0 : 1; goto end; } @@ -48,28 +48,28 @@ main(int argc, char **argv) printf("0x%08x", w); break; case 'b': - printf("%d", get_attribute(w, ATTR_B)); + printf("%d", wm_get_attribute(w, ATTR_B)); break; case 'h': - printf("%d", get_attribute(w, ATTR_H)); + printf("%d", wm_get_attribute(w, ATTR_H)); break; case 'x': - printf("%d", get_attribute(w, ATTR_X)); + printf("%d", wm_get_attribute(w, ATTR_X)); break; case 'y': - printf("%d", get_attribute(w, ATTR_Y)); + printf("%d", wm_get_attribute(w, ATTR_Y)); break; case 'w': - printf("%d", get_attribute(w, ATTR_W)); + printf("%d", wm_get_attribute(w, ATTR_W)); break; case 'o': - ret = is_ignored(w) ? 0 : 1; + ret = wm_is_ignored(w) ? 0 : 1; goto end; case 'm': - ret = is_mapped(w) ? 0 : 1; + ret = wm_is_mapped(w) ? 0 : 1; goto end; default: - kill_xcb(&conn); usage(argv[0]); + wm_kill_xcb(&conn); usage(argv[0]); } /* add a space if more attribute come after */ putc(i+1 < strlen(argv[1]) ? ' ' : '\n',stdout); @@ -77,6 +77,6 @@ main(int argc, char **argv) } end: - kill_xcb(&conn); + wm_kill_xcb(&conn); return ret; } diff --git a/wmp.c b/wmp.c @@ -39,18 +39,18 @@ main(int argc, char **argv) /* NOTREACHED */ } ARGEND - init_xcb(&conn); - get_screen(conn, &scrn); + wm_init_xcb(&conn); + wm_get_screen(conn, &scrn); switch (argc) { case 0: case 1: win = argc > 0 ? strtoul(*argv, NULL, 16) : scrn->root; - if (get_cursor(mode, win, &x, &y)) + if (wm_get_cursor(mode, win, &x, &y)) printf("%d %d\n", x, y); break; case 2: - set_cursor(atoi(argv[0]), atoi(argv[1]), mode); + wm_set_cursor(atoi(argv[0]), atoi(argv[1]), mode); break; default: usage(argv0); @@ -59,6 +59,6 @@ main(int argc, char **argv) xcb_flush(conn); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/wmv.c b/wmv.c @@ -26,8 +26,8 @@ main(int argc, char **argv) if (argc < 4) usage(argv[0]); - init_xcb(&conn); - get_screen(conn, &scrn); + wm_init_xcb(&conn); + wm_get_screen(conn, &scrn); if (argv[1][0] == '-' && argv[1][1] == 'a') { mode = ABSOLUTE; @@ -38,11 +38,11 @@ main(int argc, char **argv) y = atoi(*(++argv)); while (*argv) - move(strtoul(*argv++, NULL, 16), mode, x, y); + wm_move(strtoul(*argv++, NULL, 16), mode, x, y); xcb_flush(conn); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/wrs.c b/wrs.c @@ -26,8 +26,8 @@ main(int argc, char **argv) if (argc < 4) usage(argv[0]); - init_xcb(&conn); - get_screen(conn, &scrn); + wm_init_xcb(&conn); + wm_get_screen(conn, &scrn); if (argv[1][0] == '-' && argv[1][1] == 'a') { mode = ABSOLUTE; @@ -38,11 +38,11 @@ main(int argc, char **argv) y = atoi(*(++argv)); while (*argv) - resize(strtoul(*argv++, NULL, 16), mode, x, y); + wm_resize(strtoul(*argv++, NULL, 16), mode, x, y); xcb_flush(conn); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/wtf.c b/wtf.c @@ -28,12 +28,12 @@ main(int argc, char **argv) if (argc != 2 || strncmp(argv[0], "-h", 2) == 0) usage(argv[0]); - init_xcb(&conn); + wm_init_xcb(&conn); win = strtoul(argv[1], NULL, 16); - set_focus(win); + wm_set_focus(win); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; } diff --git a/wtp.c b/wtp.c @@ -27,15 +27,15 @@ main(int argc, char **argv) if (argc != 6) usage(argv[0]); - init_xcb(&conn); + wm_init_xcb(&conn); win = strtoul(argv[5], NULL, 16); if (!win) errx(1, "cannot get window"); - teleport(win, atoi(argv[1]), atoi(argv[2]), + wm_teleport(win, atoi(argv[1]), atoi(argv[2]), atoi(argv[3]), atoi(argv[4])); - kill_xcb(&conn); + wm_kill_xcb(&conn); return 0; }