Closed yupyupp closed 8 years ago
I like how you throw "use_feh" from get_desktop_environment (). You can check if feh exists with this function so it doesn't fail on call ():
def has_program(program):
try:
subprocess.check_output (["which", "--", program])
return True
except subprocess.CalledProcessError:
return False
Stephen Haffner Computer Science and Engineering | The Ohio State University www.haffner.me (513) 969-6754 stephen@kd8zev.net
On February 5, 2016 1:46:44 PM EST, rbong notifications@github.com wrote:
I like how you throw "use_feh" from get_desktop_environment (). You can check if feh exists with this function so it doesn't fail on call ():
def has_program(program): try: subprocess.check_output (["which", "--", program]) return True except subprocess.CalledProcessError: return False
Reply to this email directly or view it on GitHub: https://github.com/boramalper/himawaripy/pull/28#issuecomment-180494700
Instead of putting the logic in get_desktop_environment(), I added another conditional branch to himawaripy.py, which checks if feh is installed if we couldn't detect the DE and then uses it. I think it's better to keep get_desktop_environment() for getting desktop environment instead of deciding what to do. :)
Yea. That makes way more sense. I was about to head to work when I made that change so I didn't think it through all the way.
On February 5, 2016 2:16:15 PM EST, "Bora M. Alper" notifications@github.com wrote:
Instead of putting the logic in get_desktop_environment(), I added another conditional branch to himawaripy.py, which checks if feh is installed if we couldn't detect the DE and then uses it. I think it's better to keep get_desktop_environment() for getting desktop environment instead of deciding what to do. :)
Reply to this email directly or view it on GitHub: https://github.com/boramalper/himawaripy/pull/28#issuecomment-180507186
No problem. Thanks a lot!
I added support for systems without DMs (ie WMs like DWM/Awesome/i3). If all other conditions fail I assume that we are running a simple WM and use feh to set the wallpaper. It also does not require any additional flags to be set.
Also, you should consider tossing a license in your repo when you get around to it (MIT might be a good choice). :)