[wiki] [upstream] A first attempt at describing how to customise dwm via config.h and config.mk. || f
changeset: 71:cb68e00bd74b
tag: tip
user: f.e.negroni_AT_gmail.com
date: Mon Jul 28 23:54:50 2008 +0100
files: dwm/customisation/font/index.md dwm/customisation/index.md
description:
A first attempt at describing how to customise dwm via config.h and config.mk.
These are not patches in the broader sense of the term, but more like small configuration examples that can help new users getting their head around the source code.
diff -r ae8b50d06d6d -r cb68e00bd74b dwm/customisation/font/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm/customisation/font/index.md Mon Jul 28 23:54:50 2008 +0100
_AT_@ -0,0 +1,25 @@
+Change font in config.h
+=======================
+
+Towards the beginning of **config.h**, you will find a line defining the variable
+ static const char font[] = "..."
+
+Using **xfontsel** (a program distributed with X), you can produce a font line for the font you like to be used by **dwm** when displaying text in the menubar.
+
+For example, to change the font to 'fixed', you can change the value of font to:
+
+ static const char font[] = "-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1";
+
+The follwing patch also produces the same result:
+
+ --- a/config.def.h Mon Jul 28 20:23:16 2008 +0100
+ +++ b/config.def.h Mon Jul 28 20:45:27 2008 +0100
+ _AT_@ -1,7 +1,7 @@
+ /* See LICENSE file for copyright and license details. */
+
+ /* appearance */
+ -static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
+ +static const char font[] = "-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1";
+ static const char normbordercolor[] = "#cccccc";
+ static const char normbgcolor[] = "#cccccc";
+ static const char normfgcolor[] = "#000000";
diff -r ae8b50d06d6d -r cb68e00bd74b dwm/customisation/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm/customisation/index.md Mon Jul 28 23:54:50 2008 +0100
_AT_@ -0,0 +1,37 @@
+CUSTOMISATION
+=============
+
+**dwm** is customised by editing **config.h**, a C language header file, and **config.mk**, a Make include file.
+
+What is **config.h**?
+----------------------
+
+**config.h** is a source code file which is included by **dwm.c**, the main **dwm** source code module.
+A fresh source code download of **dwm** will contain a file called **config.def.h**: this file is a template from which to create your own **config.h** file.
+To start customising **dwm**, simply copy **config.def.h** into **config.h** before you run make.
+
+What is **config.mk**?
+----------------------
+
+**config.mk** is a file included by Makefile, where you can customise how make is going to compile and install **dwm**.
+
+How do I modify **config.h**?
+-----------------------------
+
+**config.h** can be edited just like any other C source code file.
+It contains definitions of variables that are going to be used by **dwm.c**, and therefore it is vital that the file is always up to date.
+The default Makefile distributed with **dwm** does not contain a rule to overwrite your customised **config.h** in case **config.def.h** is updated, for example after a pull from the mercurial repository.
+It is therefore important you always compare your customised **config.h** with **config.def.h** and make sure you include any changes in your source.
+
+How do I modify **config.mk**?
+-----------------------------
+
+**config.mk** can be edited just like any other text file.
+It contains definitions of variables that are going to be used inside Makefile.
+Unlike **config.h**, **config.mk** does not have a **config.def.mk**.
+Therefore, during an update of your repository you may run into conflicts if the original **config.mk** is edited.
+
+Are there any example customisations to get me started?
+-------------------------------------------------------
+
+On the sidebar of this wiki page you will soon find links to example modifications that you may find useful to get started.
Received on Tue Jul 29 2008 - 00:57:25 CEST
This archive was generated by hypermail 2.3.0
: Thu Sep 13 2012 - 19:30:21 CEST