From 92baae67185f19c71c99134a06d5d42a43e83703 Mon Sep 17 00:00:00 2001 From: kitty piapiac Date: Mon, 10 Aug 2020 20:29:56 -0700 Subject: =?UTF-8?q?(=E3=80=82=E3=83=98=C2=B0)=20actually...=20fuck=20custo?= =?UTF-8?q?m=20layouts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ill deal with them later --- src/config.def.nim | 4 ++-- src/layouts.nim | 17 ----------------- src/objects.nim | 2 +- 3 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 src/layouts.nim (limited to 'src') diff --git a/src/config.def.nim b/src/config.def.nim index d62caf7..39de9e5 100644 --- a/src/config.def.nim +++ b/src/config.def.nim @@ -15,11 +15,11 @@ const # in pixels frameWidth* = 2 - init* = @[ + init* = [ "xsetroot -solid \"" & colours.background & "\""] # store keybindings here - keybindings*: seq[Key] = @[ + keybindings* = [ # alt + shift + q will close the focused window initKey( closeWindow, key = "q", diff --git a/src/layouts.nim b/src/layouts.nim deleted file mode 100644 index 3de5da4..0000000 --- a/src/layouts.nim +++ /dev/null @@ -1,17 +0,0 @@ -import objects, x11/xlib - -proc masterStack* (wm: WindowManager, w: cuint, h: cuint, offset: cuint) = - var - n = cuint wm.clients.len - leftoverPixels = h - ((n-1) * (h div (n-1))) - lastEnd: cint = 0 - - for i in 1..n-1: - var height = (h div (n-1)) - if leftoverPixels > 0: - height += 1 - leftoverPixels -= 1 - - discard wm.display.XMoveResizeWindow(wm.clients[i], cint w div 2, lastEnd, (w div 2)-offset, height-offset) - - lastEnd += cint height \ No newline at end of file diff --git a/src/objects.nim b/src/objects.nim index ed83fa8..1c8ed35 100644 --- a/src/objects.nim +++ b/src/objects.nim @@ -23,7 +23,7 @@ type focused*: int keys*: Table[cuint, objects.Key] -proc initKey* (keyfunc: KeyFunc, mods: cuint, key: string, command = ""): Key = +proc key* (mods: cuint, key: string, keyfunc: KeyFunc, command = ""): Key = return Key( mods: mods, key: key, -- cgit v1.2.3