npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wallchdtd

v1.0.0

Published

Wallpaper changer based on day time for Linux

Downloads

1

Readme

Wallchdt

test Coverage Badge

Wallpaper changer basing on times of the day for Ubuntu.

Screenshot Screenshot

Features

  • 🌄 Change wallpapers based on sunlight time
  • ⌚ Change wallpapers based on daytime

Want more? Open a new issue or 👍 an existing one so we can talk about it.

Installation

Wallchdt is built upon Node.js.

Requirements:

  • node > 16
  • npm > 7

Install Wallchdt as global npm package.

npm i -g wallchdtd

Start wallchdtd daemon.

wallchdtd

Add Wallchdt as startup program. Screenshot

Configuration

After installing and starting, daemon needs to be configured. This is done via config file which is watched by daemon for modifications. Daemon automatically picks up the latest changes in the config and applies them.

Create config file and edit it.

gedit ~/.config/wallchdtd/conf.json

After saving, your wallpaper should change to specified one.

Change wallpapers by sunlight time

Wallchdt automatically calculates sunlight time based on your location and current day. Location from the config file can be either specified explicitly:

{
  "location": {
    "lat": 47,
    "long": 28
  }
}

Or, it can be determined based on your IP (requires active internet connection after configuration is saved). In this case you need to provide ipinfo.io token.

{
  "location": "45609h6c68fgey"
}

Bellow is an example of config:

{
    "changeBy": "sunlight",
    "location": "45609h6c68fgey",
    "wallpapersDir": "~/Pictures/Wallpapers/Mountains/",
    "wallpapers": {
        "dawn": "dawn.jpg",
        "sunrise": "sunrise.jpg",
        "noon": "noon.png",
        "sunset": "sunset.jpg",
        "dusk": "dusk.jpg",
        "night": "night.jpg"
    }
}

Notice that location will be determined automatically. Also, we have optional property wallpapersDir which helps daemon resolve path to wallpapers. You can also specify full path in the wallpapers section. In the wallpapers we indicated wallpapers for all sunlight times, but you can also indicate wallpapers for only a few of them.

Change wallpapers by daytime

Wallchdt can also change wallpapers by specifying an explicit time of the day. In this case location property is no longer needed. Bellow is an example of config:

{
    "changeBy": "daytime",
    "wallpapersDir": "~/Pictures/Wallpapers/Mountains/",
    "wallpapers": {
        "06:00": "sunrise.jpg",
        "10:00": "noon.png",
        "19:00": "sunset.jpg",
        "22:00": "night.jpg"
    }
}

Notice that wallpapers section needs to contain at least 2 entries.

Troubleshooting

In case wallpaper is not changed, you can inspect daemon logs in order to check daemon actions.

tail -f ~/.local/state/wallchdtd/current.log

You can also check whether daemon is actually running via System Monitor. Screenshot

Bug report

If you want to report a bug, first, thanks a lot, that helps me a lot. Please open an issue and mention your OS, your node and npm version, and how to reproduce it. Adding log file ~/.local/state/wallchdtd/current.log is a big help too.