Giter VIP home page Giter VIP logo

splash-cli's Introduction

Splash CLI v4

Go

Are you looking for the v3.x splash-cli? Check out the master branch

A new era for Splash CLI is coming! After many weeks thinking how to upgrade the project codebase I decided to completely rewrite the CLI from the ground in Go.

The idea is to replicate the original functionality to keep the new experience as close to the original as possible.

Why Go?

  • Distribution will not depend on NPM
  • No need to install any dependencies
  • Lighter bundle size
  • No need to use any build tools
  • Blazing fast (~2500%) (0.22s vs 5s)

Feature List

  • Change wallpaper on your desktop
  • Download photos
  • Login to your account
  • Create new collections
  • Add photos to collections
  • Like photos
  • More to come

Installation

Via Homebrew

brew tap rawnly/tap
brew install splash-cli

Via Go

go install github.com/rawnly/splash-cli@latest

Be sure to set up your environment before running the command. Required environment variables are:

  • UNSPLASH_CLIENT_ID
  • UNSPLASH_CLIENT_SECRET

You can get credentials on the Unsplash Developer Portal.

Also remember that the BIN name will be splash-cli and not splash

Manually

Build Locally

To build the project locally you can use the following command:

    goreleaser --snapshot --rm-dist
    
    # Or
    
    make build # this will only build for the current platform

Note If you have an .env file in your project root make will automatically inject values inside script commands.

Be sure to set up your environment before running the command. Required environment variables are:

  • UNSPLASH_CLIENT_ID
  • UNSPLASH_CLIENT_SECRET

You can get credentials on the Unsplash Developer Portal.

splash-cli's People

Contributors

rawnly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

splash-cli's Issues

Cannot read property 'url' of undefined

Basic informations

  • Splash CLI version: 3.4.0
  • Node version: 10.15.0
  • Your OS: Mac OS Mojave 10.14.4

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

When running splash --collection wallpapers, I got the error of url undefined. This is not the first time I have this error, it seems that sometimes the Splash API should not return an image url.

