}
sasprintf(&res, "bindsym %s%s%s %s%s\n", (modifiers == NULL ? "" : modrep), (modifiers == NULL ? "" : "+"), str, (release == NULL ? "" : release), get_string("command"));
clear_stack();
}
sasprintf(&res, "bindsym %s%s%s %s%s\n", (modifiers == NULL ? "" : modrep), (modifiers == NULL ? "" : "+"), str, (release == NULL ? "" : release), get_string("command"));
clear_stack();
const color_t black = draw_util_hex_to_color("#000000");
const color_t white = draw_util_hex_to_color("#FFFFFF");
const color_t green = draw_util_hex_to_color("#00FF00");
const color_t black = draw_util_hex_to_color("#000000");
const color_t white = draw_util_hex_to_color("#FFFFFF");
const color_t green = draw_util_hex_to_color("#00FF00");
printf("creating \"%s\"...\n", config_path);
struct xkb_context *xkb_context;
printf("creating \"%s\"...\n", config_path);
struct xkb_context *xkb_context;
static struct option long_options[] = {
{"socket", required_argument, 0, 's'},
{"version", no_argument, 0, 'v'},
static struct option long_options[] = {
{"socket", required_argument, 0, 's'},
{"version", no_argument, 0, 'v'},
{"limit", required_argument, 0, 'l'},
{"prompt", required_argument, 0, 'P'},
{"prefix", required_argument, 0, 'p'},
{"limit", required_argument, 0, 'l'},
{"prompt", required_argument, 0, 'P'},
{"prefix", required_argument, 0, 'p'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}};
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}};
while ((o = getopt_long(argc, argv, options_string, long_options, &option_index)) != -1) {
switch (o) {
while ((o = getopt_long(argc, argv, options_string, long_options, &option_index)) != -1) {
switch (o) {
+ case 'm':
+ headless_run = true;
+ if (strcmp(optarg, "alt") == 0)
+ modifier = MOD_Mod1;
+ else if (strcmp(optarg, "win") == 0)
+ modifier = MOD_Mod4;
+ else
+ err(EXIT_FAILURE, "Invalid modifier key %s", optarg);
+ break;
/* Place requests for the atoms we need as soon as possible */
#define xmacro(atom) \
xcb_intern_atom_cookie_t atom##_cookie = xcb_intern_atom(conn, 0, strlen(#atom), #atom);
#include "atoms.xmacro"
#undef xmacro
/* Place requests for the atoms we need as soon as possible */
#define xmacro(atom) \
xcb_intern_atom_cookie_t atom##_cookie = xcb_intern_atom(conn, 0, strlen(#atom), #atom);
#include "atoms.xmacro"
#undef xmacro
+ /* Init startup notification. */
+ SnDisplay *sndisplay = sn_xcb_display_new(conn, NULL, NULL);
+ SnLauncheeContext *sncontext = sn_launchee_context_new_from_environment(sndisplay, screen);
+ sn_display_unref(sndisplay);
+
root_screen = xcb_aux_get_screen(conn, screen);
root = root_screen->root;
root_screen = xcb_aux_get_screen(conn, screen);
root = root_screen->root;
0, /* back pixel: black */
XCB_EVENT_MASK_EXPOSURE |
XCB_EVENT_MASK_BUTTON_PRESS});
0, /* back pixel: black */
XCB_EVENT_MASK_EXPOSURE |
XCB_EVENT_MASK_BUTTON_PRESS});
/* Map the window (make it visible) */
xcb_map_window(conn, win);
/* Map the window (make it visible) */
xcb_map_window(conn, win);
/* Strip off the highest bit (set if the event is generated) */
int type = (event->response_type & 0x7F);
/* Strip off the highest bit (set if the event is generated) */
int type = (event->response_type & 0x7F);