Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the Default Folder for Screenshots #263

Open
2arch opened this issue May 8, 2023 · 6 comments
Open

Changing the Default Folder for Screenshots #263

2arch opened this issue May 8, 2023 · 6 comments

Comments

@2arch
Copy link

2arch commented May 8, 2023

What Happened?

Hi, I want to save all screenshots to go to my obsidian vault, and to do so I need to change the default folder for screenshots.

What can I edit in the source so that I can make this feature available?

Steps to Reproduce

Searched online on forums, but all solutions seem to be outdated

Expected Behavior

Screenshot -> /custom/directory instead of Screenshot /Pictures/Screenshots

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

@jeremypw
Copy link
Collaborator

jeremypw commented May 9, 2023

The workflow for screenshots is being rethought in #253 and that includes the possibility of specifying the destination rather than defaulting to the Screenshots folder. As a workaround you could try replacing the actual screenshots folder with a symbolic link to your desired location (renamed to Screenshots)

@teamcons
Copy link

teamcons commented Nov 4, 2024

It is exposed on dconf. So you can install dconf-editor and go to /io/elementary/screenshot/
And change the path for the key "folder-dir"

@jeremypw
Copy link
Collaborator

jeremypw commented Nov 4, 2024

I think that for the Flatpak version of screenshot, that setting is compiled inside the sandbox so not so easy to change? However, just tried the OS8 flatpak version and it gives a chance to choose where to save the screenshot and the chosen folder is persisted between runs.

@jeremypw
Copy link
Collaborator

jeremypw commented Nov 4, 2024

Another approach would be to edit the file .config/user-dirs.dirs in your home folder to change the path of XDG_PICTURES_DIR . However, that would mean all your pictures would be saved in the new directory at least by apps that use XDG_PICTURES_DIR (which Screenshot does).

@ernstki
Copy link

ernstki commented Dec 20, 2024

Another approach would be to edit the file .config/user-dirs.dirs in your home folder to change the path of XDG_PICTURES_DIR . However, that would mean all your pictures would be saved in the new directory at least by apps that use XDG_PICTURES_DIR (which Screenshot does).

If you accidentally move ~/Pictures, say, into ~/bin, which is easy to do with an errant drag-and-drop with Files, you'll end up with a ~/Screenshots folder and much confusion.

Presumably, xdg-user-dirs-update is responsible for this, as its documentation states that it's run very early in the login phase […] and sets up a config file in $(XDG_CONFIG_HOME)/user-dirs.dirs.

If you get in this situation, or generally want to customize where that Screenshots folder ends up, the only solution at the moment seems to be to manually edit ~/.config/user-dirs.dirs, e.g.

--- user-dirs.dirs.old	2024-12-20 03:45:41.697799443 -0500
+++ user-dirs.dirs	2024-12-20 03:46:27.299647451 -0500
@@ -11,5 +11,5 @@
 XDG_PUBLICSHARE_DIR="$HOME/"
 XDG_DOCUMENTS_DIR="$HOME/Documents"
 XDG_MUSIC_DIR="$HOME/Music"
-XDG_PICTURES_DIR="$HOME/"
+XDG_PICTURES_DIR="$HOME/Pictures"
 XDG_VIDEOS_DIR="$HOME/"

Regardless, for the time being, you'll have to live with the Screenshots part, being a subdirectory of whatever XDG_PICTURES_DIR is defined as in ~/.config/user-dirs.dirs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants