summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschizoid <schizoidparty@aol.com>2024-12-06 15:06:31 -0500
committerschizoid <schizoidparty@aol.com>2024-12-06 15:06:31 -0500
commit247d8f14f86f8049a46e237092a7a64222e69c99 (patch)
tree479bc4079ea0d4ce8db9bd5c1954119888539f6a
parent3ed68b62088dedfb4e7bcd43b953535966a916fe (diff)
Ported DWM to OpenBSD
-rw-r--r--.gitignore5
-rw-r--r--README48
-rw-r--r--config.def.h16
-rw-r--r--config.h16
-rw-r--r--config.mk17
-rw-r--r--drw.obin14128 -> 20624 bytes
-rwxr-xr-xdwmbin80752 -> 0 bytes
-rw-r--r--dwm.obin73296 -> 100024 bytes
-rw-r--r--util.obin2296 -> 2496 bytes
9 files changed, 84 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..dedc3ad
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+dwm
+dwm.o
+util.o
+config.h
+
diff --git a/README b/README
new file mode 100644
index 0000000..95d4fd0
--- /dev/null
+++ b/README
@@ -0,0 +1,48 @@
+dwm - dynamic window manager
+============================
+dwm is an extremely fast, small, and dynamic window manager for X.
+
+
+Requirements
+------------
+In order to build dwm you need the Xlib header files.
+
+
+Installation
+------------
+Edit config.mk to match your local setup (dwm is installed into
+the /usr/local namespace by default).
+
+Afterwards enter the following command to build and install dwm (if
+necessary as root):
+
+ make clean install
+
+
+Running dwm
+-----------
+Add the following line to your .xinitrc to start dwm using startx:
+
+ exec dwm
+
+In order to connect dwm to a specific display, make sure that
+the DISPLAY environment variable is set correctly, e.g.:
+
+ DISPLAY=foo.bar:1 exec dwm
+
+(This will start dwm on display :1 of the host foo.bar.)
+
+In order to display status info in the bar, you can do something
+like this in your .xinitrc:
+
+ while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
+ do
+ sleep 1
+ done &
+ exec dwm
+
+
+Configuration
+-------------
+The configuration of dwm is done by creating a custom config.h
+and (re)compiling the source code.
diff --git a/config.def.h b/config.def.h
index 52505d0..ede0e28 100644
--- a/config.def.h
+++ b/config.def.h
@@ -14,8 +14,8 @@ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
#define ICONSIZE 16 /* icon size */
#define ICONSPACING 5 /* space between icon and title */
-static const char *fonts[] = { "Hack Nerd Font:size=10.5" };
-static const char dmenufont[] = "Hack Nerd Font:size=10";
+static const char *fonts[] = { "Hack Nerd Font:size=8" };
+static const char dmenufont[] = "Hack Nerd Font:size=7";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
@@ -83,7 +83,7 @@ static const Layout layouts[] = {
/* commands */
static const char *dmenucmd[] = {
"dmenu_run",
- "-fn", "Fira Code:size=12",
+ "-fn", "Fira Code:size=10",
"-nb", "#282828", // Set normal background color for FreeBSD
"-nf", "#d68700", // Set text color for FreeBSD
"-sb", "#555555", // Set highlighted background color (a lighter version of #282828) for FreeBSD
@@ -97,15 +97,19 @@ static const char *browser[] = { "firefox", NULL};
static const char *email[] = { "thunderbird", NULL};
static const char *filemanagercmd[] = { "thunar", NULL };
static const char *scrot[] = { "screenshot", NULL };
-static const char *wpp[]= { "wpp", NULL};
+static const char *bible[]= { "xiphos", NULL};
+static const char *wpp[]= { "picom", NULL};
+static const char *durl[]= { "durl", NULL};
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY, XK_b, spawn, {.v = browser } },
+ { MODKEY, XK_s, spawn, {.v = durl } },
{ MODKEY|ShiftMask, XK_t, spawn, {.v = email } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = filemanagercmd } },
+ { MODKEY, XK_x, spawn, {.v = bible } },
{ MODKEY|ShiftMask, XK_w, spawn, {.v = wpp } },
{ 0, XK_Print, spawn, {.v = scrot } },
{ MODKEY|ShiftMask, XK_b, togglebar, {0} },
@@ -136,8 +140,8 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
/* Media control keys using F keys */
- { ShiftMask, XK_F1, spawn, SHCMD("pactl set-sink-volume @DEFAULT_SINK@ -5%") },
- { ShiftMask, XK_F2, spawn, SHCMD("pactl set-sink-volume @DEFAULT_SINK@ +5%") },
+ { ShiftMask, XK_F1, spawn, SHCMD("doas sndioctl output.level=-0.05") },
+ { ShiftMask, XK_F2, spawn, SHCMD("doas sndioctl output.level=+0.05") },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
diff --git a/config.h b/config.h
index 52505d0..ede0e28 100644
--- a/config.h
+++ b/config.h
@@ -14,8 +14,8 @@ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
#define ICONSIZE 16 /* icon size */
#define ICONSPACING 5 /* space between icon and title */
-static const char *fonts[] = { "Hack Nerd Font:size=10.5" };
-static const char dmenufont[] = "Hack Nerd Font:size=10";
+static const char *fonts[] = { "Hack Nerd Font:size=8" };
+static const char dmenufont[] = "Hack Nerd Font:size=7";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
@@ -83,7 +83,7 @@ static const Layout layouts[] = {
/* commands */
static const char *dmenucmd[] = {
"dmenu_run",
- "-fn", "Fira Code:size=12",
+ "-fn", "Fira Code:size=10",
"-nb", "#282828", // Set normal background color for FreeBSD
"-nf", "#d68700", // Set text color for FreeBSD
"-sb", "#555555", // Set highlighted background color (a lighter version of #282828) for FreeBSD
@@ -97,15 +97,19 @@ static const char *browser[] = { "firefox", NULL};
static const char *email[] = { "thunderbird", NULL};
static const char *filemanagercmd[] = { "thunar", NULL };
static const char *scrot[] = { "screenshot", NULL };
-static const char *wpp[]= { "wpp", NULL};
+static const char *bible[]= { "xiphos", NULL};
+static const char *wpp[]= { "picom", NULL};
+static const char *durl[]= { "durl", NULL};
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY, XK_b, spawn, {.v = browser } },
+ { MODKEY, XK_s, spawn, {.v = durl } },
{ MODKEY|ShiftMask, XK_t, spawn, {.v = email } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = filemanagercmd } },
+ { MODKEY, XK_x, spawn, {.v = bible } },
{ MODKEY|ShiftMask, XK_w, spawn, {.v = wpp } },
{ 0, XK_Print, spawn, {.v = scrot } },
{ MODKEY|ShiftMask, XK_b, togglebar, {0} },
@@ -136,8 +140,8 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
/* Media control keys using F keys */
- { ShiftMask, XK_F1, spawn, SHCMD("pactl set-sink-volume @DEFAULT_SINK@ -5%") },
- { ShiftMask, XK_F2, spawn, SHCMD("pactl set-sink-volume @DEFAULT_SINK@ +5%") },
+ { ShiftMask, XK_F1, spawn, SHCMD("doas sndioctl output.level=-0.05") },
+ { ShiftMask, XK_F2, spawn, SHCMD("doas sndioctl output.level=+0.05") },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
diff --git a/config.mk b/config.mk
index fe02ea2..bb500ac 100644
--- a/config.mk
+++ b/config.mk
@@ -15,16 +15,21 @@ XINERAMALIBS = -lXinerama
XINERAMAFLAGS = -DXINERAMA
# freetype
-FREETYPELIBS = -lfontconfig -lXft
-FREETYPEINC = /usr/include/freetype2
+#FREETYPELIBS = -lfontconfig -lXft
+#FREETYPEINC = /usr/include/freetype2
# OpenBSD (uncomment)
-#FREETYPEINC = ${X11INC}/freetype2
-#MANPREFIX = ${PREFIX}/man
+#FREETYPEINC = ${X11INC}/Xft
+FREETYPEINC = /usr/X11R6/include/freetype2
+MANPREFIX = ${PREFIX}/man
# includes and libs
-INCS = -I${X11INC} -I${FREETYPEINC}
+#INCS = -I${X11INC} -I${FREETYPEINC}
+INCS = -I${X11INC} -I${FREETYPEINC} -I/usr/local/include
#LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} -lfontconfig -lXft -lXrender
-LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} -lfontconfig -lXft -lXrender -lImlib2
+#LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} -lfontconfig -lXft -lXrender -lImlib2
+#LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} -lfontconfig -lXft -lXrender
+#LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} -lfontconfig -lXft -lXrender -lImlib2
+LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} -lfontconfig -lXft -lXrender -L/usr/local/lib -lImlib2
# flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
diff --git a/drw.o b/drw.o
index 34857e9..18adcaf 100644
--- a/drw.o
+++ b/drw.o
Binary files differ
diff --git a/dwm b/dwm
deleted file mode 100755
index 95ac615..0000000
--- a/dwm
+++ /dev/null
Binary files differ
diff --git a/dwm.o b/dwm.o
index f4e3d61..0f22ea5 100644
--- a/dwm.o
+++ b/dwm.o
Binary files differ
diff --git a/util.o b/util.o
index 867d783..180e6a0 100644
--- a/util.o
+++ b/util.o
Binary files differ