To Reproduce
Steps to reproduce the behavior:

  1. Run splash --collection wallpapers (please not it doesn't happen every time)

Expected behavior
splash-cli should retrieve the image url from Splash API's and setup the wallpaper.

Console Output

OOps! We got an error!

Please report it: on GitHub (https://github.com/splash-cli/splash-cli/issues)

Splash Error:

 TypeError: Cannot read property 'url' of undefined
    at _callee$ (/Users/totominc/.config/yarn/global/node_modules/splash-cli/build/client.js:361:19)
    at tryCatch (/Users/totominc/.config/yarn/global/node_modules/babel-runtime/node_modules/regenerator-runtime/ru
ntime.js:62:40)
    at Generator.invoke [as _invoke] (/Users/totominc/.config/yarn/global/node_modules/babel-runtime/node_modules/r
egenerator-runtime/runtime.js:296:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/totominc/.config/yarn/global/node_modules/babel-r
untime/node_modules/regenerator-runtime/runtime.js:114:21)
    at step (/Users/totominc/.config/yarn/global/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /Users/totominc/.config/yarn/global/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
    at process._tickCallback (internal/process/next_tick.js:68:7)

splash not downloading image

Basic informations

  • splash-cli version: 2.3.9
  • NodeJs version: v7.7.2
  • Your OS: macOS 10.12.4

ISSUE

When I run splash no image is downloaded and stored at this location:

screenshot

Response code 401 (Unauthorized)

Currently the API access seems not possible:

statusCode: 401,
statusMessage: 'Unauthorized',

Happens with all unsplash downloads.

Support for multiple monitors setup

Basic informations

  • splash-cli version: 2.3.9
  • NodeJs version: v7.7.2
  • Your OS: macOS 10.12.4

ISSUE

When I run splash only the main monitor has its wallpaper changed. Can splash-cli also set the wallpaper of additional monitors if they are present?

[HTTPError]: Response code 401 (Unauthorized)

Basic informations

  • Splash CLI version: 3.4.0
  • Node version: 6.11.3
  • Yarn version: 1.17.3
  • Your OS: MacOS 10.13.6

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

HTTP 401 Unauthorization issue with Splash API happens with any command. NPM or Yarn use seems irrelevant. Started happening recently so I updated everything involved but still I have the error.

To Reproduce
Steps to reproduce the behavior:

  1. Run any splash command that fetches a new background, I usually do -c or -f

Expected behavior
Background updates after a moment

Console Output

GotError [HTTPError]: Response code 401 (Unauthorized)
    at /Users/my.user/.config/yarn/global/node_modules/got/index.js:386:13
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  name: 'HTTPError',
  host: 'api.unsplash.com',
  hostname: 'api.unsplash.com',
  method: 'GET',
  path: '/photos/random?client_id=a70f2ffae3634a7bbb5b3f94998e49ccb2e85922fa3215ccb61e022cf57ca72c&count=1&featured=false',
  protocol: 'https:',
  url: 'https://api.unsplash.com/photos/random?client_id=a70f2ffae3634a7bbb5b3f94998e49ccb2e85922fa3215ccb61e022cf57ca72c&count=1&featured=false',
  statusCode: 401,
  statusMessage: 'Unauthorized',
  headers: {
    server: 'Cowboy',
    'content-type': 'application/json',
    'access-control-allow-origin': '*',
    'access-control-request-method': '*',
    'access-control-allow-headers': '*',
    'access-control-expose-headers': 'Link,X-Total,X-Per-Page,X-RateLimit-Limit,X-RateLimit-Remaining',
    'cache-control': 'no-cache',
    'x-request-id': 'd53c3d03-878d-4f01-9436-baa32b639483',
    'x-runtime': '0.012741',
    'strict-transport-security': 'max-age=31536000; includeSubDomains',
    via: '1.1 vegur, 1.1 varnish, 1.1 varnish',
    'accept-ranges': 'bytes, bytes, bytes, bytes',
    'content-length': '55',
    date: 'Tue, 17 Sep 2019 22:40:08 GMT',
    connection: 'close',
    'x-served-by': 'cache-iad2126-IAD, cache-lax8632-LAX',
    'x-cache': 'MISS, MISS',
    'x-cache-hits': '0, 0',
    'x-timer': 'S1568760008.131680,VS0,VE77',
    vary: 'Origin, Authorization'
  }
}
✖ Unable to connect.

Needs API Key

✖ Connecting to UNSPLASH

Invalid access token! - Please update it via

https://api.unsplash.com/photos/random?client_id=undefined

Command fails with `which` commands for ubuntu 18.04

Basic informations

  • splash-cli version: 3.0.2
  • Node version: v8.12.0
  • Your OS: Unbuntu 18.04 LTS

ISSUE

Running splash with no arguments produces the following output:

✔ Connected!
✔ Making something awesome
Error: Command failed: which -a gsettings; which -a setroot; which -a pcmanfm; which -a feh; which -a nitrogen; which -a xfconf-query; which -a gconftool-2; which -a dcop; which -a dconf; which -a qdbus

    at ChildProcess.exithandler (child_process.js:276:12)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:915:16)
    at Socket.stream.socket.on (internal/child_process.js:336:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:561:12)

For grins I run the command by hand:

52% 2018-10-15 15:30:19 ⌚  monkeylappy in ~
○ → which -a gsettings; which -a setroot; which -a pcmanfm; which -a feh; which -a nitrogen; which -a xfconf-query; which -a gconftool-2; which -a dcop; which -a dconf; which -a qdbus
/usr/bin/gsettings
/usr/bin/dconf

404 not found

splash collection get https://unsplash.com/collections/89780811/dog
I attemped to download the batched images from collection url, but failed and shown 404 error
✖ GotError [HTTPError]: Response code 404 (Not Found) at /home/ubunlei/.nvm/versions/node/v18.1.0/lib/node_modules/splash-cli/node_modules/got/index.js:386:13 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { host: 'api.unsplash.com', hostname: 'api.unsplash.com', method: 'GET', path: '/collections/https:/unsplash.com/collections/89780811/dog', protocol: 'https:', url: 'https://api.unsplash.com/collections/https:/unsplash.com/collections/89780811/dog', statusCode: 404, statusMessage: 'Not Found', headers: { connection: 'close', server: 'Cowboy', 'content-type': 'application/json', 'content-language': 'en', 'cache-control': 'no-cache', 'x-ratelimit-limit': '5000', 'x-ratelimit-remaining': '4977', 'x-request-id': 'dddc9150-586b-43cf-94c8-f88cead12679', 'x-runtime': '0.015580', 'content-encoding': 'gzip', 'strict-transport-security': 'max-age=31536000; includeSubDomains', via: '1.1 vegur, 1.1 varnish, 1.1 varnish', 'accept-ranges': 'bytes', date: 'Mon, 16 May 2022 17:46:08 GMT', 'x-served-by': 'cache-iad-kjyo7100082-IAD, cache-qpg1221-QPG', 'x-cache': 'MISS, MISS', 'x-cache-hits': '0, 0', 'x-timer': 'S1652723168.955386,VS0,VE278', vary: 'Accept-Encoding, Origin,Authorization,Accept-Language,Accept', 'transfer-encoding': 'chunked' } }

MultiScreen command

Hello,
I'm on macOS and I run splash through a script at regular intervals.

I was able to use flag: --screen in previous version to specify screen for a specific wallpaper. It appears that v4 doesn't recognize this command and throw and error Error: unknown flag: --screen. Is it not yet applicable? Has that command changed to something else?

I was unable to get help regarding this even after running splash --help.

Installation in Windows needs Visual Studio Installation?

I tried to install splash-cli on fresh installation and get this:

npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! code 1
npm ERR! path C:\Users\User\AppData\Roaming\npm\node_modules\splash-cli\node_modules\sharp
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)
npm ERR! info sharp Using cached C:\Users\User\AppData\Local\npm-cache\_libvips\libvips-8.9.1-win32-x64.tar.gz
npm ERR! info sharp Creating C:\Users\User\AppData\Roaming\npm\node_modules\splash-cli\node_modules\sharp\build\Release
npm ERR! info sharp Copying DLLs from C:\Users\User\AppData\Roaming\npm\node_modules\splash-cli\node_modules\sharp\vendor\lib to C:\Users\User\AppData\Roaming\npm\node_modules\splash-cli\node_modules\sharp\build\Release
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.1 found at "C:\Program Files\Python39\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version was set from command line or npm config
npm ERR! gyp ERR! find VS - looking for Visual Studio version 2017
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2019 (16.8.31005.135) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
npm ERR! gyp ERR! find VS - "Visual Studio C++ core features" missing
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS valid versions for msvs_version:
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use

