From 247d8f14f86f8049a46e237092a7a64222e69c99 Mon Sep 17 00:00:00 2001 From: schizoid Date: Fri, 6 Dec 2024 15:06:31 -0500 Subject: Ported DWM to OpenBSD --- .gitignore | 5 +++++ README | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ config.def.h | 16 ++++++++++------ config.h | 16 ++++++++++------ config.mk | 17 +++++++++++------ drw.o | Bin 14128 -> 20624 bytes dwm | Bin 80752 -> 0 bytes dwm.o | Bin 73296 -> 100024 bytes util.o | Bin 2296 -> 2496 bytes 9 files changed, 84 insertions(+), 18 deletions(-) create mode 100644 .gitignore create mode 100644 README delete mode 100755 dwm 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 Binary files a/drw.o and b/drw.o differ diff --git a/dwm b/dwm deleted file mode 100755 index 95ac615..0000000 Binary files a/dwm and /dev/null differ diff --git a/dwm.o b/dwm.o index f4e3d61..0f22ea5 100644 Binary files a/dwm.o and b/dwm.o differ diff --git a/util.o b/util.o index 867d783..180e6a0 100644 Binary files a/util.o and b/util.o differ -- cgit v1.2.3