105 lines
6.2 KiB
QML
105 lines
6.2 KiB
QML
pragma Singleton
|
|
|
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
// User-facing knobs. Everything here is something you might reasonably want to
|
|
// change without understanding the rest of the shell.
|
|
//
|
|
// Theme.qml holds *how it looks*; this holds *what it does*.
|
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
|
|
import Quickshell
|
|
import QtQuick
|
|
|
|
Singleton {
|
|
id: root
|
|
|
|
// ── Clock ───────────────────────────────────────────────────────────────
|
|
// Carried over from GNOME: 12-hour, weekday + date shown, seconds on.
|
|
readonly property bool use24Hour: DesktopPreferences.use24Hour
|
|
readonly property bool showSeconds: DesktopPreferences.showSeconds
|
|
readonly property bool showWeekday: DesktopPreferences.showWeekday
|
|
|
|
// ── Weather ─────────────────────────────────────────────────────────────
|
|
// Coordinates taken from the GNOME night-light setting, which had already
|
|
// resolved the location. Uses Open-Meteo, which needs no API key.
|
|
readonly property real latitude: 27.7375
|
|
readonly property real longitude: -82.6861
|
|
// Open-Meteo returns coordinates but no friendly place name. Keep the
|
|
// label deliberately general rather than exposing precise coordinates in
|
|
// the UI or guessing at a city from them.
|
|
readonly property string weatherLocation: "Local weather"
|
|
readonly property string temperatureUnit: "fahrenheit"
|
|
readonly property int weatherRefreshMinutes: 20
|
|
|
|
// ── Vitals ──────────────────────────────────────────────────────────────
|
|
// The GNOME Vitals extension showed processor usage, memory usage and GPU
|
|
// usage, in that order. Same here.
|
|
readonly property int vitalsIntervalMs: 2000
|
|
readonly property bool showCpu: DesktopPreferences.showCpu
|
|
readonly property bool showMemory: DesktopPreferences.showMemory
|
|
readonly property bool showGpu: DesktopPreferences.showGpu
|
|
|
|
// amdgpu exposes utilisation here. Verified present on this machine; the
|
|
// widget hides itself if the path is missing rather than showing zeros.
|
|
readonly property string gpuBusyPath: "/sys/class/drm/card1/device/gpu_busy_percent"
|
|
|
|
// ── Night light ─────────────────────────────────────────────────────────
|
|
// Matches the (disabled) GNOME schedule: 3500K from 17:00 to 10:00.
|
|
readonly property int nightLightTemperature: DesktopPreferences.nightLightTemperature
|
|
readonly property real nightLightFrom: 17.0
|
|
readonly property real nightLightTo: 10.0
|
|
readonly property bool nightLightEnabledByDefault: DesktopPreferences.nightLightEnabled
|
|
|
|
// ── Notifications ───────────────────────────────────────────────────────
|
|
readonly property int notificationTimeoutMs: 5000
|
|
readonly property int notificationTimeoutCriticalMs: 0 // 0 = never auto-expire
|
|
readonly property int notificationHistoryLimit: 100
|
|
readonly property int maxVisibleToasts: 4
|
|
|
|
// ── Focus ──────────────────────────────────────────────────────────────
|
|
// One deliberate default rather than a preset picker: quick settings and
|
|
// the keyboard shortcut should start a useful session in one action.
|
|
readonly property int focusDurationMinutes: DesktopPreferences.focusDurationMinutes
|
|
|
|
// ── Dock ────────────────────────────────────────────────────────────────
|
|
// Pinned apps, in order, taken from the GNOME dash favourites.
|
|
readonly property list<string> dockPinned: [
|
|
"org.gnome.Settings",
|
|
"kitty",
|
|
"org.gnome.Nautilus",
|
|
"com.bitwarden.desktop",
|
|
"org.gnome.Software",
|
|
"helium",
|
|
"org.mozilla.thunderbird_esr",
|
|
"com.slack.Slack",
|
|
"app.bluebubbles.BlueBubbles",
|
|
"rustdesk",
|
|
"io.podman_desktop.PodmanDesktop",
|
|
"claude-desktop",
|
|
"codex-desktop",
|
|
"md.obsidian.Obsidian",
|
|
"com.obsproject.Studio",
|
|
"steam"
|
|
]
|
|
|
|
// Dash-to-Dock was set to intellihide against all windows: the dock hides
|
|
// when any window would overlap it, and comes back on hover.
|
|
readonly property bool dockAutohide: DesktopPreferences.dockAutohide
|
|
|
|
// 0: reveal the instant the pointer reaches the bottom edge. A reveal delay
|
|
// is indistinguishable from lag, because the user has already committed to
|
|
// the gesture by the time the strip is hit.
|
|
readonly property int dockRevealDelayMs: DesktopPreferences.dockRevealDelayMs
|
|
|
|
// Hiding keeps a delay, so brushing past the bottom edge or crossing the
|
|
// gap between two icons doesn't make the dock flicker.
|
|
readonly property int dockHideDelayMs: DesktopPreferences.dockHideDelayMs
|
|
|
|
// ── Capture ─────────────────────────────────────────────────────────────
|
|
readonly property string screenshotDir: "Pictures/Screenshots"
|
|
readonly property string recordingDir: "Videos/Recordings"
|
|
// Passed to wf-recorder. Uses VAAPI on the AMD card so recording does not
|
|
// cost CPU while gaming.
|
|
readonly property string recorderArgs: "-c h264_vaapi -d /dev/dri/renderD128"
|
|
}
|