aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gsr-config.c
diff options
context:
space:
mode:
authorTrung LĂȘ <8@tle.id.au>2026-06-10 11:46:52 +1000
committerGitHub <noreply@github.com>2026-06-10 11:46:52 +1000
commitf51ba1bf936ae5085ba604b76bbca18e79554dfe (patch)
tree8584adb5c971446eedd3959ac6fdaea86953e74d /src/gsr-config.c
parent3d6435e45cc4b760afa10ddf96a1c542817c0fe1 (diff)
parenta646f86c232ecbc0d1875ef2b83a165760127699 (diff)
Merge pull request #8 from runlevel5/feature/notification-open-folder
feat: click the saved-recording notification to open its folder
Diffstat (limited to 'src/gsr-config.c')
-rw-r--r--src/gsr-config.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gsr-config.c b/src/gsr-config.c
index af8b980..8b9bd4b 100644
--- a/src/gsr-config.c
+++ b/src/gsr-config.c
@@ -68,9 +68,10 @@ gsr_config_get_dir(void)
char *
gsr_config_get_videos_dir(void)
{
- const char *vdir = g_get_user_special_dir(G_USER_DIRECTORY_VIDEOS);
- if (vdir)
- return g_strdup(vdir);
+ /* Prefer the standard XDG videos directory, fall back to ~/Videos. */
+ const char *xdg_videos = g_getenv("XDG_VIDEOS_DIR");
+ if (xdg_videos && *xdg_videos)
+ return g_strdup(xdg_videos);
char *home = get_home_dir();
char *result = g_build_filename(home, "Videos", NULL);
g_free(home);