How can it be that splash-cli needs Visual Studio to be installed? Seems a bit overkill with 2GB of installation. Or what did I wrong?

ParseError when option --day is used

× { ParseError: Unexpected token < in JSON at position 0 in "https://lambda.splash-cli.app/":
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <m...
    at stream.catch.then.data (C:\Users\...\AppData\Roaming\npm\node_modules\splash-cli\node_modules\got\index.js:380:15)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  name: 'ParseError',
  host: 'lambda.splash-cli.app',
  hostname: 'lambda.splash-cli.app',
  method: 'GET',
  path: '/',
  protocol: 'https:',
  url: 'https://lambda.splash-cli.app/',
  statusCode: 200,
  statusMessage: 'OK' }
× Unable to connect.

Splash v3.4.13 will not install with npm / yarn

Basic informations

  • Splash CLI version: 3.4.13
  • Node version: v12.18.3
  • Your OS: Ubuntu 20.04.1 LTS

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

Splash CLI will not install via npm / yarn

To Reproduce

> yarn global add splash-cli
yarn global v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
      - splash
Done in 5.61s.

> splash
Command 'splash' not found, but can be installed with:

apt install splash
> npm install --global splash-cli
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path ~/.nvm/versions/node/v12.18.3/lib/node_modules/splash-cli/build/bin/index.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '~/.nvm/versions/node/v12.18.3/lib/node_modules/splash-cli/build/bin/index.js'
npm ERR! enoent This is related to npm not being able to find a file.

Expected behavior
splash being available after installing.

Splash command not working

Basic informations

  • Splash CLI version: 3.4.11
  • Node version: 13.11.0
  • Your OS: macOS 10.15.4

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

