mirror of
https://github.com/0intro/wmii
synced 2025-02-16 22:35:20 +03:00
sh sucks. Added more quoting to wmiirc.
This commit is contained in:
parent
63bc535951
commit
b71912e999
33
cmd/wm/wm.h
33
cmd/wm/wm.h
@ -149,7 +149,7 @@ typedef struct Rules {
|
||||
} Rules;
|
||||
|
||||
/* default values */
|
||||
typedef struct {
|
||||
struct {
|
||||
BlitzColor selcolor;
|
||||
BlitzColor normcolor;
|
||||
BlitzFont font;
|
||||
@ -162,29 +162,42 @@ typedef struct {
|
||||
char grabmod[5];
|
||||
unsigned long mod;
|
||||
int colmode;
|
||||
} Default;
|
||||
} def;
|
||||
|
||||
typedef struct WMScreen WMScreen;
|
||||
struct WMScreen {
|
||||
Bar *lbar;
|
||||
Bar *rbar;
|
||||
View *sel;
|
||||
|
||||
XRectangle rect;
|
||||
XRectangle brect;
|
||||
Window barwin;
|
||||
BlitzBrush bbrush;
|
||||
} *screens;
|
||||
/* to be removed */
|
||||
Bar *lbar;
|
||||
Bar *rbar;
|
||||
View *sel;
|
||||
|
||||
XRectangle rect;
|
||||
XRectangle brect;
|
||||
Window barwin;
|
||||
BlitzBrush bbrush;
|
||||
|
||||
/* global variables */
|
||||
View *view;
|
||||
Client *client;
|
||||
Key *key;
|
||||
Bar *lbar;
|
||||
Bar *rbar;
|
||||
|
||||
enum { BUFFER_SIZE = 8092 };
|
||||
char buffer[BUFFER_SIZE];
|
||||
|
||||
View *sel;
|
||||
P9Srv p9srv;
|
||||
Blitz blz;
|
||||
XRectangle rect;
|
||||
IXPServer srv;
|
||||
Window barwin;
|
||||
GC xorgc;
|
||||
BlitzBrush bbrush;
|
||||
XRectangle brect;
|
||||
char *user;
|
||||
Default def;
|
||||
Atom wm_atom[WMLast];
|
||||
Atom net_atom[NetLast];
|
||||
Atom tags_atom;
|
||||
|
13
rc/wmiirc
13
rc/wmiirc
@ -122,7 +122,7 @@ do
|
||||
if [ "X$tag" = "X$seltag" ]; then
|
||||
echo "$WMII_SELCOLORS" "$tag" | wmiir create "/lbar/$tag"
|
||||
else
|
||||
echo "$WMII_NORMCOLORS" "$tag" | wmiir create "/lbar/$tag "
|
||||
echo "$WMII_NORMCOLORS" "$tag" | wmiir create "/lbar/$tag"
|
||||
fi
|
||||
done
|
||||
unset IFS
|
||||
@ -136,6 +136,7 @@ do
|
||||
set -- $event
|
||||
set +f
|
||||
type="$1"; shift
|
||||
parms="$@"
|
||||
case "$type" in
|
||||
Start)
|
||||
if test wmiirc = "$1"
|
||||
@ -143,16 +144,16 @@ do
|
||||
exit
|
||||
fi;;
|
||||
CreateTag)
|
||||
echo "$WMII_NORMCOLORS" "$@" | wmiir create "/lbar/$@"
|
||||
echo "$WMII_NORMCOLORS" "$parms" | wmiir create "/lbar/$parms"
|
||||
;;
|
||||
DestroyTag)
|
||||
wmiir remove "/lbar/$@"
|
||||
wmiir remove "/lbar/$parms"
|
||||
;;
|
||||
FocusTag)
|
||||
xwrite "/lbar/$@" "$WMII_SELCOLORS" "$@"
|
||||
xwrite "/lbar/$parms" "$WMII_SELCOLORS" "$parms"
|
||||
;;
|
||||
UnfocusTag)
|
||||
xwrite "/lbar/$@" "$WMII_NORMCOLORS" "$@"
|
||||
xwrite "/lbar/$parms" "$WMII_NORMCOLORS" "$parms"
|
||||
;;
|
||||
LeftBarClick)
|
||||
shift
|
||||
@ -203,7 +204,7 @@ do
|
||||
xwrite "/client/`wmiir read /client/sel/ctl`/tags" \
|
||||
"`wmiir ls /tag | sed 's,/,,; /^sel$/d' | wmiimenu`" &;;
|
||||
$MODKEY-Shift-[0-9])
|
||||
xwrite /client/sel/tags `echo $1 | sed 's/.*-//'`;;
|
||||
xwrite /client/sel/tags "`echo $1 | sed 's/.*-//'`";;
|
||||
esac;;
|
||||
esac
|
||||
done &
|
||||
|
Loading…
x
Reference in New Issue
Block a user