Building the dwm window manager, st terminal, sltatus on Freebsd youtube tutorial

NapoleonWils0n

Well-Known Member

Reaction score: 146
Messages: 275

Hi All

I recently switched from i3wm and urxvt to the suckless dwm window manager and st terminal

So i decided to make a youtube video on how to build dwm, st and slstatus on Freebsd and linux,
one thing i did that every other youtube tutorial on dwm seems to miss is how to apply the changes to a separate git branch
and then merge the changes back into the master branch


I cover the changes you need to make to the config files to get dwm, st and slstatus to build on freebsd an linux,
how to set the font, change the shell, apply the move stack patch to dwm and the scrollback patch to the st terminal

Some notes

+ dwm freebsd notes
+ st terminal freebsd notes

My freebsd builds of dwm, st, and slstatus

+ dwm freebsd
+ st terminal freebsd
+ slstatus freebsd
 

scottro

Daemon

Reaction score: 833
Messages: 1,971

You can also use the port, edit the config.h file, and in the make install command use DWM_CONF="path-to-config.h"'
Not sure what notes you mean but using the DWM_CONF and ST_CONF are in the Makefile.
As for patches, that too, is pretty easy with ports, put the patch file under <portname>/files, though I've found some patches didn't work for me under FreeBSD, though that may be because they're fairly old patches--don't think they work under Linux anymore either, :-(
 

usonianhorizon

New Member

Reaction score: 2
Messages: 5

Sorry, I should have been clearer: I downloaded direct from suckless.org and manually patched with the available patches I wanted (not many), but also sometimes my own customizations. This was for dwm, dwm-bar (made my own battery status indicator script; and the next local ISS passby time ;) ), st, slock, sent, etc.

I was referring to have OS agnostic Makefiles as in:

Code:
# FreeBSD
X11INC = /usr/local/include/
X11LIB = /usr/local/lib

rather than the usual
Code:
/usr/X11R6/include
and
Code:
/usr/X11R6/lib

It would be nice to just have it compile out of the box, at least for those just wanting to give it a try. I noticed sometimes the source Makefiles reference OpenBSD, although not always. But no reference to FreeBSD.

I should have though of starting with Ports, but I didn't know if they were matched to current.
 

TheUser

New Member

Reaction score: 7
Messages: 13

I can't compile st terminal, following your steps from NapoleonWils0n GitHub

Error:

Code:
In file included from x.c:15:

/usr/local/include/X11/Xft/Xft.h:39:10: fatal error: 'ft2build.h' file not found

#include <ft2build.h>


1 error generated.

*** Error code 1


Stop.
 

mitko17

New Member

Reaction score: 1
Messages: 2

I can't compile st terminal, following your steps from NapoleonWils0n GitHub

Error:

Code:
In file included from x.c:15:

/usr/local/include/X11/Xft/Xft.h:39:10: fatal error: 'ft2build.h' file not found

#include <ft2build.h>


1 error generated.

*** Error code 1


Stop.

Please don't make the same mistake as me and make sure you have installed pkgconf...
 

Dev-Raiden

New Member


Messages: 1

I can't compile st terminal, following your steps from NapoleonWils0n GitHub

Error:

Code:
In file included from x.c:15:

/usr/local/include/X11/Xft/Xft.h:39:10: fatal error: 'ft2build.h' file not found

#include <ft2build.h>


1 error generated.

*** Error code 1


Stop.
actually I am solved this issue with installing pkg-config

$ doas pkg install pkg-config

but the new bug will raise to you by the making install for st.

the issue is

Code:
tic -sx st.info 
make[1]: exec(tic) failed (No such file or directory)
*** Error code 1

Stop.
make[1]: stopped in /home/raiden/Desktop/Build/Suckless/st

I am walking in the same steps in tutorial but the (tic) not can be found.

today is my first day in FreeBSD after years in Linux and still need someone guide me.

Note: FreeBSD version 13
 
Last edited by a moderator:

serg201

New Member


Messages: 1

Hi guys
The slstatus shows incorrect information about computer memory.
Total ram on a computer 16 gigabytes
OS FreeBSD 12.2.
Whats wrong?
Code:
% ./slstatus -s
RAM_PERC:0%  RAM_FREE:3.4 Gi  RAM_USED:16.0 Ti  RAM_TOTAL:16.0 Ti
RAM_PERC:0%  RAM_FREE:3.4 Gi  RAM_USED:16.0 Ti  RAM_TOTAL:16.0 Ti
RAM_PERC:0%  RAM_FREE:3.4 Gi  RAM_USED:16.0 Ti  RAM_TOTAL:16.0 Ti
RAM_PERC:0%  RAM_FREE:3.4 Gi  RAM_USED:16.0 Ti  RAM_TOTAL:16.0 Ti
RAM_PERC:0%  RAM_FREE:3.4 Gi  RAM_USED:16.0 Ti  RAM_TOTAL:16.0 Ti
RAM_PERC:0%  RAM_FREE:3.4 Gi  RAM_USED:16.0 Ti  RAM_TOTAL:16.0 Ti

my config.h
C:
static const struct arg args[] = {
  /* function format          argument */
  { ram_perc, "RAM_PERC:%s%%",    "" },
  { ram_free, "RAM_FREE:%s",      "" },
  { ram_used, "RAM_USED:%s",    "" },
  { ram_total, "RAM_TOTAL:%s",     "" },
};

thanks for advice
 

Fuzzbox

Member

Reaction score: 104
Messages: 61

Looks like ram.c is indeed broken for FreeBSD. I don't use this component, but I've just tested it and I get the same results than you.
I see two solutions : fixing the code, or calling a custom external script.
 

astyle

Aspiring Daemon

Reaction score: 244
Messages: 547

Something wrong with using the C API to just call the command line utility to query the RAM? There's quite a few ways to do that, such as uname -a to fish out how much RAM you actually have. OR top to fish out the percentages. 👺
 
Top