Permalink
Browse files

Rearrange some things.

  • Loading branch information...
Kris Maglione
Kris Maglione committed Jun 14, 2010
1 parent 979a070 commit 62bf81beaadece6b2cd168e264e77f80e58b0f72
Showing with 267 additions and 431 deletions.
  1. +2 −1 .hgignore
  2. +1 −1 alternative_wmiircs/Makefile
  3. +1 −1 alternative_wmiircs/plan9port/Makefile
  4. +1 −1 alternative_wmiircs/python/Makefile
  5. +1 −1 alternative_wmiircs/python/pygmi/Makefile
  6. +1 −1 alternative_wmiircs/python/pyxp/Makefile
  7. +1 −1 alternative_wmiircs/ruby/Makefile
  8. +4 −10 cmd/Makefile
  9. +0 −18 cmd/click/Makefile
  10. +0 −77 cmd/click/_util.c
  11. +0 −17 cmd/click/dat.h
  12. +0 −1 cmd/click/fns.h
  13. +0 −60 cmd/click/main.c
  14. +0 −15 cmd/keyname/Makefile
  15. +1 −1 cmd/menu/history.c
  16. +1 −23 cmd/menu/keys.c
  17. +2 −2 cmd/wmii/fns.h
  18. +7 −32 cmd/wmii/key.c
  19. +4 −4 cmd/wmii/main.c
  20. +18 −0 cmd/x11/Makefile
  21. +27 −0 cmd/x11/setfocus.c
  22. +3 −16 cmd/{keyname/main.c → x11/wikeyname.c}
  23. +34 −0 cmd/x11/wiwarp.c
  24. 0 cmd/{ → x11}/wmii9menu.c
  25. +9 −9 debian/copyright
  26. +2 −2 doc/wmii.tex
  27. +1 −1 img/wmii.eps
  28. +2 −0 include/stuff/x.h
  29. +3 −2 include/stuff/x11.h
  30. +1 −1 lib/libbio/bcat.c
  31. +1 −1 lib/libbio/brdstr.c
  32. +1 −1 lib/libbio/bvprint.c
  33. +16 −16 lib/libfmt/fltfmt.c
  34. +1 −1 lib/libfmt/nan64.c
  35. +2 −2 lib/libfmt/runevsmprint.c
  36. +2 −2 lib/libfmt/vsmprint.c
  37. +1 −1 lib/libregexp/regcomp.c
  38. +1 −1 lib/libregexp/regsub.c
  39. +1 −1 lib/libregexp/rregsub.c
  40. +1 −1 lib/libstuff/event/clientmessage.c
  41. +1 −1 lib/libstuff/event/destroynotify.c
  42. +1 −1 lib/libstuff/event/enternotify.c
  43. +1 −1 lib/libstuff/event/expose.c
  44. +1 −1 lib/libstuff/event/focusin.c
  45. +1 −1 lib/libstuff/event/focusout.c
  46. +1 −1 lib/libstuff/event/leavenotify.c
  47. +1 −1 lib/libstuff/event/propertynotify.c
  48. +1 −1 lib/libstuff/event/selection.c
  49. +1 −1 lib/libstuff/event/selectionclear.c
  50. +1 −1 lib/libstuff/event/selectionrequest.c
  51. +0 −21 lib/libstuff/fmt/fmtbufinit.c
  52. +7 −7 lib/libstuff/map.c
  53. +6 −6 lib/libstuff/printevent.c
  54. +1 −1 lib/libstuff/util/estrndup.c
  55. +1 −1 lib/libstuff/util/getbase.c
  56. +1 −1 lib/libstuff/util/strcasestr.c
  57. +1 −1 lib/libstuff/util/utflcpy.c
  58. +1 −1 lib/libstuff/x11/convpts.c
  59. +1 −1 lib/libstuff/x11/drawing/drawpoly.c
  60. +1 −2 lib/libstuff/x11/errors.c
  61. +3 −3 lib/libstuff/x11/initdisplay.c
  62. +40 −2 lib/libstuff/x11/keys/parsekey.c
  63. +1 −1 lib/libstuff/x11/mouse/grabpointer.c
  64. +1 −1 lib/libstuff/x11/mouse/pointerscreen.c
  65. +1 −1 lib/libstuff/x11/mouse/querypointer.c
  66. +1 −1 lib/libstuff/x11/windows/findwin.c
  67. +1 −1 lib/libstuff/x11/xatom.c
  68. +2 −2 lib/libutf/runestrdup.c
  69. +1 −1 lib/libwmii_hack/x11.c
  70. +4 −11 man/wmii.1
  71. +5 −12 man/wmii.man1
  72. +1 −1 mk/lib.mk
  73. +1 −1 mk/so.mk
  74. +11 −6 mk/wmii.mk
  75. +1 −1 rc/Makefile
  76. +2 −2 rc/sh.wmii
  77. +1 −1 test/Makefile
  78. +2 −2 test/event.b
  79. +2 −2 util/genconfig
  80. +2 −2 util/link
