Configuration

Central configuration values for Snooper’s monitoring, data retention, reporting, privacy, and pause behaviour.

App name for creating the root directory for storing log files and data base files

Log file config

Exported source
APP_NAME = "Snooper"
Exported source
LOG_FILENAME = "snooper.log"

Log file name. The absolute path for logging will be generated based on the platform.

Exported source
LOG_LEVEL = "WARNING"  # DEBUG, INFO, WARNING, ERROR

Log level for the application

Process monitoring config

Exported source
PROCESS_MONITORING_INTERVAL_SECONDS = 5

How often, in seconds, the process monitor checks for processes starting or stopping. A lower value detects changes sooner but uses slightly more CPU.

Exported source
EXCLUDED_PROCESSES = {'sudo','python'}

Process names that should be ignored by process monitoring. This prevents the app from recording its own helper processes or other unimportant background processes.

Database config

Exported source
DATABASE_FILENAME = "snooper.db"

File name for the SQLite database that stores sessions, foreground events, and process events. The absolute path for database will be generated based on the platform (windows/linux/macOS).

Exported source
DATA_RETENTION_DAYS = 7

Number of days to retain recorded data. Startup housekeeping should delete records older than this limit.

Fore-ground application monitoring config

Exported source
FG_APP_MONITORING_INTERVAL_SECONDS = 2

How often, in seconds, the foreground tracker samples the active window/application. Lower values give more accurate switch timing but create more polling work.

Exported source
FG_APP_MONITORING_MIN_IDLE_SECONDS = 60

Number of seconds without user input before normal foreground time is counted as idle rather than time spent in the active application.

Exported source
STREAMING_APP_MIN_IDLE_SECONDS = {'youtube': 600, 'netflix': 600, 'twitch': 600}

Per-streaming-app idle thresholds. These allow an app such as YouTube, Netflix, or Twitch to remain counted as active longer before being treated as idle—for example while the user watches a video without interacting.

Dashboard report config

Exported source
NUM_TOP_APP_IN_REPORT = 10

Maximum number of applications shown in the main “top apps” section of a session report.

Exported source
NUM_TOP_WINDOW_IN_REPORT = 5

Maximum number of window titles shown in the per-application title breakdown of a report.

Exported source
SHOW_WINDOW_TITLES = True

Whether reports may display recorded window titles. Turning this off is useful for stronger privacy, while still retaining per-application foreground-time statistics.

Tray Icon config

Exported source
DEFAULT_PAUSE_MINUTES = 30

Default length of a monitoring pause when the user chooses pause without providing a duration. After this period, monitoring should automatically resume in a new session.