GithubHelp home page GithubHelp logo

dbanetto / wallutils-systemd Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2 KB

Some user systemd units for setting wallpapers

Shell 100.00%
shell shell-script systemd wallutils wallpaper-changer wallpaper systemd-timer

wallutils-systemd's Introduction

wallutils-*.service

A collection of systemd service files focused on changing wallpapers.

These are designed to be run as systemd user services & timers.

Dependencies

The following dependencies are required

  • systemd (default on systemd-based distros)
  • envsubst (default on most distros)
  • wallutils

Configuration

## Config
WALLPAPER_PATH="${HOME}/Pictures/Wallpapers" # <== path to wallpapers
# When 
# see system.timer(5) for timing syntax
STARTUP_DELAY="1m" # <== delay between starting up & first run
CHANGE_EVERY="1h" # <== delay until next run

What is going on?!

The magic sauce here is using envsubst as a basic templating engine.

It replaces bash-like variables ${VAR} with the value of the corresponding environment variable.

To ensure that other troublesome variables do not show up it is executed with a clean env that has expected variables passed in to it.

This is all a bit of a overkill for this context but a fun way to explore envsubst .As far as I can tell, at least on Arch Linux, is installed by default so a nice low dependency templating "engine".

wallutils-systemd's People

Contributors

dbanetto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.