feat: add settings window to fabric-cli and update docs

This commit is contained in:
sankalp committed 2026-07-19 10:37:12 +05:45
1 parent a7d4358cef
commit 96412dda47
8 files changed
+217 -141

No files matched your search

+3
View File
@@ -37,6 +37,7 @@ from window.notification.notification import ModusNoti
from window.osd.main import OSDWindow
from window.panel.main import Panel
from window.screencapture import ScreenCaptureWindow
from window.settings.main import get_settings_window
from window.spotlight.main import SpotlightWindow
from window.switcher import ApplicationSwitcher
@@ -78,6 +79,7 @@ def main():
dock = Dock()
osd = OSDWindow()
screencapture = ScreenCaptureWindow()
settings = get_settings_window()
# Monitor CSS files and subdirectories for changes
css_monitors = []
@@ -132,6 +134,7 @@ def main():
__main__.screencapture = screencapture
__main__.lock_screen = LockScreenWrapper()
__main__.switch_keyboard_layout = KeyboardLayout.switch_keyboard_layout
__main__.settings = settings
app.run()
+7 -1
View File
@@ -13,13 +13,19 @@ CONFIG_DIR = os.path.expanduser(f"~/.config/{APP_NAME}")
SYSTEM_CACHE_DIR = GLib.get_user_cache_dir()
_PROJECT_ROOT = str(__import__("pathlib").Path(__file__).resolve().parent.parent.parent)
def _get_wallpaper_path() -> str:
try:
from services.config import get_config
custom = get_config("wallpapers_dir")
if custom:
return os.path.expanduser(str(custom))
expanded = os.path.expanduser(str(custom))
if not os.path.isabs(expanded):
expanded = os.path.join(_PROJECT_ROOT, expanded)
return expanded
except Exception as e:
logger.warning(f"[data] Failed to load wallpapers_dir from config: {e}")
return f"{HOME_DIR}/Pictures/Wallpapers"
+2 -1
View File
@@ -26,7 +26,8 @@ DEFAULT = {
"switcher_live_preview": True,
"switcher_live_preview_delay_ms": 200,
"systray_ignore": ["blueman", "network"],
"wallpapers_dir": "~/Pictures/Wallpapers",
"wallpapers_dir": "src/assets/wallpaper_example/",
"osd": True,
"window_switcher": True,
"weather_location": "",
}