create the dirs for themes in ~/.openbox on startup
This commit is contained in:
parent
b185f7d8dd
commit
56713e45fb
2 changed files with 18 additions and 0 deletions
|
@ -6,6 +6,10 @@
|
||||||
#include "../../kernel/dispatch.h"
|
#include "../../kernel/dispatch.h"
|
||||||
#include "../../kernel/config.h"
|
#include "../../kernel/config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_STAT_H
|
||||||
|
# include <sys/stat.h>
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
@ -70,6 +74,8 @@ static void mouse_event(const ObEvent *e, ObFrame *self);
|
||||||
|
|
||||||
gboolean startup()
|
gboolean startup()
|
||||||
{
|
{
|
||||||
|
char *path;
|
||||||
|
|
||||||
g_quark_from_string("none");
|
g_quark_from_string("none");
|
||||||
g_quark_from_string("root");
|
g_quark_from_string("root");
|
||||||
g_quark_from_string("client");
|
g_quark_from_string("client");
|
||||||
|
@ -84,6 +90,13 @@ gboolean startup()
|
||||||
g_quark_from_string("icon");
|
g_quark_from_string("icon");
|
||||||
g_quark_from_string("close");
|
g_quark_from_string("close");
|
||||||
|
|
||||||
|
/* create the ~/.openbox/themes/openbox dir */
|
||||||
|
path = g_build_filename(g_get_home_dir(), ".openbox", "themes", "openbox",
|
||||||
|
NULL);
|
||||||
|
mkdir(path, (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP |
|
||||||
|
S_IROTH | S_IWOTH | S_IXOTH));
|
||||||
|
g_free(path);
|
||||||
|
|
||||||
ob_s_b_color = ob_s_cb_unfocused_color = ob_s_cb_focused_color =
|
ob_s_b_color = ob_s_cb_unfocused_color = ob_s_cb_focused_color =
|
||||||
ob_s_title_unfocused_color = ob_s_title_focused_color =
|
ob_s_title_unfocused_color = ob_s_title_focused_color =
|
||||||
ob_s_titlebut_unfocused_color = ob_s_titlebut_focused_color = NULL;
|
ob_s_titlebut_unfocused_color = ob_s_titlebut_focused_color = NULL;
|
||||||
|
|
|
@ -98,6 +98,11 @@ int main(int argc, char **argv)
|
||||||
mkdir(path, (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP |
|
mkdir(path, (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP |
|
||||||
S_IROTH | S_IWOTH | S_IXOTH));
|
S_IROTH | S_IWOTH | S_IXOTH));
|
||||||
g_free(path);
|
g_free(path);
|
||||||
|
/* create the ~/.openbox/themes dir */
|
||||||
|
path = g_build_filename(g_get_home_dir(), ".openbox", "themes", NULL);
|
||||||
|
mkdir(path, (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP |
|
||||||
|
S_IROTH | S_IWOTH | S_IXOTH));
|
||||||
|
g_free(path);
|
||||||
|
|
||||||
/* parse out command line args */
|
/* parse out command line args */
|
||||||
parse_args(argc, argv);
|
parse_args(argc, argv);
|
||||||
|
|
Loading…
Reference in a new issue