X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fopenbox.c;h=21f3a60604a6a0ba7854768668e069396feab506;hb=3cdf906f5f65561272d448cfa2372ad9793f7760;hp=521469606bdeb89063bc5fe8dc4f154da4b3e770;hpb=de4f92ccc66c1dad1a2820a07d1f0161bd61a855;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index 52146960..21f3a606 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -414,3 +414,13 @@ ObState ob_state() { return state; } + +gchar *ob_expand_tilde(const gchar *f) +{ + if (!f) + return NULL; + else if (f[0] != '~') + return g_strdup(f); + else + return g_strconcat(g_get_home_dir(), f+1, NULL); +}