From 1ff1a0f51255958e83ee7c3f17fd0be8c628fc51 Mon Sep 17 00:00:00 2001 From: kitty piapiac Date: Mon, 10 Aug 2020 01:41:31 -0700 Subject: some stuff --- src/objects.nim | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/objects.nim (limited to 'src/objects.nim') diff --git a/src/objects.nim b/src/objects.nim new file mode 100644 index 0000000..ed83fa8 --- /dev/null +++ b/src/objects.nim @@ -0,0 +1,31 @@ +import tables, x11/[x, xlib] + +type + KeyFunc* = enum + closeWindow, + nextWindow, + setMaster, + spawnCustom + + Key* = object + mods*: cuint + key*: string + keyfunc*: KeyFunc + command*: string + + WindowManager* = ref object + display*: PDisplay + screen*: PScreen + colormap*: Colormap + root*: Window + + clients*: seq[Window] + focused*: int + keys*: Table[cuint, objects.Key] + +proc initKey* (keyfunc: KeyFunc, mods: cuint, key: string, command = ""): Key = + return Key( + mods: mods, + key: key, + command: command, + keyfunc: keyfunc) \ No newline at end of file -- cgit v1.2.3