The following command fails.

To Reproduce
Steps to reproduce the behavior:

  1. Run splash --quiet --collection editorial

Expected behavior
Splash sets a new wallpaper.

Console Output

OOps! We got an error!

Please report it: on GitHub

Splash Error:


✖ GotError [HTTPError]: Response code 400 (Bad Request)
    at /Users/alec/.nvm/versions/node/v13.11.0/lib/node_modules/splash-cli/node_modules/got/index.js:386:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  name: 'HTTPError',
  host: 'sentry.io',
  hostname: 'sentry.io',
  method: 'POST',
? Error caught. Would you like to send some feedback? (Y/n)

Lots of deprecated warnings

Basic informations

  • Splash CLI version: 3.4.12
  • Node version: v14.8.0
  • Your OS: Windows 10

Before you go

  • [ ?] I've read the FAQ section.
  • [ x] I've the latest version of Splash CLI installed
  • [ x] I've searched other issues like mine but I haven't found a solution.

I'm getting lots of deprecated warnings on installation:

npm i -g [email protected]
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade tonpm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported

And by the way, your FAQ section is not available ;)

Wallpaper not updated when fullscreen app is focused

Basic informations

  • Splash CLI version: 3.3.0
  • Node version: v8.12.0
  • Your OS: Mojave

The ISSUE

Picture is not applied as a wallpaper if the focus is on a full screen app.
The picture is downloaded fine but not applied as a wallpaper

To Reproduce
Steps to reproduce the behavior:

  1. Run splash
  2. While it's loading go to a full screen app until the command is done loading
  3. Go back to the desktop

Expected behavior
After the command finished, the new wallpaper is downloaded but not applied.

Console Output
N/A

v3.3.3 无法获取照片

OOps! We got an error!

Please report it: on GitHub (https://github.com/splash-cli/splash-cli/issues)

Splash Error:

× { HTTPError: Response code 401 (Unauthorized)
at stream.catch.then.data (d:\Liang\AppData\Roaming\npm\node_modules\splash-cli\node_modules\got\index.js:386:13)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'HTTPError',
host: 'api.unsplash.com',
hostname: 'api.unsplash.com',
method: 'GET',
path: '/photos/random?client_id=undefined&count=1&featured=false',
protocol: 'https:',
url:
'https://api.unsplash.com/photos/random?client_id=undefined&count=1&featured=false',
statusCode: 401,
statusMessage: 'Unauthorized',
headers:
{ server: 'Cowboy',
'content-type': 'application/json',
'access-control-allow-origin': '',
'access-control-request-method': '
',
'access-control-allow-headers': '*',
'access-control-expose-headers':
'Link,X-Total,X-Per-Page,X-RateLimit-Limit,X-RateLimit-Remaining',
'cache-control': 'no-cache',
'x-request-id': '7f4ebf37-987f-4656-87a3-258e2e2f54eb',
'x-runtime': '0.036429',
'strict-transport-security': 'max-age=31536000; includeSubDomains',
via: '1.1 vegur, 1.1 varnish, 1.1 varnish',
'accept-ranges': 'bytes, bytes, bytes, bytes',
'content-length': '55',
date: 'Tue, 23 Apr 2019 01:01:57 GMT',
connection: 'close',
'x-served-by': 'cache-iad2130-IAD, cache-tyo19932-TYO',
'x-cache': 'MISS, MISS',
'x-cache-hits': '0, 0',
'x-timer': 'S1555981317.861780,VS0,VE207',
vary: 'Origin, Authorization' } }
× Unable to connect.

Installation fail

I get this on Node v8.9.0 or v9.0.0

sudo npm i -g splash-cli
/Users/alec/.nvm/versions/node/v8.9.0/bin/splash -> /Users/alec/.nvm/versions/node/v8.9.0/lib/node_modules/splash-cli/bin/index.js
npm ERR! path /Users/alec/.nvm/versions/node/v8.9.0/lib/node_modules/splash-cli/pm2 interval.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/alec/.nvm/versions/node/v8.9.0/lib/node_modules/splash-cli/pm2 interval.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Error after update to 3.1.0

Basic informations

  • Splash CLI version: 3.1.0
  • Node version: v8.12.0
  • Your OS: MacOS Mojave

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

After updating splash-cli to version 3.1.0, I got this error whenever running the splash command in the terminal:
OAuth error: The access token is invalid

Error: Command failed: which...

Basic informations

  • Splash CLI version: 3.3.0
  • Node version: v8.10.0
  • Your OS: Ubuntu 18.04.1

Before you go

  • [?] I've read the FAQ section.

^ 404 Error

  • I've the latest version of Splash CLI installed
  • [X ] I've searched other issues like mine but I haven't found a solution.

The ISSUE

✔ Connected!
✔ Something is happening...
Error: Command failed: which -a gsettings; which -a setroot; which -a pcmanfm; which -a feh; which -a nitrogen; which -a xfconf-query; which -a gconftool-2; which -a dcop; which -a dconf; which -a qdbus

at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)

