# Path: vise/constants.py
# DOWNLOADS_URL = 'vise:downloads'
# WELCOME_URL = 'vise:welcome'
# STATUS_BAR_HEIGHT = 24
# FOLLOW_LINK_KEY_MAP = {getattr(Qt.Key, 'Key_' + x.upper()): x for x in string.ascii_lowercase + string.digits}
# VISE_SCHEME = 'vise'
# def _get_cache_dir():
# def _get_config_dir():
# def get_windows_username():
# def local_socket_address():
# 
# Path: vise/resources.py
# def get_data_as_file(name):
#     return open(get_data_as_path(name), 'rb')


import os
from functools import lru_cache
from yaml import safe_load
from .constants import config_dir, hostname
from .resources import get_data_as_file
        if isinstance(val, int):
            sizes[ftype] = val

    for ftype, val in dff.items():
        if ftype not in sizes:
            val = get_ff(val)
            if isinstance(val, int):
                sizes[ftype] = val

    return sizes


@lru_cache()
def colors():
    uc = load_config(user=True).get('colors') or {}
    dc = load_config(user=False)['colors']
    ans = dc.copy()
    ans.update(uc)
    return ans


def color(key, default):
    ans = colors().get(key)
    if not ans or ans == 'default':
        ans = default
    return ans


@lru_cache()
def misc_config(key, default=None):

# Path: vise/constants.py
# DOWNLOADS_URL = 'vise:downloads'
# WELCOME_URL = 'vise:welcome'
# STATUS_BAR_HEIGHT = 24
# FOLLOW_LINK_KEY_MAP = {getattr(Qt.Key, 'Key_' + x.upper()): x for x in string.ascii_lowercase + string.digits}
# VISE_SCHEME = 'vise'
# def _get_cache_dir():
# def _get_config_dir():
# def get_windows_username():
# def local_socket_address():
# 
# Path: vise/resources.py
# def get_data_as_file(name):
#     return open(get_data_as_path(name), 'rb')


# Path: vise/config.py
import os
from functools import lru_cache
from yaml import safe_load
from .constants import config_dir, hostname
from .resources import get_data_as_file

        if isinstance(val, int):
            sizes[ftype] = val

    for ftype, val in dff.items():
        if ftype not in sizes:
            val = get_ff(val)
            if isinstance(val, int):
                sizes[ftype] = val

    return sizes


@lru_cache()
def colors():
    uc = load_config(user=True).get('colors') or {}
    dc = load_config(user=False)['colors']
    ans = dc.copy()
    ans.update(uc)
    return ans


def color(key, default):
    ans = colors().get(key)
    if not ans or ans == 'default':
        ans = default
    return ans


@lru_cache()
def misc_config(key, default=None):

    u = load_config(user=True).get(key) or load_config(user=False).get(key)