commit b06d796d94afaef0d618cc920b337af05adfe2e0
parent b5f9ec647aae2d9a1d3bd586eb7523a4e0a329a3
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sat, 23 May 2020 20:26:05 +0200
Add own configuration
Diffstat:
3 files changed, 72 insertions(+), 1 deletion(-)
diff --git a/LICENSE b/LICENSE
@@ -3,6 +3,7 @@ MIT/X Consortium License
© 2009-2011 Enno Boland <g s01 de>
© 2011,2015 Connor Lane Smith <cls@lubutu.com>
© 2012-2015 Christoph Lohmann <20h@r-36.net>
+© 2019-2020 Anders Damsgaard <anders@adamsgaard.dk>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
diff --git a/config.h b/config.h
@@ -0,0 +1,70 @@
+/* See LICENSE file for copyright and license details. */
+
+/* appearance */
+static const char font[] = "dina:size=9:antialias=false";
+static const char* normbgcolor = "#1d1f21";
+static const char* normfgcolor = "#c5c8c6";
+static const char* selbgcolor = "#c5c8c6";
+static const char* selfgcolor = "#1d1f21";
+static const char* urgbgcolor = "#FF3334";
+static const char* urgfgcolor = "#000000";
+static const char before[] = "<";
+static const char after[] = ">";
+static const char titletrim[] = "...";
+static const int tabwidth = 200;
+static const Bool foreground = True;
+static Bool urgentswitch = False;
+
+/*
+ * Where to place a new tab when it is opened. When npisrelative is True,
+ * then the current position is changed + newposition. If npisrelative
+ * is False, then newposition is an absolute position.
+ */
+/* static int newposition = 0; */
+/* static Bool npisrelative = False; */
+static int newposition = 1;
+static Bool npisrelative = True;
+
+#define SETPROP(p) { \
+ .v = (char *[]){ "/bin/sh", "-c", \
+ "prop=\"`xwininfo -children -id $1 | grep '^ 0x' |" \
+ "sed -e's@^ *\\(0x[0-9a-f]*\\) \"\\([^\"]*\\)\".*@\\1 \\2@' |" \
+ "xargs -0 printf %b | dmenu -l 10 -w $1`\" &&" \
+ "xprop -id $1 -f $0 8s -set $0 \"$prop\"", \
+ p, winid, NULL \
+ } \
+}
+
+#define MODKEY ControlMask
+static Key keys[] = {
+ /* modifier key function argument */
+ { MODKEY|ShiftMask, XK_Return, focusonce, { 0 } },
+ { MODKEY|ShiftMask, XK_Return, spawn, { 0 } },
+
+ { MODKEY|ShiftMask, XK_l, rotate, { .i = +1 } },
+ { MODKEY|ShiftMask, XK_h, rotate, { .i = -1 } },
+ { MODKEY|ShiftMask, XK_j, movetab, { .i = -1 } },
+ { MODKEY|ShiftMask, XK_k, movetab, { .i = +1 } },
+ { MODKEY, XK_Tab, rotate, { .i = 0 } },
+
+ { MODKEY, XK_grave, spawn, SETPROP("_TABBED_SELECT_TAB") },
+ { MODKEY, XK_1, move, { .i = 0 } },
+ { MODKEY, XK_2, move, { .i = 1 } },
+ { MODKEY, XK_3, move, { .i = 2 } },
+ { MODKEY, XK_4, move, { .i = 3 } },
+ { MODKEY, XK_5, move, { .i = 4 } },
+ { MODKEY, XK_6, move, { .i = 5 } },
+ { MODKEY, XK_7, move, { .i = 6 } },
+ { MODKEY, XK_8, move, { .i = 7 } },
+ { MODKEY, XK_9, move, { .i = 8 } },
+ { MODKEY, XK_0, move, { .i = 9 } },
+
+ { MODKEY, XK_q, killclient, { 0 } },
+
+ { MODKEY|ShiftMask, XK_u, focusurgent, { 0 } },
+ { MODKEY|ShiftMask, XK_t, toggle, { .v = (void*) &urgentswitch } },
+ /* { MODKEY, XK_u, focusurgent, { 0 } }, */
+ /* { MODKEY|ShiftMask, XK_u, toggle, { .v = (void*) &urgentswitch } }, */
+
+ { 0, XK_F11, fullscreen, { 0 } },
+};
diff --git a/config.mk b/config.mk
@@ -14,7 +14,7 @@ X11LIB = /usr/X11R6/lib
FREETYPELIBS = -lfontconfig -lXft
FREETYPEINC = /usr/include/freetype2
# OpenBSD (uncomment)
-#FREETYPEINC = ${X11INC}/freetype2
+FREETYPEINC = ${X11INC}/freetype2
# includes and libs
INCS = -I. -I/usr/include -I$(X11INC) -I${FREETYPEINC}