mirror of
https://github.com/0intro/wmii
synced 2025-01-23 02:22:08 +03:00
Fix some bugs.
This commit is contained in:
parent
9f87cf8cc5
commit
c14944c2b4
@ -6,7 +6,7 @@ lconf="$home/.wmii-CONFVERSION"
|
||||
gconf="CONFPREFIX/wmii-CONFVERSION"
|
||||
|
||||
export WMII_CONFPATH="$lconf:$gconf"
|
||||
export POSIXLY_CORRECT=gnu_hippies
|
||||
#export POSIXLY_CORRECT=gnu_hippies
|
||||
|
||||
which="$(which which)"
|
||||
if wmii9rc; then
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "util.c"
|
||||
@ -79,8 +80,7 @@ init(Display *d) { /* Hrm... assumes one display... */
|
||||
unsetenv("WMII_HACK_TAGS");
|
||||
|
||||
n = tokenize(toks, nelem(toks)-1, s, '+');
|
||||
toks[n] = 0;
|
||||
tags = strlistdup(toks);
|
||||
tags = strlistdup(toks, n);
|
||||
free(s);
|
||||
}
|
||||
if((s = getenv("WMII_HACK_TIME"))) {
|
||||
|
@ -151,14 +151,13 @@ strlistdup(char *list[], int n) {
|
||||
#endif
|
||||
|
||||
static char**
|
||||
strlistdup(char *list[]) {
|
||||
strlistdup(char *list[], int n) {
|
||||
char **p, *q;
|
||||
int i, m, n;
|
||||
int i, m;
|
||||
|
||||
n = 0;
|
||||
m = 0;
|
||||
for(p=list; *p; p++, n++)
|
||||
m += strlen(*p) + 1;
|
||||
for(i=0; i < n; i++)
|
||||
m += strlen(list[i]) + 1;
|
||||
|
||||
p = malloc((n+1) * sizeof(*p) + m);
|
||||
q = (char*)&p[n+1];
|
||||
@ -184,7 +183,7 @@ getprop_textlist(Display *display, Window w, char *name, char **ret[]) {
|
||||
XGetTextProperty(display, w, &prop, xatom(display, name));
|
||||
if(prop.nitems > 0) {
|
||||
if(Xutf8TextPropertyToTextList(display, &prop, &list, &n) == Success) {
|
||||
*ret = strlistdup(list);
|
||||
*ret = strlistdup(list, n);
|
||||
XFreeStringList(list);
|
||||
}
|
||||
XFree(prop.value);
|
||||
|
@ -123,10 +123,10 @@ fn Event-LeftBarMouseDown {
|
||||
|
||||
# Actions
|
||||
fn Action-rehash {
|
||||
comm -23 <{ls `{namespace}/proglist.* >[2]/dev/null | awk -F'\.' '{print $NF}'} \
|
||||
comm -23 <{ls `{namespace}^/proglist.* >[2]/dev/null | awk -F'.' '{print $NF}'} \
|
||||
<{ps | awk '{print $2}'} |
|
||||
while(id=`{read})
|
||||
rm `{namespace}/proglist.$id
|
||||
rm `{namespace}^/proglist.$id
|
||||
wi_proglist $PATH >$progs_file}
|
||||
fn Action-quit {
|
||||
wmiir xwrite /ctl quit}
|
||||
@ -233,7 +233,7 @@ xsetroot -solid $wmiibackground
|
||||
Action overridekeys
|
||||
|
||||
# Misc Setup
|
||||
progs_file=`{namespace}/proglist.$pid
|
||||
progs_file=`{namespace}^/proglist.$pid
|
||||
Action status
|
||||
Action rehash
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user