On Mon, Nov 25, 2002 at 08:41:49PM -0800, Sean 'Shaleh' Perry wrote:
> bbkeys, bbpager and others only know to look for ~/.blackboxrc. Definately an
> issue we intend to iron out.
Well, here's a fix for bbpager, anyway. It adds an '-r' option to allow
you to specify the rc file it should use. Don't specify the option, it
defaults to ~/.blackboxrc.
Sorry for the extra cruft in the patch... it was against the Debian sources
and I didn't realize it included the changelog entry as well until just
now.
--
Marc Wilson | Silence is the element in which great things fashion
[EMAIL PROTECTED] | themselves. -- Thomas Carlyle
diff -urN bbpager-0.3.0/Baseresource.cc bbpager-0.3.0-new/Baseresource.cc
--- bbpager-0.3.0/Baseresource.cc Tue Oct 3 12:05:18 2000
+++ bbpager-0.3.0-new/Baseresource.cc Mon Jun 3 19:14:07 2002
@@ -38,7 +38,11 @@
} else {
char *homedir = getenv("HOME");
bbtool->config_filename = new char[strlen(homedir) + 32];
- sprintf(bbtool->config_filename, "%s/.blackboxrc", homedir);
+ if (bbtool->norc_file) {
+ sprintf(bbtool->config_filename, "%s/.blackboxrc", homedir);
+ } else {
+ sprintf(bbtool->config_filename, "%s/%s", homedir, bbtool->rc_file);
+ }
if ((resource_db = XrmGetFileDatabase(bbtool->config_filename))!=NULL) {
ReadBlackboxResource();
ResourceType=BLACKBOX;
diff -urN bbpager-0.3.0/Basewindow.cc bbpager-0.3.0-new/Basewindow.cc
--- bbpager-0.3.0/Basewindow.cc Tue Oct 3 12:05:39 2000
+++ bbpager-0.3.0-new/Basewindow.cc Mon Jun 3 19:09:02 2002
@@ -51,6 +51,8 @@
decorated=options->decorated;
config_file=options->config_file;
nobb_config=options->nobb_config;
+ rc_file=options->rc_file;
+ norc_file=options->norc_file;
current_screen_info = getScreenInfo(DefaultScreen(getXDisplay()));
XSetErrorHandler((XErrorHandler) handleXErrors);
diff -urN bbpager-0.3.0/Basewindow.hh bbpager-0.3.0-new/Basewindow.hh
--- bbpager-0.3.0/Basewindow.hh Tue Oct 3 12:05:50 2000
+++ bbpager-0.3.0-new/Basewindow.hh Mon Jun 3 19:09:32 2002
@@ -68,6 +68,8 @@
char *style_file;
char *spooldir;
bool nobb_config;
+ char *rc_file;
+ bool norc_file;
bool withdrawn;
bool shape;
bool decorated;
diff -urN bbpager-0.3.0/debian/changelog bbpager-0.3.0-new/debian/changelog
--- bbpager-0.3.0/debian/changelog Tue Jun 4 00:54:27 2002
+++ bbpager-0.3.0-new/debian/changelog Mon Jun 3 19:22:19 2002
@@ -1,3 +1,9 @@
+bbpager (0.3.0-1.1.1) unstable; urgency=low
+
+ * add -r[cfile] option to allow use with openbox
+
+ -- Marc Wilson <[EMAIL PROTECTED]> Mon, 3 Jun 2002 19:22:02 -0800
+
bbpager (0.3.0-1.1) unstable; urgency=low
* NMU
diff -urN bbpager-0.3.0/main.cc bbpager-0.3.0-new/main.cc
--- bbpager-0.3.0/main.cc Tue Oct 3 12:07:09 2000
+++ bbpager-0.3.0-new/main.cc Mon Jun 3 19:07:15 2002
@@ -25,16 +25,17 @@
void Usage()
{
fprintf(stderr,"\n%s version %s \n",BBTOOL,BBTOOL_VERSION);
- fprintf(stderr,"Usage: %s [options]\n",BBTOOL);
+ fprintf(stderr,"Usage: %s [options]\n",BBTOOL);
fprintf(stderr,"Options:\n");
- fprintf(stderr,"-display <display name> X server to connect to\n");
+ fprintf(stderr,"-display <display name> X server to connect to\n");
fprintf(stderr,"-c[onfig] <filename> Alternate config file\n");
+ fprintf(stderr,"-r[cfile] <filename> window manager rc file\n");
fprintf(stderr,"-n[obb] Fall back on default
configuration\n");
fprintf(stderr,"-v[ersion] Display version number\n");
fprintf(stderr,"-h[elp] Display this help\n");
fprintf(stderr,"-geom[etry] <geometry> Set geometry of window\n");
- fprintf(stderr,"-d[ecorated] Show 'normal' decorated
window\n");
- fprintf(stderr,"-w[withdrawn] Place bbtool in the Slit\n");
+ fprintf(stderr,"-d[ecorated] Show 'normal' decorated window\n");
+ fprintf(stderr,"-w[withdrawn] Place bbtool in the Slit\n");
fprintf(stderr,"-s[hape] Don't display groundplate\n\n");
}
@@ -49,6 +50,8 @@
options.shape=False;
options.config_file=NULL;
options.nobb_config=False;
+ options.rc_file=NULL;
+ options.norc_file=True;
options.decorated=False;
@@ -61,6 +64,11 @@
else if ((!strcmp(argv[i],"-config"))|(!strcmp(argv[i],"-c"))) {
if(++i==argc) { Usage(); exit(2); };
options.config_file=argv[i];
+ }
+ else if ((!strcmp(argv[i],"-rcfile"))|(!strcmp(argv[i],"-r"))) {
+ if(++i==argc) { Usage(); exit(2); };
+ options.norc_file=False;
+ options.rc_file=argv[i];
}
else if ((!strcmp(argv[i],"-nobb"))|(!strcmp(argv[i],"-n"))) {
options.nobb_config=True;
diff -urN bbpager-0.3.0/main.hh bbpager-0.3.0-new/main.hh
--- bbpager-0.3.0/main.hh Tue Oct 3 12:07:20 2000
+++ bbpager-0.3.0-new/main.hh Mon Jun 3 19:04:21 2002
@@ -27,6 +27,8 @@
char *geometry;
char *config_file;
bool nobb_config;
+ char *rc_file;
+ bool norc_file;
char *display_name;
bool decorated;
};
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
List archives: http://asgardsrealm.net/lurker/splash/index.html
Trouble? Contact [EMAIL PROTECTED]