When I saw that screenshots would be stored in $XDG_SCREENSHOTS_DIR I added it to ~/.config/user-dirs.dirs
and verified that it worked by doing
xdg-user-dir SCREENSHOTS. However, it seems that that didn't work at all, it was still stored in ~/$XDG_PICTURES_DIR/Screenshots
and looking at the code
std::env::var_os("XDG_SCREENSHOTS_DIR")
.map(PathBuf::from)
.filter(|p| p.is_absolute())
.or_else(|| {
// Fall back to XDG_PICTURES_DIR/Screenshots or ~/Pictures/Screenshots
dirs::picture_dir()
.or_else(|| dirs::home_dir().map(|h| h.join("Pictures")))
.map(|p| p.join("Screenshots"))
})
it currently only looks at the env. Which is quite weird, since the fallback actually handles XDG_PICTURES_DIR correct and then just attaches "Screenshots" to it.
I guess that the dirs crate needs to be patched to support XDG_SCREENSHOT_DIR and use that if set.
When I saw that screenshots would be stored in $XDG_SCREENSHOTS_DIR I added it to
~/.config/user-dirs.dirsand verified that it worked by doing
xdg-user-dir SCREENSHOTS. However, it seems that that didn't work at all, it was still stored in ~/$XDG_PICTURES_DIR/Screenshotsand looking at the code
it currently only looks at the env. Which is quite weird, since the fallback actually handles XDG_PICTURES_DIR correct and then just attaches "Screenshots" to it.
I guess that the
dirscrate needs to be patched to support XDG_SCREENSHOT_DIR and use that if set.