Giter Club home page Giter Club logo

dynwalls's People

Contributors

boi4 avatar flohw 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

Watchers

 avatar  avatar

dynwalls's Issues

Build to a binary

Hello @boi4,

I wanted to know if it would be possible to build a binary from the sources ? Even if the binary still requires the two major dependencies exiftool and libheif.

It would ease usage in scripts.

Also, just a side question : I looked at the generated dynwalls.service file and I find all my environment variables dumped into. Is it possible to dump only the required ones ?

Thank you for your script. I will test it more tomorrow ๐Ÿ™‚

Package as Flatpak

It would be awesome if the application could be packaged and distributed as a flatpak.

issue with heif-convert

I'm new to ubuntu and using terminal and stuff and I'm having issues running the command python3 dynwalls use mojave.heic (i named my file mojave.heic if you're wondering). I get the error:

Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "dynwalls/main.py", line 152, in
main()
File "dynwalls/main.py", line 148, in main
dw.act(arguments.action, arguments)
File "dynwalls/main.py", line 31, in act
getattr(self, actionname)(args)
File "dynwalls/main.py", line 76, in use
heic.extract_images(arguments.heicfile,
File "dynwalls/heic.py", line 31, in extract_images
subprocess.run(args)
File "/usr/lib/python3.8/subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'heif-convert'

even though I've installed libheif like 60 million times. What should I do. Do I have to manually clone something else instead like something with only heif-convert? Also, how do I call to the file in the command where I select a .heif since i dont think im even doing that right haha. Pls help me I am a noob (I'm running PopOS which is based on Ubuntu by the way)

Unknown file

Hi, really interested in your project. However I got some problems, maybe you could help me.

I created .heic with this website, used jpg images, and timestamps instead of sun position.

I tried to install all the required libraries, and I think it went well.
I use Debian Buster 10(Raspbian buster to be precise) on RPI4.
X for display manager, i3wm for the window manager. Have wallpaper set with feh.

This is what I do:

โฏ python3 dynwalls setcmd 'feh --bg-fill --no-fehbg {}'
Successfully updated wallpaper command.
โฏ python3 dynwalls use ../dwallpaper.heic
Unknown file type in /home/mpisman/.local/share/dynwalls/images/wallpaper.jpg
feh WARNING: /home/mpisman/.local/share/dynwalls/images/wallpaper-1.jpg does not exist - skipping
feh: No loadable images specified.
See 'man feh' for detailed usage information

Well, hope to use your tool, since that is exactly what I was looking for.

Dependencies issues on Pop!_OS 22.04

Maybe it's a good idea add to the list of requirements the 'feh' package. I tried to execute python3 dynwalls use /path/to/image.heic and the output was:

File contains 4 images
Written to wallpaper-1.jpg
Written to wallpaper-2.jpg
Written to wallpaper-3.jpg
Written to wallpaper-4.jpg
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/path/to/dynwalls_clone/dynwalls/__main__.py", line 150, in <module>
    main()
  File "/path/to/dynwalls_clone/dynwalls/__main__.py", line 146, in main
    dw.act(arguments.action, arguments)
  File /path/to/dynwalls_clone/dynwalls/__main__.py", line 30, in act
    getattr(self, actionname)(args)
  File "/path/to/dynwalls_clonedynwalls/__main__.py", line 87, in use
    self.update()
  File "/path/to/dynwalls_clone/dynwalls/__main__.py", line 137, in update
    subprocess.run(args)
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 966, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'feh' 

Also, when i tried to execute sudo apt install libheif the output was:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libheif

To install the heif-convert I had to execute sudo apt install libheif-examples that had that package. Maybe this only happens on Pop!_OS but I think that specify the name of the package to download could help someone :)

Couldn't Write Image

Hello,
This seems like a fantastic project that could allow me to easily use and swap dynamic wallpapers. So Kudos to the devs for than.
Unfortunately I've run into a couple of issues, which I just can not figure out. I'm pretty much a beginner and still learning, apologies for any mistakes.

I've read though the previous issues and #3 was a godsend. I'll list out everything I've encountered and resolved using it.
My system is Zorin OS 15
gnome-panel 3.26.0

Right off the bat, same thing happened to me with heif convert, I'd installed libheif-dev.
libheif-examples fixed that problem.
Along those lines, the package for exiftool was libimage-exiftool-perl.

dynwalls setcmd 'feh --bg-fill --no-fehbg {}' didn't work for me either, but the other command, gsettings set org.gnome.desktop.background picture-uri 'file:///home/rinzler/.local/share/dynwalls/images/wallpaper-1.jpg' did work without a hitch.
The output of cat ~/.local/share/dynwalls/config.json should be needed is:

