Coder Social home page Coder Social logo

wallpaper's People

Contributors

kkyr avatar ltpquang avatar millerp avatar reujab avatar tomwardill avatar ulissemini 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

wallpaper's Issues

[bug] If the wallpaper file is in use on MacOS, it cannot be overwritten again

//file, err := os.Create(filepath.Join(cacheDir, "wallpaper"))
tsNano := strconv.FormatInt(time.Now().UnixNano()/1e6, 10)
file, err := os.Create(filepath.Join(cacheDir, "wallpaper"+tsNano))

If the wallpaper file is in use on MacOS, it cannot be overwritten again;
Add the time parameter to the temporary file wallpaper to solve this problem

Set Individual Screens on MacOS

Hi, would it be possible to add a feature to enable setting the wallpaper only on one screen? So I can set separate wallpapers across different screens.

Not detecting i3wm on manjaro correctly

My output from env is here
from what i can see DESKTOP_SESSION and KDG_CURRENT_DESKTOP are unset (this is what causes the message)

think detection could be implemented by checking first the environment then if thats empty checking if the process "i3" is running.

this or this could help, i'll also try and find a fix myself and if i do i'll pr it :)
EDIT: possible fix on linux, looking in /proc

The code i used to test your library is here
Cheers!

Does not work on windows 7

I know win7 is outdated now, but my mobile development laptop is win7.

NOTE: go build and go run don't work, No errors, they act like nothing is wrong, but the results have no effect on the wallpaper, FOR EXAMPLE, these two exe files attached, were build on the systems labeled, and below is the EXACT SAME SOURCE code (one file, wallpaper.go)

package main

import (
	"fmt"
	"os"
	"time"
	"github.com/reujab/wallpaper"
)

var URL = "https://mgo.azureedge.net/cloudcache/7/c/2/f/3/4/7c2f345bdfcadb8a3faf483ebaa2e9aea712bbdb.jpg"
var file = ""

func main() {
	
	//Check to see if image is provided
	if len(os.Args) >= 2 {
		file = os.Args[1]
	}
	
	//If no image provided, set wallpaper to Default Windows 10 wallpaper
	if file == "" {
		wallpaper.SetFromURL(URL)
		fmt.Println("")
		fmt.Println("To use, drag and drop a image onto the exe, as if you were moving it to a folder.")
		fmt.Println("Default behavior is to reset to the default windows wallpaper")
		
		time.Sleep(30 * time.Second)
	} else {
	// If a image is provided, set that as the wallpaper
		wallpaper.SetFromFile(file)
	}
}

TL;DR
go build/go run returns no results on windows 7
prebuilt exe from win10 results in the wallpaper working

wallpaper.exe.zip

Mac OS - Second Screen

Hi.

I am using your library in my project. Some one opened an issue indicating that connecting a secundary screen on MacOS the program did not changed the wallpaper on that screen. It was changed only in the primary screen.

Is there a flag to set the wallpaper on all screens?

Thanks mate!

unable to use in linux

when i run the example code in linux(deepin/ubuntu):
panic: exec: "dconf": executable file not found in $PATH

goroutine 1 [running]:
main.main()
/home/lizi/space/gospace/test/wallpaper.go:13 +0xe5
exit status 2

Windows Get is successful even if the wallpaper doesn't exist

Try these

wallpaper.SetFromFile("C:\\some\\image.jpg")
  1. Then delete that file
wallpaper.Get()
// gives the exact same path i.e. C:\some\image.jpg

I know this is a systemParametersInfo implementation issue.
But is there something that can be done to extract the wallpaper more reliably?

So that something like wallpaper.Get().save(path) can be implemented without no worries.

Option to manually name downloaded file or remove special characters

To my understanding if you use SetFromURL , the donwloadImage function names the downloaded image as the last part of the URL path. Here is the issue with that. If you use a URL path with certain characters, the whole thing will crash, as some characters aren't allowed to be used as file name on Windows (not sure about other OSes). Would it make sense to add an option to allow manual naming of the downloaded image file? Or maybe just removing special characters from file name could also suffice?

Not working on manjaro XFCE

It just sets the default wallpaper.

I tried running the command the package uses in the command line and it didn't work either.

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.