pywal icon indicating copy to clipboard operation
pywal copied to clipboard

TODO

Open dylanaraps opened this issue 9 years ago • 8 comments

If anyone wants to contribute, feel free to tackle anything below.

  • [x] Args
    • [x] -a
    • [x] -f
    • [x] -n
    • [x] -o
    • [x] -q
      • ~~out() function needs to be re-added.~~
      • ~~A global variable may be needed to use the -q value globally.~~
    • [x] ~~-x~~ No longer needed. Imported schemes use all 16 colors.
  • [x] Optimization
    • [x] Look into running specific tasks in parallel.
      • [x] Sending sequences to all open terminals.
    • [x] Look into running specific tasks asynchronously.
      • [x] Wallpaper setting.
  • [x] Tests
    • [x] Write some tests.
      • Any help is appreciated as I've never done this before. :)
  • [x] Images
    • [x] ~~wal still calls imagemagick as a system command.~~ Nothing I can do about this.
      • [x] ~~Look into libraries to perform the same task.~~
    • [x] Picking a random image from a directory currently looks for all files instead of just images.
  • [x] Wallpaper
    • [x] Identify the desktop environment.
  • [x] Error Handling
    • [x] Check that the user has imagemagick installed.
  • [x] Other
    • [x] Add fold markers to blocks of functions like in the original script.
    • [x] Make wal.py a pip package eventually.
    • [x] Drop the _colors from file names.
      • They're redundant.

dylanaraps avatar Jun 16 '17 15:06 dylanaraps

I have a suggestion about your " Picking a random image from a directory currently looks for all files instead of just images." issue.

You could use tuples and check for the extensions of the loaded files in a directory, something like this:

extensions = ['.jpeg\n','.png\n','.jpeg','.png']
if <filename_here>.endswith(tuple(extensions)):
#(rest of your code)

I've used this method before and it works superb, I don't have the time to look through your code and implement it myself but this might be a good way to fix this issue.

stav121 avatar Jun 21 '17 13:06 stav121

That's already been implemented! The entire TODO list is almost complete minus tests and the pypi package. :)

https://github.com/dylanaraps/wal.py/blob/master/wal#L134

dylanaraps avatar Jun 21 '17 13:06 dylanaraps

Oh that seems fine to me, close to the one I suggested as well. I'll be sure to test it sometime soon and see the results.

stav121 avatar Jun 21 '17 13:06 stav121

Would you be interested in a pull request changing how pywal handle setuptools distribution?

I was thinking that changing wal from a python script to a module would make it easier to write tests later on.

danielx avatar Jun 25 '17 15:06 danielx

Sure!

I looked into this when I initially ported wal to python and I had some trouble. I then settled on a one file script as it was before.

On Mon, 26 Jun 2017 at 1:43 am, Daniel [email protected] wrote:

Would you be interested in a pull request changing how pywal handle setuptools distribution?

I was thinking that changing wal from a python script to a module would make it easier to write test later on.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dylanaraps/pywal/issues/1#issuecomment-310910132, or mute the thread https://github.com/notifications/unsubscribe-auth/AGfAa14Fi7NbUlHjwj2nRQQpZWmKGpQ8ks5sHoA0gaJpZM4N8ogg .

dylanaraps avatar Jun 25 '17 15:06 dylanaraps

Out of curiosity, why did you take out the -x argument? I was kinda curious since the full 16-color pallete was nice to have.

SethBarberee avatar Jun 28 '17 05:06 SethBarberee

The 16 colors generated by wal can't just be applied to colors 0-16 in the terminal. The colors 1-8 are almost always too dark or too low contrast compared to the background. The colors 9-15 are instead applied since they're full of highlights and brighter colors.

We finally hard-code color 8 based on the brightness of color 0 since none of the colors in 1-8 are consistently bright enough to act as a dark grey. They're either too light or too dark.

-x only really ever worked with -f and -f was removed as well so it was pointless keeping it around.

dylanaraps avatar Jun 28 '17 05:06 dylanaraps

Oh ok! That's a good enough reasoning for me. I noticed that it was removed was only curious. Thanks for the clarification!

Sent from my iPhone

On Jun 28, 2017, at 12:42 AM, Dylan Araps [email protected] wrote:

The 16 colors generated by wal can't just be applied to colors 0-16 in the terminal. The colors 1-8 are almost always too dark or too low contrast compared to the background. The colors 9-15 are instead applied since they're full of highlights and brighter colors.

We finally hard-code color 8 based on the brightness of color 0 since none of the colors in 1-8 are consistently bright enough to act as a dark grey. They're either too light or too dark.

-x only really ever worked with -f and -f was removed as well so it was pointless keeping it around.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

SethBarberee avatar Jun 28 '17 05:06 SethBarberee