To Reproduce
Steps to reproduce the behavior:

  1. Run splash --today

Expected behavior
I expected it to download and replace my wallpaper. :/

Console Output
See above.

Errors running help command after install

Basic informations

  • splash-cli version: 2.3
  • NodeJs version: 7.6
  • Your OS: MacOS

ISSUE

/usr/local/bin/splash: line 1: use strict: command not found
/usr/local/bin/splash: line 2: //: is a directory
/usr/local/bin/splash: line 3: syntax error near unexpected token `'chili-js''
/usr/local/bin/splash: line 3: `require('chili-js');'

Feature: `--orientation` option

Is your feature request related to a problem? Please describe.
When downloading a random photo there are also often portrait-oriented pictures. Those look strange on normal landscape-oriented desktop screen.

Describe the solution you'd like
There should be an option to specify the orientation of the images. For this you can use the ratio of width to height.

...but does it work behind HTTP proxy?

Basic informations

  • splash-cli version: 2.3.3
  • NodeJs version: 6.9.5
  • Your OS: Ubuntu

ISSUE

I am behind HTTP proxy and splash-cli says that there is no internet connection. I do have http_proxy and https_proxy env, variables set...

Feature: `--screen` option

In the readme there is an option --screen mentioned, which is gone in the current version (3.4.0). I would like to have that again to manage more screens or exclude a screen from changing wallpaper.

MacOS multiple desktops

Is your feature request related to a problem? Please describe.
Feature request: a flag to support multiple desktops on macos. Currently there's only the support for different monitors and not virtual desktops

Describe the solution you'd like
a flag --desktop that takes a number or all to specify which virtual desktop's background to change

Describe alternatives you've considered
today we have to move the terminal to the specific desktop and then run the command to change background for that desktop

Want Terminal setup like in the video

I want to know how you did the terminal in the ScreenShot of the readme.md file. It would be great if you could post all your settings of the terminal

Can't set askForLike property

Basic informations

  • Splash CLI version: 3.4.10
  • Node version: 8.10.0
  • Your OS: Ubuntu 18.04 LTS

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

When I run the command splash settings set askForLike there's a prompt that asks: "Prompt to like the downloaded photo after download? (Y/n)". I type "n" and hit "Enter", but when I do splash settings get, the property "askForLike" is true. And when I run splash --query wallpaper it still ask for like.

To Reproduce
Steps to reproduce the behavior:

  1. Run splash settings set askForLike
  2. Type n and hit "Enter"

Expected behavior
The property "askForLike" should be false in the config file when I run splash settings get
Console Output
"askForLike": true,

certificate has expired when option --day is used

× { RequestError: certificate has expired
at ClientRequest.req.once.err (C:\Users%\AppData\Roaming\npm\node_modules\splash-cli\node_modules\got\index.js:182:22)
at Object.onceWrapper (events.js:286:20)
at ClientRequest.emit (events.js:198:13)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
name: 'RequestError',
code: 'CERT_HAS_EXPIRED',
host: 'lambda.splash-cli.app',
hostname: 'lambda.splash-cli.app',
method: 'GET',
path: '/',
protocol: 'https:',
url: 'https://lambda.splash-cli.app/' }
× Unable to connect.

TypeError: Cannot read property 'bold' of undefined

