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

get the filename of the currently set wallpaper via shell #162

Open
chrkoewar opened this issue Oct 19, 2023 · 1 comment
Open

get the filename of the currently set wallpaper via shell #162

chrkoewar opened this issue Oct 19, 2023 · 1 comment

Comments

@chrkoewar
Copy link

If the background is set via --random option I found no way to retrieve the filename. If you have a large database and you don't know your images by heart that's a problem. Solutions?

@TheStutterNerd
Copy link

TheStutterNerd commented Oct 3, 2024

The locations for the set backgrounds are usually in ~/.config/nitrogen/bg-saved.cfg.

I'm currently watching for the file change using inotifywait so I can execute a script after background change.
You can read the path via sed '2q;d' bg-saved.cfg | cut -d "=" -f2. Note, this only reads line 2 (path from desktop 1) but I'm sure you can modify it to your needs.

I know this issue was opened ages ago. Just leaving this here in case anyone else comes across this git issue.

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

2 participants