diff options
Diffstat (limited to 'xbattext.ms')
-rw-r--r-- | xbattext.ms | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/xbattext.ms b/xbattext.ms index 8f2f2e1..4061235 100644 --- a/xbattext.ms +++ b/xbattext.ms @@ -3,6 +3,7 @@ .de Q \\$3\(lq\\$1\(rq\\$2 .. +.DA .TL .BI xbattext , an X11 battery monitor for NetBSD @@ -34,15 +35,22 @@ http://git.\:ankarstrom.se/re/. The uncommented source code is hosted at http://git.\:ankarstrom.se/x11/xbattext/. .PP -If you want to see a screenshot of -.I xbattext , +Feel free to read the three sections of the document out of order. +As the structure of the document strictly mirrors +the structure of the source code, +it begins with the least interesting part +and ends with the most exciting part; +as mentioned above, +it is simply an annotated version of the original source code, +not a story in itself. +If you want to see a screenshot of the resulting program, skip ahead to the last page. .AE .SH .ce .sp -1v Definitions -.sp 1v +.sp 1.2v .Re xbattext.c:/^#include/ .LP Most of the includes regard standard C features, @@ -70,13 +78,11 @@ The battery status is checked every five seconds by default. .LP The battery level is considered to be .Q low -if it is below 30 percent. +if it is below 25 percent. .PP The user is encouraged to modify this and the previous constant -according to his own preferences. +according to his own personal preferences. .bp -.Re xbattext.c:/^void update(/ -\& .Re xbattext.c:/^\/\* resources/ .LP Two structures are needed to access the application's resources: @@ -86,7 +92,7 @@ which will hold the values of the resources, and which de\%fines the manner in which the re\%sources should be assigned to the members of the .I res -strcture.\** +structure.\** .FS .Q Resources are the settings set by the user in @@ -166,7 +172,7 @@ The other variables will be explained as we go along. .SH .ce Initial setup -.sp 1v +.sp 0.6v .Re xbattext.c:/\/\* program start/ \& .Re xbattext.c:/XtVaAppInitialize(/ @@ -209,11 +215,12 @@ independently of the event loop.\** For more information about timeouts, see http://motifdeveloper.com/tips/tip16.html. .FE +.bp .Rr .SH .ce Operation -.sp 1v +.sp -0.1v .Re xbattext.c:/^\/\* update battery status and (re-)add timer/ .LP The @@ -377,7 +384,7 @@ then you should get acquainted with the X11 window manager .FS .I jwm is available at https://joewing.net/projects/jwm/. -My personal fork of +The author's personal fork of .I jwm 1.8, which has a more traditional visual appearance, @@ -386,17 +393,14 @@ is available at http://git.ankarstrom.se/jwm/. and its .Q swallowing feature, -which removes the border from a given X11 program and displays it in the tray. -You can regard it as tray icons according to the UNIX philosophy. +which displays an arbitrary X11 program in the tray. +It's like tray icons, but in a UNIX sort of way. .sp 0.6v .PSPIC tray.eps .sp 0.2v .ad c .ps -1p .B "Figure 1." -In my tray, .I xbattext -sits right beside -.I xclock -and -.I xload . +beside +.I xclock . |