Basic informations

  • splash-cli version: 2.3.4
  • NodeJs version: 4.3.0
  • Your OS: macOS Sierra, 10.12.3 (16D32)

ISSUE

When I run $ splash I get the following error:

false
✔ Connected!
✔ Making something awsome

/usr/local/lib/node_modules/splash-cli/libs/download.js:67
    log(`Shooted by: ${creator.fullname.cyan.bold} (${creator.username.yellow})`);
                                            ^

TypeError: Cannot read property 'bold' of undefined
    at infos (/usr/local/lib/node_modules/splash-cli/libs/download.js:67:45)
    at WriteStream.response.pipe.on (/usr/local/lib/node_modules/splash-cli/libs/download.js:120:7)
    at emitNone (events.js:91:20)
    at WriteStream.emit (events.js:185:7)
    at finishMaybe (_stream_writable.js:515:14)
    at afterWrite (_stream_writable.js:389:3)
    at onwrite (_stream_writable.js:379:7)
    at WritableState.onwrite (_stream_writable.js:90:5)
    at fs.js:2137:5
    at FSReqWrap.wrapper [as oncomplete] (fs.js:747:5)

Please advise.

Support changing on all workspaces for macos

Is your feature request related to a problem? Please describe.
On MacOS --screen all does not change for all workspaces. Need a way to change background for all workspaces

Describe the solution you'd like
on MacOS --screen all or --screen 2 would change the background of the workspace if no other screen is present

Describe alternatives you've considered
there's no way i have found to change background for all workspaces.

env: node\r: No such file or directory

Basic informations

  • splash-cli version: 2.3.5
  • NodeJs version: 6.10.0
  • Your OS: macOS Sierra, 10.12.3 (16D32)

ISSUE

When I run $ splash I get the following error:

env: node\r: No such file or directory

How can I contribute?

Hi,

Great work on this tool, I'm using it daily now. I was thinking to submit a couple of PRs improving some aspects of the tool and adding a feature that I think it would be appreciated which is an option to clear the splash_photos folder by providing a specific argument to the splash command.

I couldn't find any guides about how to contribute to the project and how to run it locally.

Thank you :)

splash settings get : Reading Token Fails

Basic informations

  • Splash CLI version: 3.4.0
  • Node version: 12.8.0
  • Your OS: mac OS 10.14.6

Before you go

  • [Yes ] I've read the FAQ section.
  • [Yes] I've the latest version of Splash CLI installed
  • [Yes] I've searched other issues like mine but I haven't found a solution.

The ISSUE

Can't get settings

To Reproduce
Steps to reproduce the behavior:

  1. Run splash settings get

