Merge branch 'master' into bacardi55
Conflicts: src/wmfs.c
This commit is contained in:
commit
f6206d65b1
@ -718,6 +718,7 @@ conf_launcher_section(void)
|
|||||||
conf.launcher[i].name = fetch_opt_first(set_launcher[i], "launcher", "name").str;
|
conf.launcher[i].name = fetch_opt_first(set_launcher[i], "launcher", "name").str;
|
||||||
conf.launcher[i].prompt = fetch_opt_first(set_launcher[i], "Exec:", "prompt").str;
|
conf.launcher[i].prompt = fetch_opt_first(set_launcher[i], "Exec:", "prompt").str;
|
||||||
conf.launcher[i].command = fetch_opt_first(set_launcher[i], "exec", "command").str;
|
conf.launcher[i].command = fetch_opt_first(set_launcher[i], "exec", "command").str;
|
||||||
|
conf.launcher[i].width = fetch_opt_first(set_launcher[i], "0", "width_limit").num;
|
||||||
conf.launcher[i].nhisto = 1;
|
conf.launcher[i].nhisto = 1;
|
||||||
}
|
}
|
||||||
free(set_launcher);
|
free(set_launcher);
|
||||||
|
|||||||
@ -105,6 +105,7 @@ ewmh_init_hints(void)
|
|||||||
net_atom[wmfs_nmaster] = ATOM("_WMFS_NMASTER");
|
net_atom[wmfs_nmaster] = ATOM("_WMFS_NMASTER");
|
||||||
net_atom[wmfs_function] = ATOM("_WMFS_FUNCTION");
|
net_atom[wmfs_function] = ATOM("_WMFS_FUNCTION");
|
||||||
net_atom[wmfs_cmd] = ATOM("_WMFS_CMD");
|
net_atom[wmfs_cmd] = ATOM("_WMFS_CMD");
|
||||||
|
net_atom[wmfs_font] = ATOM("_WMFS_FONT");
|
||||||
|
|
||||||
/* Multi atom _WMFS_STATUSTEXT_<screennum> */
|
/* Multi atom _WMFS_STATUSTEXT_<screennum> */
|
||||||
for(j = 0; j < s; ++j)
|
for(j = 0; j < s; ++j)
|
||||||
|
|||||||
@ -91,6 +91,10 @@ init_font(void)
|
|||||||
font = XftFontOpenName(dpy, SCREEN, "sans-10");
|
font = XftFontOpenName(dpy, SCREEN, "sans-10");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set font in _WMFS_FONT for eventual status tools */
|
||||||
|
XChangeProperty(dpy, ROOT, net_atom[wmfs_font], net_atom[utf8_string], 8,
|
||||||
|
PropModeReplace, (uchar*)&conf.font, strlen(conf.font));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ launcher_execute(Launcher *launcher)
|
|||||||
char buf[512] = { 0 };
|
char buf[512] = { 0 };
|
||||||
char tmpbuf[512] = { 0 };
|
char tmpbuf[512] = { 0 };
|
||||||
char *complete;
|
char *complete;
|
||||||
int i, pos = 0, histpos = 0, x;
|
int i, pos = 0, histpos = 0, x, w;
|
||||||
int tabhits = 0;
|
int tabhits = 0;
|
||||||
KeySym ks;
|
KeySym ks;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
@ -59,8 +59,10 @@ launcher_execute(Launcher *launcher)
|
|||||||
|
|
||||||
XGrabKeyboard(dpy, ROOT, True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
XGrabKeyboard(dpy, ROOT, True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
|
|
||||||
bw = barwin_create(infobar[selscreen].bar->win, x, 1,
|
w = (launcher->width ? launcher->width : infobar[selscreen].bar->geo.width - x - 1);
|
||||||
infobar[selscreen].bar->geo.width - x - 1,
|
|
||||||
|
bw = barwin_create(infobar[selscreen].bar->win, x, 1, w,
|
||||||
|
/* infobar[selscreen].bar->geo.width - x - 1, */
|
||||||
infobar[selscreen].bar->geo.height - 2,
|
infobar[selscreen].bar->geo.height - 2,
|
||||||
infobar[selscreen].bar->bg,
|
infobar[selscreen].bar->bg,
|
||||||
infobar[selscreen].bar->fg,
|
infobar[selscreen].bar->fg,
|
||||||
@ -71,9 +73,7 @@ launcher_execute(Launcher *launcher)
|
|||||||
|
|
||||||
/* First draw of the cursor */
|
/* First draw of the cursor */
|
||||||
XSetForeground(dpy, gc, getcolor(infobar[selscreen].bar->fg));
|
XSetForeground(dpy, gc, getcolor(infobar[selscreen].bar->fg));
|
||||||
/*XDrawLine(dpy, bw->dr, gc, 1 + textw(launcher->prompt) + textw(" "),
|
|
||||||
, 1 + textw(launcher->prompt) + textw(" "), INFOBARH - 4);
|
|
||||||
*/
|
|
||||||
XDrawLine(dpy, bw->dr, gc,
|
XDrawLine(dpy, bw->dr, gc,
|
||||||
1 + textw(launcher->prompt) + textw(" ") + textw(buf), 2,
|
1 + textw(launcher->prompt) + textw(" ") + textw(buf), 2,
|
||||||
1 + textw(launcher->prompt) + textw(" ") + textw(buf), INFOBARH - 4);
|
1 + textw(launcher->prompt) + textw(" ") + textw(buf), INFOBARH - 4);
|
||||||
|
|||||||
@ -148,6 +148,7 @@ enum
|
|||||||
wmfs_screen_count,
|
wmfs_screen_count,
|
||||||
wmfs_function,
|
wmfs_function,
|
||||||
wmfs_cmd,
|
wmfs_cmd,
|
||||||
|
wmfs_font,
|
||||||
wmfs_statustext,
|
wmfs_statustext,
|
||||||
net_last
|
net_last
|
||||||
};
|
};
|
||||||
@ -333,6 +334,7 @@ typedef struct
|
|||||||
char *command;
|
char *command;
|
||||||
char histo[HISTOLEN][512];
|
char histo[HISTOLEN][512];
|
||||||
uint nhisto;
|
uint nhisto;
|
||||||
|
int width;
|
||||||
} Launcher;
|
} Launcher;
|
||||||
|
|
||||||
/* Button struct */
|
/* Button struct */
|
||||||
|
|||||||
@ -422,6 +422,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
argv_global = xstrdup(argv[0]);
|
argv_global = xstrdup(argv[0]);
|
||||||
all_argv = argv;
|
all_argv = argv;
|
||||||
|
|
||||||
sprintf(conf.confpath, "%s/"DEF_CONF, getenv("HOME"));
|
sprintf(conf.confpath, "%s/"DEF_CONF, getenv("HOME"));
|
||||||
|
|
||||||
while((i = getopt(argc, argv, "hviSc:s:g:C:V:")) != -1)
|
while((i = getopt(argc, argv, "hviSc:s:g:C:V:")) != -1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user