]> git.pld-linux.org Git - packages/blackbox.git/commitdiff
- CONFIG_DIR support
authorjuandon <witekfl@pld-linux.org>
Sun, 23 Mar 2003 19:36:17 +0000 (19:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    blackbox-home_etc.patch -> 1.1

blackbox-home_etc.patch [new file with mode: 0644]

diff --git a/blackbox-home_etc.patch b/blackbox-home_etc.patch
new file mode 100644 (file)
index 0000000..53fd9e7
--- /dev/null
@@ -0,0 +1,51 @@
+diff -Nru blackbox-0.65.0/src/blackbox.cc blackbox-0.65.0.new/src/blackbox.cc
+--- blackbox-0.65.0/src/blackbox.cc    Sun Aug 25 10:05:45 2002
++++ blackbox-0.65.0.new/src/blackbox.cc        Sun Mar 23 17:51:49 2003
+@@ -126,9 +126,14 @@
+   ::blackbox = this;
+   argv = m_argv;
+-  if (! rc) rc = "~/.blackboxrc";
+-  rc_file = expandTilde(rc);
+-
++  
++  char *config_dir = getenv("CONFIG_DIR");
++  if (config_dir) {
++    rc_file = string(config_dir) + string("/blackboxrc");
++  } else {
++    if (! rc) rc = "~/.blackboxrc";
++    rc_file = expandTilde(rc);
++  }
+   no_focus = False;
+   resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec = 0;
+diff -Nru blackbox-0.65.0/util/bsetbg blackbox-0.65.0.new/util/bsetbg
+--- blackbox-0.65.0/util/bsetbg        Thu Aug 29 15:01:42 2002
++++ blackbox-0.65.0.new/util/bsetbg    Sun Mar 23 17:23:34 2003
+@@ -64,8 +64,15 @@
+ me=${0##*/}
+ version=2.1
+ copyright="(c) 2000-$(date +%Y) by Timothy M. King (http://lordzork.com/)"
+-config=$HOME/.bsetbgrc
+-last_cmd_file=$HOME/.bsetbg_last_cmd
++
++if [ "x$CONFIG_DIR" != "x" ]
++then
++      config=$CONFIG_DIR/bsetbgrc
++      last_cmd_file=$CONFIG_DIR/bsetbg_last_cmd
++else
++      config=$HOME/.bsetbgrc
++      last_cmd_file=$HOME/.bsetbg_last_cmd
++fi
+ refresh_cmd=xrefresh
+ p=$me:
+@@ -362,7 +369,7 @@
+               read_config=1
+       fi
+-      . $HOME/.bsetbgrc 2>/dev/null
++      . $config 2>/dev/null
+       check_no_exec
+       full_cmd=$FULL
This page took 0.111331 seconds and 4 git commands to generate.