View Single Post
Old 10-16-2012, 10:54 PM   #3
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
simple one liner:

[root@kindle root]# xprop -name LBreakout2 -f WM_NAME 8s -set WM_NAME "bob"


done.

Here's some handy code for more serious code level work.

Spoiler:
Quote:
#include <string.h>

#include <xcb/xcb.h>
#include <xcb/xcb_atom.h>

int
main ()
{
xcb_connection_t *c;
xcb_screen_t *screen;
xcb_window_t win;
char *title = "Hello World !";
char *title_icon = "Hello World ! (iconified)";



/* Open the connection to the X server */
c = xcb_connect (NULL, NULL);

/* Get the first screen */
screen = xcb_setup_roots_iterator (xcb_get_setup (c)).data;

/* Ask for our window's Id */
win = xcb_generate_id (c);

/* Create the window */
xcb_create_window (c, /* Connection */
0, /* depth */
win, /* window Id */
screen->root, /* parent window */
0, 0, /* x, y */
250, 150, /* width, height */
10, /* border_width */
XCB_WINDOW_CLASS_INPUT_OUTPUT, /* class */
screen->root_visual, /* visual */
0, NULL); /* masks, not used */

/* Set the title of the window */
xcb_change_property (c, XCB_PROP_MODE_REPLACE, win,
WM_NAME, STRING, 8,
strlen (title), title);

/* Set the title of the window icon */
xcb_change_property (c, XCB_PROP_MODE_REPLACE, win,
WM_ICON_NAME, STRING, 8,
strlen(title_icon), title_icon);

/* Map the window on the screen */
xcb_map_window (c, win);

xcb_flush (c);

while (1) {}

return 0;
}
I suppose that could be refactored to do the job

Last edited by twobob; 10-16-2012 at 11:08 PM.
twobob is offline   Reply With Quote