Skip to content

Commit

Permalink
feat!: follow XDG base directories (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
linkfrg authored Feb 11, 2025
1 parent 0f216ca commit ba9fc68
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ body:
label: Additional Information
description: |
Anything that can help (Logs, Images, Videos, Configs, etc.). Please avoid pasting large text directly.
Logs can be found at `~/.ignis/ignis.log`.
Logs can be found at `$XDG_STATE_HOME/ignis/ignis.log` (`~/.local/state/ignis/ignis.log`).
3 changes: 2 additions & 1 deletion ignis/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
from ignis.utils import Utils
from ignis.exceptions import WindowNotFoundError
from typing import Any
from gi.repository import GLib # type: ignore

DEFAULT_CONFIG_PATH = "~/.config/ignis/config.py"
DEFAULT_CONFIG_PATH = f"{GLib.get_user_config_dir()}/ignis/config.py"


class OrderedGroup(click.Group):
Expand Down
3 changes: 1 addition & 2 deletions ignis/logging.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import os
import sys
from loguru import logger
from gi.repository import GLib # type: ignore

LOG_DIR = os.path.expanduser("~/.ignis")
LOG_DIR = f"{GLib.get_user_state_dir()}/ignis"
LOG_FILE = f"{LOG_DIR}/ignis.log"
LOG_FORMAT = "{time:YYYY-MM-DD HH:mm:ss} [<level>{level}</level>] {message}"

Expand Down

0 comments on commit ba9fc68

Please sign in to comment.