Expected behavior
I was expecting display for current settings which are set by `splash settings set'.

Console Output

TypeError: Cannot read property 'token' of undefined
    at Object._callee2$ (/usr/local/lib/node_modules/splash-cli/build/commands/settings.js:116:70)
    at tryCatch (/usr/local/lib/node_modules/splash-cli/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.invoke [as _invoke] (/usr/local/lib/node_modules/splash-cli/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
    at Generator.prototype.<computed> [as next] (/usr/local/lib/node_modules/splash-cli/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
    at step (/usr/local/lib/node_modules/splash-cli/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/splash-cli/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
    at new Promise (<anonymous>)
    at new F (/usr/local/lib/node_modules/splash-cli/node_modules/core-js/library/modules/_export.js:36:28)
    at Object.<anonymous> (/usr/local/lib/node_modules/splash-cli/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12)
    at Object.settings (/usr/local/lib/node_modules/splash-cli/build/commands/settings.js:310:15)

I've tried to unisntall and reinstall node, npm and splash-cli. Nothing works.

Version test on linux fails - says 3.0.0 installed when upgraded to 3.0.2

Basic informations

  • Splash CLI version: 3.0.2
  • Node version: v8.12.0
  • Your OS: Ubuntu 18.10

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

I upgraded from 3.0.0 to 3.0.2, but when running splash the test incorrectly says I am running version 3.0.0 and suggests I update.

To Reproduce
Steps to reproduce the behavior:

  1. Run splash

Expected behavior
I get a lovely wallpaper.

Console Output

98% 2018-10-23 17:03:28 ⌚  monkeylappy in ~
○ → splash

> woman standing front of body of water

Downloaded: 509 times.
Viewed: 82.3K times.
Liked by 7 users.

Shot by: Matt Lamers (@lamerbrain)




   ╭───────────────────────────────────────╮
   │                                       │
   │    Update available 3.0.0 → 3.0.2     │
   │   Run npm i -g splash-cli to update   │
   │                                       │
   ╰───────────────────────────────────────╯


98% 2018-10-23 17:03:37 ⌚  monkeylappy in ~
○ → splash --version
3.0.2

98% 2018-10-23 17:04:14 ⌚  monkeylappy in ~
○ → node --version
v8.12.0

JS error when running splash

Basic informations

  • splash-cli version: 2.5.1
  • NodeJs version: v8.1.2
  • Your OS: macOS

ISSUE

When running splash I get the following error:

screenshot

Where are stored all my images?

Basic informations

  • splash-cli version: 3.0.2
  • Node version: 8.12.0
  • Your OS: MacOS mojave

ISSUE

I want to know where the images are saved on my machine.
Thanks.

Splash is not connecting to Unsplash

Basic informations

  • Splash CLI version: 3.3.2
  • Node version: 8.9.4
  • Your OS: Windows 10

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

After the installation using npm, splash complains that the request is Unauthorized.

To Reproduce
Steps to reproduce the behavior:

  1. Run splash

Expected behavior
Select a random wallpaper image and change the actual wallpaper on my Desktop.

Console Output

OOps! We got an error!

Please report it: on GitHub (https://github.com/splash-cli/splash-cli/issues)

Splash Error:


× { HTTPError: Response code 401 (Unauthorized)
    at stream.catch.then.data (C:\Users\cbusa\AppData\Roaming\npm\node_modules\splash-cli\node_modules\got\index.js:386:13)
    at <anonymous>    at process._tickCallback (internal/process/next_tick.js:188:7)
  name: 'HTTPError',  host: 'api.unsplash.com',
  hostname: 'api.unsplash.com',  method: 'GET',
  path: '/photos/random?client_id=undefined&count=1&featured=false',  protocol: 'https:',
  url: 'https://api.unsplash.com/photos/random?client_id=undefined&count=1&featured=false',  statusCode: 401,
  statusMessage: 'Unauthorized',
  headers:
   { server: 'Cowboy',
     'content-type': 'application/json',
     'access-control-allow-origin': '*',
     'access-control-request-method': '*',
     'access-control-allow-headers': '*',
     'access-control-expose-headers': 'Link,X-Total,X-Per-Page,X-RateLimit-Limit,X-RateLimit-Remaining',
     'cache-control': 'no-cache',
     'x-request-id': 'f76bea16-2b99-401d-98f9-e23015425ee3',
     'x-runtime': '0.012820',
     'strict-transport-security': 'max-age=15552000',
     via: '1.1 vegur, 1.1 varnish, 1.1 varnish',
     'accept-ranges': 'bytes, bytes, bytes, bytes',
     'content-length': '55',
     date: 'Mon, 14 Jan 2019 22:34:03 GMT',
     connection: 'close',
     'x-served-by': 'cache-iad2138-IAD, cache-gru17129-GRU',
     'x-cache': 'MISS, MISS',
     'x-cache-hits': '0, 0',
     'x-timer': 'S1547505244.562766,VS0,VE140',
     vary: 'Origin, Authorization' } }
x Unable to connect.

Photos Upload

I've wrote the following script to upload photos to unsplash via nodejs but doesn't seems to work correctly.

The process is:

  1. Get a signed url from S3
  2. Make a put with the binary of the image (the upload process)
  3. Then finally add the image to the current user.

Link to the gist

Error when running `node cli`

So, I cloned the repo, and the first thing it complains about is missing "use strict";, which I fixed in my clone, but after that it complains when running node cli.js/node cli and gives the following error:

/home/fredrik/Downloads/splash-cli/node_modules/chili-js/index.js:35
module.exports = String.prototype.capitalize = function(divider = ' ', joiner = divider) {
                                                                ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/fredrik/Downloads/splash-cli/libs/variables.js:1:63)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10

Splash for linux doesn't update wallpaper

Basic informations

  • Splash CLI version: 3.0.2
  • Node version: v8.12.0
  • Your OS: Ubuntu 18.10

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

I can run splash and see metadata about the image, but it doesn't actually update my wallpaper.

To Reproduce
Steps to reproduce the behavior:

  1. Run splash

Expected behavior
I get a new wallpaper assigned from splash command.

Console Output

98% 2018-10-23 17:03:28 ⌚  monkeylappy in ~
○ → splash

> woman standing front of body of water

Downloaded: 509 times.
Viewed: 82.3K times.
Liked by 7 users.

Shot by: Matt Lamers (@lamerbrain)

98% 2018-10-23 17:08:14 ⌚  monkeylappy in ~
○ → 

CERT_HAS_EXPIRED analytics.splash-cli.app

Basic informations

  • Splash CLI version: 3.4.0
  • Node version: v8.16.0
  • Your OS: Win10 Pro

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Run splash

Expected behavior

Console Output

OOps! We got an error!

Please report it: on GitHub (https://github.com/splash-cli/splash-cli/issues)

Splash Error:
× { RequestError: certificate has expired
    at ClientRequest.req.once.err (C:\Users\Marc\AppData\Local\Yarn\Data\global\node_modules\got\index.js:182:22)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:66:8)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
  name: 'RequestError',
  code: 'CERT_HAS_EXPIRED',
  host: 'analytics.splash-cli.app',
  hostname: 'analytics.splash-cli.app',
  method: 'POST',
  path: '/api/users',
  protocol: 'https:',
  url: 'https://analytics.splash-cli.app/api/users' }

cairo dependency?

Basic informations

  • splash-cli version: 2.3.9
  • NodeJs version: v7.7.2
  • Your OS: macOS 10.12.4

ISSUE

npm i -g splash-cli failed with the following error. brew install cairo was required first to complete the install successfully.

> [email protected] install /Users/alec/.nvm/versions/node/v7.7.2/lib/node_modules/splash-cli/node_modules/canvas
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
gyp: Call to './util/has_cairo_freetype.sh' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/alec/.nvm/versions/node/v7.7.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:308:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.5.0
gyp ERR! command "/Users/alec/.nvm/versions/node/v7.7.2/bin/node" "/Users/alec/.nvm/versions/node/v7.7.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/alec/.nvm/versions/node/v7.7.2/lib/node_modules/splash-cli/node_modules/canvas
gyp ERR! node -v v7.7.2
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
/Users/alec/.nvm/versions/node/v7.7.2/lib
└── (empty)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs canvas
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls canvas
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alec/.npm/_logs/2017-04-08T22_28_16_030Z-debug.log

`splash dir` is not working anymore

Basic informations

  • Splash CLI version: 3.3.4-2
  • Node version: 10.15.3
  • Your OS: macOS Mojave 10.14.3

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

This commit a67d135#diff-1757314a518f2a5dba612e6c9f12b618 seems to have instroduced breaking changes.

You now import pathFixer instead of fixPath from extra/utils, but looks like the function name in extra/utils is still pathFixer

To Reproduce
Steps to reproduce the behavior:

  1. Run splash dir get

Expected behavior
I expect to see the path to my splash images folder.

Console Output

TypeError: (0 , _utils.fixPath) is not a function
    at Function.getPath (/Users/tdaigle/.config/yarn/global/node_modules/splash-cli/build/commands/libs/Directory.js:158:30)
    at Object._callee$ (/Users/tdaigle/.config/yarn/global/node_modules/splash-cli/build/commands/dir.js:61:121)
    at tryCatch (/Users/tdaigle/.config/yarn/global/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.invoke [as _invoke] (/Users/tdaigle/.config/yarn/global/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/tdaigle/.config/yarn/global/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
    at step (/Users/tdaigle/.config/yarn/global/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /Users/tdaigle/.config/yarn/global/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
    at new Promise (<anonymous>)
    at new F (/Users/tdaigle/.config/yarn/global/node_modules/core-js/library/modules/_export.js:36:28)
    at Object.<anonymous> (/Users/tdaigle/.config/yarn/global/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12)

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.