Skip to content

Commit

Permalink
fix: Not working on Gnome > 42 with dark mode
Browse files Browse the repository at this point in the history
`wallpaper` package is unmaintained, `wallpape-rs` includes the fix for
Gnome > 42 therefore I'm switching to it.
  • Loading branch information
bcyran committed Jan 3, 2023
1 parent d364f76 commit e85d66b
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 113 deletions.
164 changes: 63 additions & 101 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "timewall"
description = "All-in-one tool for Apple dynamic HEIF wallpapers on GNU/Linux"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
authors = ["Bazyli Cyran <[email protected]>"]
categories = ["command-line-utilities", "multimedia::images"]
Expand Down Expand Up @@ -32,7 +32,7 @@ serde = { version = "1.0.152", features = ["derive"] }
sun = "0.2.0"
threadpool = "1.8.1"
toml = "0.5.10"
wallpaper = "3.2.0"
wallpape-rs = "2.0.0"
xml-rs = "0.8.4"

[dev-dependencies]
Expand Down
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,6 @@ command = ['feh', '--bg-fill', '%f']
- [mczachurski/wallpaper](https://github.com/mczachurski/wallpapper).
Two high quality custom made walls.

## Known issues
### Not working on Gnome >= 42 with dark theme
Gnome 42 introduces dark theme which requires special command for setting the wallpaper.
This isn't yet supported in the wallpaper setting library used by `timewall`, but can be worked around by using a custom command.
Add the following to your `~/.config/timewall/config.toml`:
```toml
[setter]
command = ['gsettings', 'set', 'org.gnome.desktop.background', 'picture-uri-dark', 'file:///%f']
```

## Resources / credits
The following resources helped me in `timewall` development:
- https://itnext.io/macos-mojave-dynamic-wallpaper-fd26b0698223
Expand Down
1 change: 1 addition & 0 deletions src/setter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::process::Command;
use anyhow::{anyhow, Context, Result};
use itertools::Itertools;
use log::debug;
use wallpape_rs as wallpaper;

/// Set wallpaper to the image pointed by a given path. Use custom command if provided.
pub fn set_wallpaper<P: AsRef<Path>>(path: P, custom_command: Option<&Vec<String>>) -> Result<()> {
Expand Down

0 comments on commit e85d66b

Please sign in to comment.