summaryrefslogtreecommitdiff
path: root/openbox/openbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbox/openbox.c')
-rw-r--r--openbox/openbox.c10
1 files changed, 10 insertions, 0 deletions
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);
+}