diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-02-22 13:31:51 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-02-22 13:31:51 +0100 |
commit | 189736c1a96a1ad0e571ad69f01039e96455011a (patch) | |
tree | 22e1a78f698209e2ce0ef462a5d281b5b3030897 /src/Utils.cpp | |
parent | 8003c209fea16cd164817306cb33d46ac61a44f0 (diff) |
Add option to take a screenshot (default hotkey: alt+f1)
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r-- | src/Utils.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp index 6d45196..df6db2f 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -114,6 +114,14 @@ namespace gsr { return xdg_videos_dir; } + std::string get_pictures_dir() { + auto xdg_vars = get_xdg_variables(); + std::string xdg_videos_dir = xdg_vars["XDG_PICTURES_DIR"]; + if(xdg_videos_dir.empty()) + xdg_videos_dir = get_home_dir() + "/Pictures"; + return xdg_videos_dir; + } + int create_directory_recursive(char *path) { int path_len = strlen(path); char *p = path; |