View
@@ -4,7 +4,8 @@ syntax: regexp
\.([oa]|out|o_pic|so|pyc|pyo|diff)$
\.(diff|orig|rej|bak)$
\.(aux|idx|ilg|ind|log|toc)$
-^cmd/(stfo|osd|wiwarp|setfocus)(/|$)
+^cmd/osd(/|$)
+^cmd/x11/(stfo|wiclick)\.
^(pkg|src)/
^doxy
/bak/
@@ -2,7 +2,7 @@ ROOT=..
include $(ROOT)/mk/hdr.mk
include $(ROOT)/mk/wmii.mk
-BIN = $(ETC)/wmii$(CONFVERSION)
+BIN = $(GLOBALCONF)
DIRS = python \
plan9port \
ruby
@@ -5,5 +5,5 @@ include $(ROOT)/mk/wmii.mk
DOCS = README
EXECS = wmiirc
-DIR = $(ETC)/wmii$(CONFVERSION)/plan9port
+DIR = $(GLOBALCONF)/plan9port
DOCDIR = $(DOC)/alternative_wmiircs/plan9port
@@ -8,7 +8,7 @@ TEXT = wmiirc.py
DIRS = pygmi \
pyxp
-DIR = $(ETC)/wmii$(CONFVERSION)/python
+DIR = $(GLOBALCONF)/python
DOCDIR = $(DOC)/alternative_wmiircs/python
include $(ROOT)/mk/dir.mk
@@ -9,4 +9,4 @@ BINARY = __init__.py \
monitor.py \
util.py
-DIR = $(ETC)/wmii$(CONFVERSION)/python/pygmi
+DIR = $(GLOBALCONF)/python/pygmi
@@ -12,4 +12,4 @@ BINARY = __init__.py \
mux.py \
types.py
-DIR = $(ETC)/wmii$(CONFVERSION)/python/pyxp
+DIR = $(GLOBALCONF)/python/pyxp
@@ -9,5 +9,5 @@ EXECS = wmiirc
TEXT = config.rb \
config.yaml
-DIR = $(ETC)/wmii$(CONFVERSION)/ruby
+DIR = $(GLOBALCONF)/ruby
DOCDIR = $(DOC)/alternative_wmiircs/ruby
View
@@ -4,24 +4,18 @@ include $(ROOT)/mk/wmii.mk
wmiir.c: $(ROOT)/mk/wmii.mk
-DIRS = wmii \
- keyname \
- menu \
+DIRS = menu \
strut \
- tray
+ tray \
+ wmii \
+ x11
TARG = wihack \
wmii.rc \
wmii.sh \
- wmii9menu \
wmiir
LIBS += $(LIBS9) $(LIBIXP)
-CFLAGS += $(INCX11)
include $(ROOT)/mk/many.mk
include $(ROOT)/mk/dir.mk
-O9MENU=wmii9menu.o $(ROOT)/lib/libstuff.a $(LIBIXP)
-wmii9menu.out: $(O9MENU)
- $(LINK) $@ $(O9MENU) $$(pkg-config --libs $(X11PACKAGES)) -lXext
-
View
@@ -1,18 +0,0 @@
-ROOT= ../..
-include $(ROOT)/mk/hdr.mk
-include $(ROOT)/mk/wmii.mk
-
-main.c: $(ROOT)/mk/wmii.mk
-
-TARG = click
-HFILES= dat.h fns.h
-
-PACKAGES += $(X11PACKAGES) xext xrandr xrender xinerama
-
-LIB = $(LIBIXP) $(LIBS9)
-LIBS += -lm -lXtst
-CFLAGS += -DIXP_NEEDAPI=86
-OBJ = main
-
-include $(ROOT)/mk/one.mk
-
View
@@ -1,77 +0,0 @@
-/* Copyright ©2008-2010 Kris Maglione <maglione.k at Gmail>
- * See LICENSE file for license details.
- */
-#include "dat.h"
-#include <ctype.h>
-#include <string.h>
-#include "fns.h"
-
-#define strbcmp(str, const) (strncmp((str), (const), sizeof(const)-1))
-static int
-getbase(const char **s, long *sign) {
- const char *p;
- int ret;
-
- ret = 10;
- *sign = 1;
- if(**s == '-') {
- *sign = -1;
- *s += 1;
- }else if(**s == '+')
- *s += 1;
-
- p = *s;
- if(!strbcmp(p, "0x")) {
- *s += 2;
- ret = 16;
- }
- else if(isdigit(p[0])) {
- if(p[1] == 'r') {
- *s += 2;
- ret = p[0] - '0';
- }
- else if(isdigit(p[1]) && p[2] == 'r') {
- *s += 3;
- ret = 10*(p[0]-'0') + (p[1]-'0');
- }
- }
- else if(p[0] == '0') {
- ret = 8;
- }
- if(ret != 10 && (**s == '-' || **s == '+'))
- *sign = 0;
- return ret;
-}
-
-bool
-getlong(const char *s, long *ret) {
- const char *end;
- char *rend;
- int base;
- long sign;
-
- end = s+strlen(s);
- base = getbase(&s, &sign);
- if(sign == 0)
- return false;
-
- *ret = sign * strtol(s, &rend, base);
- return (end == rend);
-}
-
-bool
-getulong(const char *s, ulong *ret) {
- const char *end;
- char *rend;
- int base;
- long sign;
-
- end = s+strlen(s);
- base = getbase(&s, &sign);
- if(sign < 1)
- return false;
-
- *ret = strtoul(s, &rend, base);
- return (end == rend);
-}
-
View
@@ -1,17 +0,0 @@
-#include <fmt.h>
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stuff/x.h>
-#include <stuff/util.h>
-#include <ixp.h>
-
-#define BLOCK(x) do { x; }while(0)
-
-#ifndef EXTERN
-# define EXTERN extern
-#endif
-
-EXTERN Window win;
-
View
@@ -1 +0,0 @@
-
View
@@ -1,60 +0,0 @@
-/* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
- * See LICENSE file for license details.
- */
-#define EXTERN
-#include "dat.h"
-#include <X11/Xproto.h>
-#include <X11/extensions/XTest.h>
-#include <locale.h>
-#include <string.h>
-#include "fns.h"
-
-static const char version[] = "click-"VERSION", "COPYRIGHT"\n";
-
-static void
-usage(void) {
- fatal("usage: %s [window]\n", argv0);
-}
-
-static void
-click(Window *w, Point p) {
- Rectangle r;
- Point rp;
-
- r = getwinrect(w);
- rp = subpt(r.max, p);
-
- XTestFakeMotionEvent(display, 0, rp.x, rp.y, 0);
-
- XTestFakeButtonEvent(display, 1, true, 0);
- XTestFakeButtonEvent(display, 1, false, 0);
-
- XTestFakeMotionEvent(display, 0, r.max.x, r.max.y, 0);
-}
-
-int
-main(int argc, char *argv[]) {
- char *s;
-
- ARGBEGIN{
- default:
- usage();
- }ARGEND;
-
- initdisplay();
-
- s = ARGF();
- if(s && !getulong(s, &win.xid))
- usage();
- if (!s)
- win.xid = getfocus();
-
- if(argc)
- usage();
-
- click(&win, Pt(1, 1));
-
- XCloseDisplay(display);
- return 0;
-}
-
View
@@ -1,15 +0,0 @@
-ROOT= ../..
-include $(ROOT)/mk/hdr.mk
-include $(ROOT)/mk/wmii.mk
-
-main.c: $(ROOT)/mk/wmii.mk
-
-TARG = wikeyname
-
-PACKAGES += $(X11PACKAGES)
-
-LIB = $(LIBS9)
-OBJ = main
-
-include $(ROOT)/mk/one.mk
-
View
@@ -8,7 +8,7 @@
static void
splice(Item *i) {
- if(i->next != nil)
+ if(i->next != nil)
i->next->prev = i->prev;
if(i->prev != nil)
i->prev->next = i->next;
View
@@ -15,28 +15,6 @@ struct Key {
static Key* bindings;
-static void
-init_numlock(void) {
- static int masks[] = {
- ShiftMask, LockMask, ControlMask, Mod1Mask,
- Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask
- };
- XModifierKeymap *modmap;
- KeyCode kcode;
- int i, max;
-
- modmap = XGetModifierMapping(display);
- kcode = keycode("Num_Lock");
- if(kcode)
- if(modmap && modmap->max_keypermod > 0) {
- max = nelem(masks) * modmap->max_keypermod;
- for(i = 0; i < max; i++)
- if(modmap->modifiermap[i] == kcode)
- numlock = masks[i / modmap->max_keypermod];
- }
- XFreeModifiermap(modmap);
-}
-
/*
* To do: Find my red black tree implementation.
*/
@@ -50,7 +28,7 @@ parse_keys(char *spec) {
int i, nlines, nwords;
if(!numlock)
- init_numlock();
+ numlock = numlockmask();
nlines = tokenize(lines, nelem(lines), spec, '\n');
for(i=0; i < nlines; i++) {
View
@@ -10,8 +10,8 @@
# pragma varargck argpos event 1
# pragma varargck argpos warning 1
#
-# pragma varargck type "a" Area*
-# pragma varargck type "C" Client*
+# pragma varargck type "a" Area*
+# pragma varargck type "C" Client*
# pragma varargck type "r" void
#endif
Oops, something went wrong.

0 comments on commit 62bf81b

Please sign in to comment.