Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalwareutils.git;a=commitdiff;h=04e4588563178a6e1568a031ae5408130ae54835
commit 04e4588563178a6e1568a031ae5408130ae54835
Author: Miklos Vajna <[EMAIL PROTECTED]>
Date: Tue Nov 6 00:58:58 2007 +0100
xwmconfig: added manpage
diff --git a/doc/xwmconfig.txt b/doc/xwmconfig.txt
new file mode 100644
index 0000000..4b7aedb
--- /dev/null
+++ b/doc/xwmconfig.txt
@@ -0,0 +1,28 @@
+= xwmconfig(1)
+
+== NAME
+
+xwmconfig - configures your system-wide default window manager
+
+== SYNOPSIS
+
+xwmconfig [options]
+
+== DESCRIPTION
+
+`xwmconfig` configures your default window manager for desktop managers like
+`XDM`, where you can't do so interactively.
+
+== OPTIONS
+
+--force::
+ Run this tool even if GDM or KDM are installed.
+
+--help::
+ Display this manpage.
+
+--silent::
+ Do not print any warning if GDM or KDM are installed.
+
+--version::
+ Display the package version.
diff --git a/xwmconfig/xwmconfig.c b/xwmconfig/xwmconfig.c
index 94905ba..d862831 100644
--- a/xwmconfig/xwmconfig.c
+++ b/xwmconfig/xwmconfig.c
@@ -51,14 +51,6 @@ char* ask_wm(PM_DB *db)
return(ptr);
}
-void usage(char *name)
-{
- printf(_("usage: %s [options]\n"), name);
- printf(_("--force Run this tool even if GDM or KDM are
installed.\n"));
- printf(_("--help This help.\n"));
- printf(_("--silent Do not print any warning if GDM or KDM are
installed.\n"));
-}
-
int run(int argc, char **argv)
{
FILE *input = stdin;
@@ -87,7 +79,7 @@ int run(int argc, char **argv)
switch(opt)
{
case 1000: xwm_force = 1; break;
- case 1001: usage(argv[0]); return(0);
+ case 1001: system("man xwmconfig"); return(0);
case 1002: xwm_silent = 1; break;
case 1003: printf("%s %s\n", argv[0], VERSION); return(0);
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git