This variant is maintained as a fork of the original.
This CTWM uses BSD Make for building, and it includes a few minor bug fixes and other enhancements (such as using scalable fonts for the default built-in fontSets). See the Git history. Further fixes or enhancements are welcome.
This fork is maintained in [robohack’s GitHub][GHRC] by Greg A. Woods.
Motto: Write Portable C without complicating the build!
See, e.g.: https://nullprogram.com/blog/2017/03/30/
Ctwm is an extension to twm, and was originally enhanced by Claude Lecommandeur. It supports multiple virtual screens, and a lot of other goodies.
You can use and manage up to 32 virtual screens called workspaces. You swap from one workspace to another by clicking on a button in an optionnal panel of buttons (the workspace manager) or by invoking a function either by keystroke or from a context menu.
You can customize each workspace by choosing different colors, names and pixmaps for the buttons and background root windows.
Major features include:
-
Optional 3D window titles and border (ala Motif).
-
Shaped, colored icons.
-
Multiple icons for clients based on the icon name.
-
Windows can belong to several workspaces.
-
A map of your workspaces to move quickly windows between different workspaces.
-
Animations: icons, root backgrounds and buttons can be animated.
-
Pinnable and sticky menus.
-
etc…
The sources files were once the twm ones only workmgr.[ch] added (written from scratch by Claude Lecommandeur) and minor modifications to some twm files. Since then much more extensive changes and reorganization have been done, so the codebase is now significantly different from plain twm.
If you find bugs in ctwm, or just want to tell us how much you like it, please send a report to the mailing list.
There is a manual page, which always needs more work (any volunteers?). Many useful information bits are only in the CHANGES.md file, so please read it.
ctwm is built using a very simple BSD Makefile.
In the common case, the included Makefile will do the necessary
invocations, and you won’t need to worry about it; just run a normal
make; make install
invocation.
In the simple case, the defaults should work. Most modern or semi-modern systems should fall into this, though it may depend on how your system provides X11, both as the user environment, as well as for development.
$ make
You can put the build objects in another directory easily enough:
$ mkdir build; MAKEOBJDIRPREFIX=$(pwd -P)/build make obj $ mkdir build; MAKEOBJDIRPREFIX=$(pwd -P)/build make
ctwm requires various X11 libraries to be present. That list will generally include libXmu, libXext, libXt, libSM, and libICE, as well as of course libX11, libxcb, libXau, and libXdmcp.
Depending on your host environment, you may require extra libraries, such as libXpm, libjpeg, libXrandr, and lXrender. These can very easily be installed with [pkgsrc][pkgsrc] (though libXpm, libXrandr, and libXrender should normally come installed with the rest of your X11 libraries).
You can tell make where any extra libraries (and their header files) are
installed by setting EXTLIBS
on the command line, e.g. as in:
$ mkdir build; MAKEOBJDIRPREFIX=$(pwd -P)/build make EXTLIBS=/usr/pkg
Installation as root is easy:
# make install
You can set the installation directory for make install
by setting
PREFIX
on the command line (and if your mk-files support it, DESTDIR
can be set for staging as well, see Packaging below).
PREFIX
defaults to X11ROOTDIR
, which should be defined automatically
if your system has <bsd.x11.mk>
. On the other hand X11ROOTDIR
defaults to PREFIX
if there is no system <bsd.x11.mk>
, so one of
X11ROOTDIR
or PREFIX
must be set in that case.
PREFIX
and/or X11ROOTDIR
must be set during the build phases as
well.
-
NetBSD:
-
You can use "make obj dependall" on NetBSD, all in one command (with
MAKEOBJDIRPREFIX
, obviously).
-
-
FreeBSD:
-
Don’t use
make depend
on FreeBSD — it maintains dependency information automatically. -
Do the
make obj
step separately, or better yet setWITH_AUTO_OBJ=yes
on the command-line (withMAKEOBJDIRPREFIX
).
-
-
Systems using pkgsrc’s
bmake
andbootstrap-mk-files
:-
just set
PREFIX
if you want to install with your pkgsrc install, else setEXTLIBS
to where packages are installed and setPREFIX
to where you want to install ctwm, such asPREFIX=/usr/local
orPREFIX=$HOME
.
-
There is a mailing list for discussions: <ctwm@ctwm.org>. Subscribe by sending a mail with the subject "subscribe ctwm" to <minimalist@ctwm.org>.
Additional information can be found from the project webpage, at https://www.ctwm.org/.
[GHRC]: https://github.com/robohack/ctwm-mirror/ [CTWM]: https://github.com/fullermd/ctwm-mirror/ [pkgsrc]: https://pkgsrc.org/