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.
|
Created by Dylan Araps.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import configparser
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
@ -22,3 +23,6 @@ CACHE_DIR = os.path.join(HOME, ".cache", "wal")
|
|||||||
MODULE_DIR = os.path.dirname(__file__)
|
MODULE_DIR = os.path.dirname(__file__)
|
||||||
CONF_DIR = os.path.join(HOME, ".config", "wal")
|
CONF_DIR = os.path.join(HOME, ".config", "wal")
|
||||||
OS = platform.uname()[0]
|
OS = platform.uname()[0]
|
||||||
|
|
||||||
|
CONFIG = configparser.ConfigParser()
|
||||||
|
CONFIG.read("/home/black/.config/wal/config.ini")
|
||||||
|
@ -5,7 +5,7 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
|
||||||
from .settings import CACHE_DIR, HOME, OS
|
from .settings import CACHE_DIR, HOME, OS, CONFIG
|
||||||
from . import util
|
from . import util
|
||||||
|
|
||||||
|
|
||||||
@ -124,6 +124,10 @@ def change(img):
|
|||||||
if not os.path.isfile(img):
|
if not os.path.isfile(img):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if CONFIG.get("wallpaper", "setter"):
|
||||||
|
util.disown([*CONFIG.get("wallpaper", "setter").split(), img])
|
||||||
|
return
|
||||||
|
|
||||||
desktop = get_desktop_env()
|
desktop = get_desktop_env()
|
||||||
|
|
||||||
if OS == "Darwin":
|
if OS == "Darwin":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user