GithubHelp home page GithubHelp logo

alexcormier / setwp Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 0.0 37 KB

Command line utility to set wallpaper on OS X Yosemite and up

License: MIT License

Shell 8.39% Go 91.61%
mac go wallpaper wallpaper-settings macos yosemite desktop el-capitan sierra

setwp's Introduction

setwp

A command line utility to set the same wallpaper settings for every space and desktop on OS X Yosemite and up.

Installation

There are 3 ways to install.

  1. As any other Go package : go get github.com/alexcormier/setwp.

  2. With Homebrew : brew install alexcormier/personal/setwp.

  3. Download the binary.

Completion

If you want command completion, make sure you have installed the bash-completion or zsh-completions package, depending on your shell.

If you installed with Homebrew, bash and zsh completion scripts are automatically installed; else you'll have to install them manually.

bash

Drop the setwp-completion.bash file in ~/.bash_completion, /etc/bash_completion.d, or any other directory that gets sourced automatically.

zsh

Put the setwp-completion.zsh file in a folder that's in your fpath. To check what folders are in your fpath, run echo $fpath. To add a directory to your fpath, add fpath+="<directory>" to ~/.zshrc.

Usage

Sets wallpaper to <wallpaper>, a <directory> of wallpapers or a solid color.
Fills the screen by default.

Usage:
  setwp [--fit | --stretch | --center | --tile] [--color=<hex>] <wallpaper>
  setwp (--interval=<s> | --login | --wake) [--random] [--fit | --stretch | --center | --tile] [--color=<hex>] <directory>
  setwp --color=<hex>
  setwp --help | --version

Options:
  -f --fit          Fit wallpaper to screen.
  -s --stretch      Stretch wallpaper to fill screen.
  -c --center       Center wallpaper, scaling it down if it is too large.
  -t --tile         Tile wallpaper.
  -C --color=<hex>  Color to fill the screen with, as an RGB hex code.
  -h --help         Show this help message.
  -v --version      Show version information.

Directory options:
  -i --interval=<s>  Interval at which to change wallpaper, in seconds.
  -l --login         Change wallpaper when logging in.
  -w --wake          Change wallpaper when waking from sleep.
  -r --random        Randomize wallpaper selection.

Limitations

  • When setting wallpaper to a directory, spaces and desktops are not synced. Having them in sync is outside the scope of this project, as setwp changes wallpaper settings for all spaces and lets the OS change the actual wallpaper.
  • When setting wallpaper to a directory, the search for images is not recursive. Only the images directly in the given directory will be used, not those in subdirectories.

setwp's People

Contributors

alexcormier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

setwp's Issues

Setting directory as wallpaper doesn't work anymore

It looks like a recent macOS update broke support for wallpaper directories. For example, running

setwp --interval=10 <directory>

results in a black background and the Dock application being unable to restart. (Running setwp again with a single wallpaper will allow the dock to restart.)

After some investigation, I found out that it's now required to set a current wallpaper as well as the directory. So this will require selecting a picture from the given directory and setting the Current preference (see pref.Current).

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.