dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.34k stars 325 forks source link

[Feature Request] Reload: anything and everything #556

Closed nilscript closed 3 years ago

nilscript commented 3 years ago

I have a build of dwm which can reload from .Xresources. Now I just need to trigger it from wal. It's a custom build with an unusual method of communicating with the main process. My suggest would be to run any reload scripts found in ~/.config/wal/reloa.d/?*.sh, which would help me detect when wal is running and it would help any other peoples update their custom systems and programs.

nilscript commented 3 years ago

A naive solution would look like this:

import glob, os

def anything():
    for file in glob.glob("~/.config/wal/reloa.d/?*.sh"):
        if os.access(file, os.X_OK):
            os.system("/bin/sh '" + file + "'")

anything()
dylanaraps commented 3 years ago

This can already be done via scripting. Simply create a wrapper that calls wal and do everything extra in the wrapper. Closing this issue. Thanks for opening it.