diff options
Diffstat (limited to 'src/openbox.cc')
| -rw-r--r-- | src/openbox.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/openbox.cc b/src/openbox.cc index 55c07acd..a9e8e5af 100644 --- a/src/openbox.cc +++ b/src/openbox.cc @@ -174,6 +174,7 @@ Openbox::Openbox(int m_argc, char **m_argv, char *dpy_name, char *rc) } else { rc_file = bstrdup(rc); } + symlink_rc(rc_file); config.setFile(rc_file); no_focus = False; @@ -1638,3 +1639,15 @@ void Openbox::setFocusedWindow(OpenboxWindow *win) { if (old_screen && old_screen != screen) old_screen->updateNetizenWindowFocus(); } + +#warning TODO: wrap in appropriate #ifdefs. + +void Openbox::symlink_rc(const char*rcfile)const{ + char *homedir = getenv("HOME"); + + char *link_file = new char[strlen(homedir) + strlen("/.blackoxrc") + 1]; + sprintf(link_file, "%s/.blackboxrc", homedir); + if(symlink(rcfile, link_file) == -1){ + perror("Cannot create symlink"); + } +} |
