PredatorSense replacement for the Acer Predator Helios 16 (PH16-71) on Linux: - predatord: root service for profiles, fans (incl. temperature curves), keyboard RGB, lightbar and battery health; restores settings at boot and after resume, switches profiles on AC/battery changes - Qt desktop app with dashboard, fan curve editor and per-key RGB studio - Plasma 6 panel widget with quick controls - predatorctl command line tool - predator_wmi kernel module (DKMS) as a minimal WMI method bridge Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
80 lines
3.9 KiB
Python
80 lines
3.9 KiB
Python
"""Colours and the Qt style sheet (dark, PredatorSense-inspired)."""
|
|
|
|
BG = "#0a0e13"
|
|
SIDEBAR = "#0d1219"
|
|
SURFACE = "#121a24"
|
|
SURFACE2 = "#182230"
|
|
BORDER = "#223043"
|
|
TEXT = "#e6edf3"
|
|
MUTED = "#8593a6"
|
|
ACCENT = "#00d4ff"
|
|
ACCENT_DIM = "#0a6f8a"
|
|
WARN = "#ffb020"
|
|
DANGER = "#ff3b5c"
|
|
TRACK = "#1c2735"
|
|
GRID = "#1b2532"
|
|
KEY = "#151d28"
|
|
KEY_BORDER = "#2a3a50"
|
|
|
|
QSS = f"""
|
|
* {{ color: {TEXT}; font-size: 10pt; }}
|
|
QMainWindow, QWidget#root {{ background: {BG}; }}
|
|
QWidget#page {{ background: {BG}; }}
|
|
QScrollArea, QScrollArea > QWidget > QWidget {{ background: transparent; border: none; }}
|
|
QFrame#sidebar {{ background: {SIDEBAR}; border-right: 1px solid {BORDER}; }}
|
|
QLabel#brand {{ font-size: 15pt; font-weight: 700; color: {ACCENT}; letter-spacing: 2px; }}
|
|
QLabel#brandSub {{ color: {MUTED}; font-size: 8pt; letter-spacing: 3px; }}
|
|
QPushButton#nav {{
|
|
text-align: left; padding: 11px 16px; border: none; border-radius: 8px;
|
|
background: transparent; color: {MUTED}; font-size: 10.5pt;
|
|
}}
|
|
QPushButton#nav:hover {{ background: {SURFACE}; color: {TEXT}; }}
|
|
QPushButton#nav:checked {{ background: {SURFACE2}; color: {ACCENT}; border-left: 3px solid {ACCENT}; }}
|
|
QLabel#pageTitle {{ font-size: 18pt; font-weight: 700; }}
|
|
QLabel#pageSub {{ color: {MUTED}; }}
|
|
QFrame#card {{ background: {SURFACE}; border: 1px solid {BORDER}; border-radius: 14px; }}
|
|
QLabel#cardTitle {{ color: {MUTED}; font-size: 9pt; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }}
|
|
QLabel#big {{ font-size: 20pt; font-weight: 700; }}
|
|
QLabel#muted {{ color: {MUTED}; }}
|
|
QLabel#error {{ color: {DANGER}; }}
|
|
QPushButton {{
|
|
background: {SURFACE2}; border: 1px solid {BORDER}; border-radius: 8px; padding: 8px 14px;
|
|
}}
|
|
QPushButton:hover {{ border-color: {ACCENT_DIM}; }}
|
|
QPushButton:pressed {{ background: {BORDER}; }}
|
|
QPushButton:checked {{ background: {ACCENT_DIM}; border-color: {ACCENT}; color: white; }}
|
|
QPushButton:disabled {{ color: {MUTED}; }}
|
|
QPushButton#primary {{ background: {ACCENT}; color: #00131a; font-weight: 700; border: none; }}
|
|
QPushButton#primary:hover {{ background: #4de1ff; }}
|
|
QPushButton#profile, QPushButton#profileTurbo {{
|
|
padding: 16px 10px; border-radius: 12px; font-size: 11pt; font-weight: 600; min-width: 110px;
|
|
}}
|
|
QPushButton#profile:checked {{ background: {ACCENT_DIM}; border: 2px solid {ACCENT}; }}
|
|
QPushButton#profileTurbo:checked {{ background: #6b1022; border: 2px solid {DANGER}; }}
|
|
QPushButton#swatch {{ border-radius: 14px; border: 2px solid {BORDER}; padding: 0; }}
|
|
QPushButton#swatch:hover {{ border-color: {TEXT}; }}
|
|
QComboBox, QSpinBox {{
|
|
background: {SURFACE2}; border: 1px solid {BORDER}; border-radius: 8px; padding: 6px 10px; min-height: 20px;
|
|
}}
|
|
QComboBox QAbstractItemView {{ background: {SURFACE2}; selection-background-color: {ACCENT_DIM}; border: 1px solid {BORDER}; }}
|
|
QSlider::groove:horizontal {{ height: 6px; background: {TRACK}; border-radius: 3px; }}
|
|
QSlider::sub-page:horizontal {{ background: {ACCENT}; border-radius: 3px; }}
|
|
QSlider::handle:horizontal {{
|
|
background: {TEXT}; width: 16px; height: 16px; margin: -6px 0; border-radius: 8px;
|
|
}}
|
|
QCheckBox {{ spacing: 10px; }}
|
|
QCheckBox::indicator {{ width: 36px; height: 20px; border-radius: 10px; background: {TRACK}; border: 1px solid {BORDER}; }}
|
|
QCheckBox::indicator:checked {{ background: {ACCENT}; border-color: {ACCENT}; }}
|
|
QTabWidget::pane {{ border: none; }}
|
|
QTabBar::tab {{
|
|
background: transparent; color: {MUTED}; padding: 10px 18px; border: none;
|
|
border-bottom: 2px solid transparent; font-weight: 600;
|
|
}}
|
|
QTabBar::tab:selected {{ color: {ACCENT}; border-bottom: 2px solid {ACCENT}; }}
|
|
QListWidget {{ background: {SURFACE2}; border: 1px solid {BORDER}; border-radius: 8px; padding: 4px; }}
|
|
QListWidget::item {{ padding: 8px; border-radius: 6px; }}
|
|
QListWidget::item:selected {{ background: {ACCENT_DIM}; color: white; }}
|
|
QStatusBar {{ background: {SIDEBAR}; color: {MUTED}; border-top: 1px solid {BORDER}; }}
|
|
QToolTip {{ background: {SURFACE2}; color: {TEXT}; border: 1px solid {BORDER}; }}
|
|
"""
|