Skip to content

⚡️ Light-weight CLI application for handy wallpaper manipulations on OS X, written in Go.

License

Notifications You must be signed in to change notification settings

michalspano/wlpr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wlpr - Wallpaper CLI Application for macOS

icon-logo

Forks Stargazers Contributors Issues MIT License Release

Table of Contents

Introduction

wlpr enables you to randomly cycle between desktop wallpapers on a macOS system from the command line. Written in pure Go with additional applescript (for system manipulation), it is a lightweight, simple, and easy to use CLI application.

Context: Suppose you have a folder of wallpapers on your local machine. You would like to choose a random wallpaper from this folder and set it as the current desktop wallpaper. Furthermore, you would like to check whether the newly selected wallpaper isn't the same as the current one, thus displaying a complete new wallpaper every time. All this shall be done in a single command.

Sounds familiar? wlpr is your friend.

Demo

demo

FYI, I'm using this repositery for Nord-themed wallpapers in the demo. For the Nord theme enthusiasts (like myself), create your own here. One last thing, my dotfiles (if anyone is interested) are here.

Installation

  1. Fork the repository
$ git clone -b public --single-branch https://github.com/michalspano/wlpr.git && cd wlpr
  1. Call the init script (from within the repository)
$ ./init <PATH-TO-IMAGE-FOLDER>

*where <PATH-TO-IMAGE-FOLDER> is the path to the folder containing the images to choose from.

  1. You are all set!
$ wlpr

If you aren't satisfied with wlpr, you can remove it (and all the source files) from the system by calling:

$ ./uninstall

NOTE: this script is found within the repository and must be called from within the repository only.

Understanding the code

The init method creates a ~/.wlpr.json file that contains the path to the folder containing the images to choose from and the root of the folder. This is a crucial piece of information that is used by wlpr to determine which images to choose from and where to retrieve the scipts from.

Optional flag(s)

  1. Omit the ending message (default: display the message):
$ wlpr --no-message
$ wlpr -nm
  1. Print the current version:
$ wlpr --version
$ wlpr -v

*Both of the mentioned variants are valid.

Contributing

I'm open to any contribution to the repository. If you have any suggestions or feedback, please open an issue or pull request. 👍

About

⚡️ Light-weight CLI application for handy wallpaper manipulations on OS X, written in Go.

Topics

Resources

License

Stars

Watchers

Forks