unixorn/tumult.plugin.zsh

View on GitHub
bin/get-wallpaper-path

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
# Copyright 2017 Joe Block <jpb@unixorn.net>

if [[ "$(uname -s)" != 'Darwin' ]]; then
  echo 'Sorry, this script only works on macOS'
  exit 1
fi

exec osascript -e 'tell application "Finder"
    set wall to desktop picture as alias
    set wallpath to POSIX path of wall
end tell'