{"wp_cmd": "gsettings set org.gnome.desktop.background picture-uri \"file://{}\"", "dyn_config": {"ti": [{"t": 0.0, "i": 0}, {"t": 0.125, "i": 1}, {"t": 0.25, "i": 2}, {"t": 0.375, "i": 3}, {"t": 0.5, "i": 4}, {"t": 0.625, "i": 5}, {"t": 0.75, "i": 6}, {"t": 0.875, "i": 7}], "ap": {"d": 7, "l": 0}}}

After that, python3 dynwalls setcmd "gsettings set org.gnome.desktop.background picture-uri file://{}" resulted in Successfully updated wallpaper command.

Great? Now I should be able to use the "dynwalls use command" right?
Executing python3 dynwalls use ./Wallpapers/Big-macOS-Sur.heic (Wallpapers is a directory I created) returns:

Could not read HEIF file: Invalid input: No 'meta' box
Usage:
  gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

Get the value of KEY

Arguments:
  SCHEMADIR A directory to search for additional schemas
  SCHEMA    The name of the schema
  PATH      The path, for relocatable schemas
  KEY       The key within the schema

Well... perhaps a bad file, I tried again with python3 dynwalls use ./Wallpapers/Dome.heic, this returns:

File contains 2 images
Can't open /home/rinzler/-1.local/share/dynwalls/images/wallpaper.jpg: No such file or directory
could not write image
Can't open /home/rinzler/-2.local/share/dynwalls/images/wallpaper.jpg: No such file or directory
could not write image
Usage:
  gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

Get the value of KEY

Arguments:
  SCHEMADIR A directory to search for additional schemas
  SCHEMA    The name of the schema
  PATH      The path, for relocatable schemas
  KEY       The key within the schema

This message:
Oh you should probably use set and not get, sorry :D
Originally posted by @boi4 in #3 (comment)

Helps solve something, now the outputs are:
For python3 dynwalls use ./Wallpapers/Big-macOS-Sur.heic:

Could not read HEIF file: Invalid input: No 'meta' box

And python3 dynwalls use ./Wallpapers/Dome.heic:

File contains 2 images
Can't open /home/rinzler/-1.local/share/dynwalls/images/wallpaper.jpg: No such file or directory
could not write image
Can't open /home/rinzler/-2.local/share/dynwalls/images/wallpaper.jpg: No such file or directory
could not write image

At this point while @ng2303's wallpaper at least applied, I couldn't, but I haven't yet run dynwalls enable if that matters.
My ~/.local/share/dynwalls/images directory is very much empty at this point.

Now, while python3 dynwalls setcmd "gsettings set org.gnome.desktop.background picture-uri file://{}" still returned Successfully updated wallpaper command., it didn't solve the above problem of using the wallpaper.

Yes it should have been setcmd. Okay run this:

systemctl --user disable dynwalls.timer
rm ~/.local/share/systemd/user/dynwalls.timer
rm ~/.local/share/systemd/user/dynwalls.service
rm -r ~/.local/share/dynwalls
systemctl --user daemon-reload

# in the dynwalls directory
git checkout master
python3 dynwalls setcmd "gsettings set org.gnome.desktop.background picture-uri file://{}"
python3 dynwalls use PATH_TO_HEIC
python3 dynwalls enable

Try to understand what these commands do before you use them.

Sorry for all the hassle, I think I will maybe run popos on a vm for testing and check whether this works.

Originally posted by @boi4 in #3 (comment)

I do understand what these do, and ran successfully, but trying to use my wallpaper, it's still:

File contains 2 images
Can't open /home/rinzler/-1.local/share/dynwalls/images/wallpaper.jpg: No such file or directory
could not write image
Can't open /home/rinzler/-2.local/share/dynwalls/images/wallpaper.jpg: No such file or directory
could not write image

I ran the command by @flohw python3 dynwalls setcmd 'gsettings set org.gnome.desktop.background picture-uri "file://{}" , but that doesn't fix the problem.

That was a terribly long winded explanation, but I wanted there to be as little confusion as possible, I can see that dynwalls is trying to use /home/rinzler/**-1.**local and /home/rinzler/**-2**.local instead of /home/rinzler/.local, but there's nothing on the internet, so I'm lost.

And as for journalctl --user -u dynwalls, well, there are no logs.

All my wallpaper are from Dynamic Wallpaper Club so they should work perfectly?

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.