mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-26 12:31:32 +02:00
config: Added config file.
This commit is contained in:
parent
d5f39135b2
commit
e5781ed69a
@ -9,6 +9,7 @@
|
||||
Created by Dylan Araps.
|
||||
"""
|
||||
|
||||
import configparser
|
||||
import os
|
||||
import platform
|
||||
|
||||
@ -22,3 +23,6 @@ CACHE_DIR = os.path.join(HOME, ".cache", "wal")
|
||||
MODULE_DIR = os.path.dirname(__file__)
|
||||
CONF_DIR = os.path.join(HOME, ".config", "wal")
|
||||
OS = platform.uname()[0]
|
||||
|
||||
CONFIG = configparser.ConfigParser()
|
||||
CONFIG.read("/home/black/.config/wal/config.ini")
|
||||
|
@ -5,7 +5,7 @@ import shutil
|
||||
import subprocess
|
||||
import urllib.parse
|
||||
|
||||
from .settings import CACHE_DIR, HOME, OS
|
||||
from .settings import CACHE_DIR, HOME, OS, CONFIG
|
||||
from . import util
|
||||
|
||||
|
||||
@ -124,6 +124,10 @@ def change(img):
|
||||
if not os.path.isfile(img):
|
||||
return
|
||||
|
||||
if CONFIG.get("wallpaper", "setter"):
|
||||
util.disown([*CONFIG.get("wallpaper", "setter").split(), img])
|
||||
return
|
||||
|
||||
desktop = get_desktop_env()
|
||||
|
||||
if OS == "Darwin":
|
||||
|
Loading…
x
Reference in New Issue
Block a user