Skip to main content

A daemon which manages your desktop wallpapers. Sort of the 'mpd' of wallpapers.

Project description

Wallpaper Changing Daemon (wcd)

Wallpaper Changing Daemon reminds me of mpd, but it manages wallpapers instead of music.

Overview

  • It comes with wcc too, which is a CLI client app, used to interact with the Daemon.
  • It works on python 3.9 (and, probably, on 3.7 and 3.8 too, not sure about lower versions though).
  • It only depends on PyYAML and coloredlogs, but you don't have to worry about installing them manually, pip's got you covered.
  • It copies it's default config file into ~/.config/wcd/, or to wherever you point it to, via $WCD_CFG.
  • I only code as a hobby, but I'd say I made a good job to make this very readable and, thus, feel very welcomed to check how things are implemented, to get a better understanding of what this program does, its capabilities, etc...
  • You need to have a program which will do the wallpaper switching (such as xwallpaper, feh or nitrogen) installed on your machine.

Why shouldn't I just use a shell script instead

Lots of people use shell scripts in which they have shell scripts like this:

while true; do
    for file in "$(find /usr/share/backgrounds/ -type f | shuf)"; do
        xwallpaper --zoom "$file"
    done
done

And that's fine, but I don't like that approach because it's too limiting. What if, actually, you don't like a wallpaper that has been presented to you? Well, then, you'd have to manually change it. With wcd and wcc, you can interact with the daemon as it presents wallpapers to you, going back and forward in a history buffer, choosing to start or to stop randomizing wallpapers, or just getting the next one presented to you if you don't like the current one anymore, all with a single keypress (see "sxhkd keybindings for wcc" below).

Installation

  1. Install the package with pipx: pipx install wcd or clone this repo and run setup.py
    • If you use Arch based distros, you can install pipx as such: sudo pacman -S python-pipx
  2. Run the package once, to generate config files. If you want to, you can point to where you want your config to be stored in by exporting an evironment variable named WCD_CFG, like this:
    • export WCD_CFG="path/to/config" # be sure to add this line to your ~/.profile or ~/.bashrc or whatever shell you use
    • wcd
  3. Load the config file (defaults to ~/.config/wcd/cfg.yml) on your text editor and change the wallpaper_cmd entry to whatever suits you best.
  4. Kill the previous running instance if you haven't already and, then, restart the program.
  5. You're all set, enjoy.

Installing and Running as systemd Service

  1. Clone this repo: git clone https://github.com/brunofauth/wcd.git
  2. cd into it: cd wcd
  3. edit wcd.service to include whatever you get when you run which wcd
  4. Copy the unit file to your systemd config folder: cp wcd.service ~/.config/systemd/user/wcd.service
  5. To enable starting wcd on login, run: systemctl enable --user wcd.service
  6. To immediatly start wcd, run: systemctl start --user wcd.service

Communicating with the wcd

  • Run: wcc --help, it stands for Wallpaper Changing Client and comes bundled with wcd

sxhkd keybindings for wcc (append to your sxhkdrc)

shift + XF86Audio{Play,Next,Prev}
    wcc {toggle_cycle,next,prev}

TODO

  • aur package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wcd-0.0.0a6.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

wcd-0.0.0a6-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file wcd-0.0.0a6.tar.gz.

File metadata

  • Download URL: wcd-0.0.0a6.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for wcd-0.0.0a6.tar.gz
Algorithm Hash digest
SHA256 0cf57ca9cb8d342680af1f2533cfbfff563e39e7a544dd512c3617fdba3a8f1d
MD5 bd531367dd4798754417776fab91d79a
BLAKE2b-256 9cd7aedd491c8dd29b1c1b47ff06eb92e56d582f537e5361bfe2a8e97090e2ce

See more details on using hashes here.

File details

Details for the file wcd-0.0.0a6-py3-none-any.whl.

File metadata

  • Download URL: wcd-0.0.0a6-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for wcd-0.0.0a6-py3-none-any.whl
Algorithm Hash digest
SHA256 42bc2e0379896196874b7b886b265d63a63e1189739d2abe4687414f6ed44f7b
MD5 87b27f45e144890c5ca0fce62a7a1369
BLAKE2b-256 33577ef58bfc7e3d3d9f3bb0d249e1740e9d12f3c612b9227b02a6cd99da0fc7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page