tint2conf: Create snapshot file in /tmp
This commit is contained in:
parent
219b24cbdb
commit
d1b959818e
1 changed files with 5 additions and 1 deletions
|
@ -184,8 +184,10 @@ gboolean update_snapshot()
|
|||
COL_THEME_FILE, &path,
|
||||
-1);
|
||||
|
||||
char fname[128];
|
||||
sprintf(fname, "tint2-%d.jpg", (int)getpid());
|
||||
|
||||
gchar *snap = g_build_filename(g_get_user_config_dir(), "tint2", "snap.jpg", NULL);
|
||||
gchar *snap = g_build_filename(g_get_tmp_dir(), fname, NULL);
|
||||
g_remove(snap);
|
||||
|
||||
gchar *cmd = g_strdup_printf("tint2 -c \'%s\' -s \'%s\' 1>/dev/null 2>/dev/null", path, snap);
|
||||
|
@ -197,6 +199,8 @@ gboolean update_snapshot()
|
|||
}
|
||||
}
|
||||
g_free(cmd);
|
||||
|
||||
g_remove(snap);
|
||||
g_free(snap);
|
||||
g_free(path);
|
||||
|
||||
|
|
Loading…
Reference in a new issue