2026-06-11 10:00:02 +01:00
|
|
|
|
# settings/quickshell.nix — Quickshell desktop shell (bar, notifications, QML),
|
|
|
|
|
|
# split out of settings/hyprland.nix. The hyprland-side blur layer rule for
|
|
|
|
|
|
# the "quickshell-bar" namespace still lives there.
|
|
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
let
|
|
|
|
|
|
isMacbook = config.networking.hostName == "FredOS-Macbook";
|
|
|
|
|
|
in
|
|
|
|
|
|
{
|
|
|
|
|
|
config = lib.mkIf (lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ]) {
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
|
quickshell
|
|
|
|
|
|
qt6.qt5compat # Qt5Compat.GraphicalEffects in Bar.qml
|
|
|
|
|
|
];
|
|
|
|
|
|
|
2026-06-12 14:06:20 +01:00
|
|
|
|
# Icon font for the shell (ligature-based: text "volume_up" renders the
|
|
|
|
|
|
# icon) — same font caelestia uses; nerd-font glyphs stay for terminals.
|
|
|
|
|
|
fonts.packages = [ pkgs.material-symbols ];
|
|
|
|
|
|
|
2026-06-11 11:03:24 +01:00
|
|
|
|
home-manager.users.fred = { config, lib, pkgs, osConfig, ... }:
|
2026-06-11 10:00:02 +01:00
|
|
|
|
let
|
|
|
|
|
|
c = config.lib.stylix.colors;
|
|
|
|
|
|
in {
|
|
|
|
|
|
systemd.user.services.quickshell = {
|
|
|
|
|
|
Unit = {
|
|
|
|
|
|
Description = "Quickshell desktop shell";
|
|
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
|
|
After = [ "graphical-session.target" ];
|
|
|
|
|
|
};
|
|
|
|
|
|
Service = {
|
|
|
|
|
|
ExecStart = "${pkgs.quickshell}/bin/qs";
|
|
|
|
|
|
Restart = "always";
|
|
|
|
|
|
RestartSec = 2;
|
|
|
|
|
|
};
|
|
|
|
|
|
Install.WantedBy = [ "hyprland-session.target" ];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
xdg.configFile = let
|
2026-06-11 14:49:07 +01:00
|
|
|
|
# Soft-reload quickshell in place: the process (and its DBus services —
|
|
|
|
|
|
# tray host, notification daemon) stays alive, so Electron apps with
|
|
|
|
|
|
# tray icons (vesktop) don't crash like they do on a hard restart.
|
|
|
|
|
|
# Falls back to a unit restart if the IPC socket isn't up.
|
2026-06-11 10:00:02 +01:00
|
|
|
|
qsRestart = ''
|
2026-06-11 14:49:07 +01:00
|
|
|
|
${pkgs.quickshell}/bin/qs ipc call shell reload 2>/dev/null || ${pkgs.systemd}/bin/systemctl --user restart quickshell.service 2>/dev/null || true
|
2026-06-11 10:00:02 +01:00
|
|
|
|
'';
|
|
|
|
|
|
wifiConnectScript = pkgs.writeShellScript "wifi-connect" ''
|
|
|
|
|
|
ssid="$1"
|
|
|
|
|
|
${pkgs.networkmanager}/bin/nmcli device wifi connect "$ssid" 2>/dev/null && exit 0
|
|
|
|
|
|
pw=$(${pkgs.zenity}/bin/zenity --password --title="WiFi Password" 2>/dev/null)
|
|
|
|
|
|
[ -n "$pw" ] && ${pkgs.networkmanager}/bin/nmcli device wifi connect "$ssid" password "$pw"
|
|
|
|
|
|
'';
|
|
|
|
|
|
nmcli = "${pkgs.networkmanager}/bin/nmcli";
|
2026-06-11 11:03:24 +01:00
|
|
|
|
# Follow stylix's monospace choice so a font swap propagates to the bar
|
|
|
|
|
|
monoFont = osConfig.stylix.fonts.monospace.name;
|
2026-06-12 09:58:35 +01:00
|
|
|
|
# Shell chrome fragment shader: the bar, screen frame, dropdown panel
|
|
|
|
|
|
# and toast are one signed-distance field merged with a circular
|
|
|
|
|
|
# smooth-min (caelestia-style liquid junctions); the 2px border is the
|
|
|
|
|
|
# distance band just inside the surface, so it follows every fillet.
|
|
|
|
|
|
# Qt 6 requires shaders precompiled to .qsb — done here at build time.
|
|
|
|
|
|
chromeFragSrc = pkgs.writeText "shell-chrome.frag" ''
|
|
|
|
|
|
#version 440
|
|
|
|
|
|
|
|
|
|
|
|
layout(location = 0) in vec2 qt_TexCoord0;
|
|
|
|
|
|
layout(location = 0) out vec4 fragColor;
|
|
|
|
|
|
|
|
|
|
|
|
layout(std140, binding = 0) uniform buf {
|
|
|
|
|
|
mat4 qt_Matrix;
|
|
|
|
|
|
float qt_Opacity;
|
|
|
|
|
|
vec4 cutout; // cx, cy, hw, hh — rounded inner screen cutout
|
|
|
|
|
|
vec4 panel; // cx, cy, hw, hh — dropdown panel (hw <= 0: none)
|
|
|
|
|
|
vec4 toast; // cx, cy, hw, hh — toast (hw <= 0: none)
|
2026-06-12 14:06:20 +01:00
|
|
|
|
vec4 session; // cx, cy, hw, hh — session menu (hw <= 0: none)
|
2026-06-12 19:45:03 +01:00
|
|
|
|
vec4 launcher; // cx, cy, hw, hh — bottom launcher (hw <= 0: none)
|
2026-06-12 09:58:35 +01:00
|
|
|
|
vec4 fillColor; // straight (non-premultiplied) rgba
|
|
|
|
|
|
vec4 borderColor;
|
|
|
|
|
|
vec2 res;
|
|
|
|
|
|
float cutoutR;
|
|
|
|
|
|
float panelR;
|
|
|
|
|
|
float meltK;
|
|
|
|
|
|
float borderW;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
float sdRoundedBox(vec2 p, vec2 center, vec2 halfSize, float r) {
|
|
|
|
|
|
vec2 d = abs(p - center) - halfSize + vec2(r);
|
|
|
|
|
|
return length(max(d, vec2(0.0))) + min(max(d.x, d.y), 0.0) - r;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Circular smooth min: the blend fillet is a true circular arc of
|
|
|
|
|
|
// radius k tangent to both surfaces.
|
|
|
|
|
|
float smin(float a, float b, float k) {
|
|
|
|
|
|
return max(k, min(a, b)) - length(max(vec2(k) - vec2(a, b), vec2(0.0)));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec2 p = qt_TexCoord0 * res;
|
|
|
|
|
|
|
|
|
|
|
|
// Shell = bar band + frame band = everything outside the cutout
|
|
|
|
|
|
float d = -sdRoundedBox(p, cutout.xy, cutout.zw, cutoutR);
|
|
|
|
|
|
|
|
|
|
|
|
if (panel.z > 0.5)
|
|
|
|
|
|
d = smin(d, sdRoundedBox(p, panel.xy, panel.zw, panelR), meltK);
|
|
|
|
|
|
if (toast.z > 0.5)
|
|
|
|
|
|
d = smin(d, sdRoundedBox(p, toast.xy, toast.zw, panelR), meltK);
|
2026-06-12 14:06:20 +01:00
|
|
|
|
if (session.z > 0.5)
|
|
|
|
|
|
d = smin(d, sdRoundedBox(p, session.xy, session.zw, panelR), meltK);
|
2026-06-12 19:45:03 +01:00
|
|
|
|
if (launcher.z > 0.5)
|
|
|
|
|
|
d = smin(d, sdRoundedBox(p, launcher.xy, launcher.zw, panelR), meltK);
|
2026-06-12 09:58:35 +01:00
|
|
|
|
|
|
|
|
|
|
float fw = fwidth(d);
|
|
|
|
|
|
// 1 inside the union, 0 outside (antialiased)
|
|
|
|
|
|
float edge = 1.0 - smoothstep(-fw, fw, d);
|
|
|
|
|
|
// 1 deeper than the border band, 0 within it
|
|
|
|
|
|
float inner = 1.0 - smoothstep(-borderW - fw, -borderW + fw, d);
|
|
|
|
|
|
|
|
|
|
|
|
vec4 c = mix(borderColor, fillColor, inner);
|
|
|
|
|
|
fragColor = vec4(c.rgb * c.a, c.a) * edge * qt_Opacity;
|
|
|
|
|
|
}
|
|
|
|
|
|
'';
|
|
|
|
|
|
chromeShader = pkgs.runCommand "shell-chrome.frag.qsb" {
|
|
|
|
|
|
nativeBuildInputs = [ pkgs.qt6.qtshadertools ];
|
|
|
|
|
|
} ''
|
|
|
|
|
|
qsb --glsl "300 es,330" --hlsl 50 --msl 12 -o $out ${chromeFragSrc}
|
|
|
|
|
|
'';
|
2026-06-11 11:23:28 +01:00
|
|
|
|
# 7-day forecast JSON from Open-Meteo (no API key). Location is
|
|
|
|
|
|
# auto-detected by IP via ipinfo.io, falling back to London.
|
|
|
|
|
|
weatherFetchScript = pkgs.writeShellScript "weather-fetch" ''
|
|
|
|
|
|
loc=$(${pkgs.curl}/bin/curl -sf --max-time 5 https://ipinfo.io/loc 2>/dev/null || true)
|
|
|
|
|
|
case "$loc" in
|
|
|
|
|
|
*,*) lat=''${loc%,*}; lon=''${loc#*,} ;;
|
|
|
|
|
|
*) lat=51.51; lon=-0.13 ;;
|
|
|
|
|
|
esac
|
2026-07-08 13:26:08 +01:00
|
|
|
|
${pkgs.curl}/bin/curl -sf --max-time 10 "https://api.open-meteo.com/v1/forecast?latitude=$lat&longitude=$lon&daily=weather_code,temperature_2m_max,temperature_2m_min,sunrise,sunset&timezone=auto&forecast_days=7"
|
2026-06-11 11:23:28 +01:00
|
|
|
|
'';
|
2026-06-11 10:00:02 +01:00
|
|
|
|
in {
|
|
|
|
|
|
"quickshell/qmldir" = {
|
|
|
|
|
|
onChange = qsRestart;
|
|
|
|
|
|
text = ''
|
|
|
|
|
|
singleton Theme 1.0 Theme.qml
|
|
|
|
|
|
singleton Commands 1.0 Commands.qml
|
|
|
|
|
|
Bar 1.0 Bar.qml
|
2026-07-08 11:04:27 +01:00
|
|
|
|
Lock 1.0 Lock.qml
|
2026-06-11 10:00:02 +01:00
|
|
|
|
'';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
"quickshell/Theme.qml" = {
|
|
|
|
|
|
onChange = qsRestart;
|
|
|
|
|
|
text = ''
|
|
|
|
|
|
pragma Singleton
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
|
|
readonly property color base00: "#${c.base00}"
|
|
|
|
|
|
readonly property color base01: "#${c.base01}"
|
|
|
|
|
|
readonly property color base02: "#${c.base02}"
|
|
|
|
|
|
readonly property color base03: "#${c.base03}"
|
|
|
|
|
|
readonly property color base04: "#${c.base04}"
|
|
|
|
|
|
readonly property color base05: "#${c.base05}"
|
|
|
|
|
|
readonly property color base08: "#${c.base08}"
|
2026-07-08 13:26:08 +01:00
|
|
|
|
readonly property color base09: "#${c.base09}"
|
2026-06-11 10:00:02 +01:00
|
|
|
|
readonly property color base0A: "#${c.base0A}"
|
|
|
|
|
|
readonly property color base0B: "#${c.base0B}"
|
|
|
|
|
|
readonly property color base0C: "#${c.base0C}"
|
|
|
|
|
|
readonly property color base0D: "#${c.base0D}"
|
|
|
|
|
|
readonly property color barBg: "#B3${c.base00}"
|
2026-06-17 11:30:13 +01:00
|
|
|
|
// Card surfaces are translucent so the compositor's bar-layer
|
|
|
|
|
|
// blur shows through — a lessened blur over the panel tint.
|
|
|
|
|
|
readonly property color cardBg: "#CC${c.base01}"
|
2026-06-17 12:52:52 +01:00
|
|
|
|
// Transparent base02: hover highlights fade to/from this so the
|
|
|
|
|
|
// colour animation stays in-hue instead of dipping through
|
|
|
|
|
|
// transparent *black* (which reads as an extra flash colour).
|
|
|
|
|
|
readonly property color base02t: "#00${c.base02}"
|
2026-06-11 11:03:24 +01:00
|
|
|
|
readonly property string fontFamily: "${monoFont}"
|
2026-06-12 14:06:20 +01:00
|
|
|
|
// Ligature-based icon font: text "volume_up" renders the icon
|
|
|
|
|
|
readonly property string iconFont: "Material Symbols Rounded"
|
2026-06-11 14:57:04 +01:00
|
|
|
|
// Matches hyprland general.border_size (col.inactive_border = base03)
|
|
|
|
|
|
readonly property int borderWidth: 2
|
2026-06-11 20:10:37 +01:00
|
|
|
|
// Screen frame band; sits inside hyprland's gaps_out (12)
|
|
|
|
|
|
readonly property int frameWidth: 6
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
|
|
|
|
|
|
// ── Layout / metric tokens (referenced, not hardcoded) ──
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Bar band thickness. The bar is a VERTICAL column on the left
|
|
|
|
|
|
// edge, so this is its width: it drives widget cell widths, the
|
|
|
|
|
|
// dropdown x-origin and the shader cutout geometry — change
|
|
|
|
|
|
// here, not in ~15 places. Wide enough for the stacked HH/mm
|
|
|
|
|
|
// clock, which is what sets the floor.
|
|
|
|
|
|
readonly property int barWidth: 46
|
|
|
|
|
|
readonly property int radius: 16 // cards, panels, dropdowns
|
|
|
|
|
|
readonly property int radiusSmall: 12 // workspace dots, pill buttons
|
|
|
|
|
|
readonly property int radiusTiny: 8 // hover rows, action chips
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
readonly property int cardPad: 8 // card inner padding (inset = 2×)
|
2026-07-08 14:05:05 +01:00
|
|
|
|
readonly property int panelGap: 8 // gap between panel border and cards (all dropdowns/menus/toast)
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
|
|
|
|
|
|
// ── Animation duration tokens (ms) ──
|
|
|
|
|
|
readonly property int animMorph: 280 // panel grow / slide (OutExpo)
|
|
|
|
|
|
readonly property int animContent: 200 // content fade / highlight move
|
|
|
|
|
|
readonly property int animFade: 120 // hover colour transitions
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-07-08 11:04:27 +01:00
|
|
|
|
"quickshell/Lock.qml" = {
|
|
|
|
|
|
onChange = qsRestart;
|
|
|
|
|
|
text = ''
|
|
|
|
|
|
import Quickshell
|
2026-07-08 17:03:26 +01:00
|
|
|
|
import Quickshell.Io
|
2026-07-08 11:04:27 +01:00
|
|
|
|
import Quickshell.Wayland
|
|
|
|
|
|
import Quickshell.Services.Pam
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
|
import Qt5Compat.GraphicalEffects
|
|
|
|
|
|
|
2026-07-08 12:09:52 +01:00
|
|
|
|
// ext-session-lock screen, replacing hyprlock. Set `locked: true`
|
|
|
|
|
|
// and the compositor hands every screen to a LockSurface below
|
|
|
|
|
|
// until PAM says otherwise.
|
|
|
|
|
|
//
|
|
|
|
|
|
// PAM and state live in a Scope OUTSIDE WlSessionLock: its default
|
|
|
|
|
|
// property is the surface *component*, so a PamContext declared
|
|
|
|
|
|
// inside it is never instantiated — `pam` didn't resolve and
|
|
|
|
|
|
// submit() threw, which is why enter/the arrow did nothing.
|
|
|
|
|
|
Scope {
|
|
|
|
|
|
id: root
|
2026-07-08 11:04:27 +01:00
|
|
|
|
|
2026-07-08 12:09:52 +01:00
|
|
|
|
property alias locked: lock.locked
|
2026-07-08 11:04:27 +01:00
|
|
|
|
property string password: ""
|
|
|
|
|
|
property bool failed: false
|
|
|
|
|
|
|
|
|
|
|
|
function submit(pw) {
|
|
|
|
|
|
if (pam.active || pw === "") return;
|
|
|
|
|
|
failed = false;
|
|
|
|
|
|
password = pw;
|
|
|
|
|
|
pam.start();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-08 17:03:26 +01:00
|
|
|
|
// greetd autologs us in, so lock as soon as the shell comes up:
|
|
|
|
|
|
// the lockscreen is the login prompt. mkdir is the atomic
|
|
|
|
|
|
// once-per-session test — XDG_RUNTIME_DIR dies with the
|
|
|
|
|
|
// session, so quickshell restarts (rebuilds) don't re-lock.
|
|
|
|
|
|
Process {
|
|
|
|
|
|
running: true
|
|
|
|
|
|
command: ["mkdir", Quickshell.env("XDG_RUNTIME_DIR") + "/qs-boot-lock"]
|
|
|
|
|
|
onExited: code => { if (code === 0) lock.locked = true; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-08 11:04:27 +01:00
|
|
|
|
PamContext {
|
|
|
|
|
|
id: pam
|
|
|
|
|
|
// NixOS ships a "login" pam service; pam_unix verifies the
|
|
|
|
|
|
// user's own password via the unix_chkpwd setuid wrapper.
|
|
|
|
|
|
config: "login"
|
|
|
|
|
|
onPamMessage: {
|
2026-07-08 12:09:52 +01:00
|
|
|
|
if (this.responseRequired) this.respond(root.password);
|
2026-07-08 11:04:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
onCompleted: result => {
|
2026-07-08 12:09:52 +01:00
|
|
|
|
root.password = "";
|
2026-07-08 11:04:27 +01:00
|
|
|
|
if (result === PamResult.Success) lock.locked = false;
|
2026-07-08 12:09:52 +01:00
|
|
|
|
else root.failed = true;
|
2026-07-08 11:04:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-08 12:09:52 +01:00
|
|
|
|
WlSessionLock {
|
|
|
|
|
|
id: lock
|
|
|
|
|
|
|
2026-07-08 11:04:27 +01:00
|
|
|
|
WlSessionLockSurface {
|
|
|
|
|
|
id: surface
|
|
|
|
|
|
color: "black"
|
|
|
|
|
|
|
|
|
|
|
|
Image {
|
|
|
|
|
|
id: wall
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
source: "file://" + Quickshell.env("HOME") + "/.local/share/backgrounds/wallpaper.png"
|
2026-07-27 12:59:16 +01:00
|
|
|
|
// cache:false — soft reload (qs ipc reload) keeps the process
|
|
|
|
|
|
// alive, and the QML pixmap cache is keyed by URL, so a new
|
|
|
|
|
|
// wallpaper behind the same path never shows without this.
|
|
|
|
|
|
cache: false
|
2026-07-08 11:04:27 +01:00
|
|
|
|
fillMode: Image.PreserveAspectCrop
|
|
|
|
|
|
visible: false
|
|
|
|
|
|
}
|
|
|
|
|
|
FastBlur {
|
|
|
|
|
|
anchors.fill: wall
|
|
|
|
|
|
source: wall
|
|
|
|
|
|
radius: 48
|
|
|
|
|
|
}
|
|
|
|
|
|
Rectangle { anchors.fill: parent; color: "black"; opacity: 0.4 }
|
|
|
|
|
|
|
|
|
|
|
|
SystemClock {
|
|
|
|
|
|
id: lockClock
|
|
|
|
|
|
precision: SystemClock.Minutes
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
anchors.verticalCenterOffset: -60
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
|
|
|
|
|
|
Text {
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: lockClock.date.toLocaleTimeString(Qt.locale(), "HH:mm")
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.family: Theme.fontFamily
|
|
|
|
|
|
font.pixelSize: 72
|
|
|
|
|
|
font.weight: Font.Medium
|
|
|
|
|
|
}
|
|
|
|
|
|
Text {
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: lockClock.date.toLocaleDateString(Qt.locale(), "dddd, d MMMM")
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.family: Theme.fontFamily
|
|
|
|
|
|
font.pixelSize: 16
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Item { width: 1; height: 32 }
|
|
|
|
|
|
|
|
|
|
|
|
// Password pill: dots for typed chars; border tracks
|
|
|
|
|
|
// state (accent while checking, red on failure).
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
width: 280
|
|
|
|
|
|
height: 44
|
|
|
|
|
|
radius: Theme.radius
|
|
|
|
|
|
color: Theme.cardBg
|
|
|
|
|
|
border.width: Theme.borderWidth
|
|
|
|
|
|
border.color: pam.active ? Theme.base0D
|
2026-07-08 12:09:52 +01:00
|
|
|
|
: root.failed ? Theme.base08
|
2026-07-08 11:04:27 +01:00
|
|
|
|
: Theme.base03
|
|
|
|
|
|
Behavior on border.color { ColorAnimation { duration: Theme.animFade } }
|
|
|
|
|
|
|
|
|
|
|
|
Row {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
Repeater {
|
|
|
|
|
|
model: Math.min(pwInput.text.length, 24)
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
width: 8; height: 8; radius: 4
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Text {
|
|
|
|
|
|
anchors.centerIn: parent
|
2026-07-08 12:09:52 +01:00
|
|
|
|
visible: pwInput.text === "" && root.failed
|
2026-07-08 11:04:27 +01:00
|
|
|
|
text: "wrong password"
|
|
|
|
|
|
color: Theme.base08
|
|
|
|
|
|
font.family: Theme.fontFamily
|
|
|
|
|
|
font.pixelSize: 13
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TextInput {
|
|
|
|
|
|
id: pwInput
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
opacity: 0
|
|
|
|
|
|
enabled: !pam.active
|
|
|
|
|
|
echoMode: TextInput.Password
|
|
|
|
|
|
focus: true
|
2026-07-08 11:20:23 +01:00
|
|
|
|
function go() {
|
2026-07-08 12:09:52 +01:00
|
|
|
|
root.submit(text);
|
2026-07-08 11:04:27 +01:00
|
|
|
|
text = "";
|
|
|
|
|
|
}
|
2026-07-08 11:20:23 +01:00
|
|
|
|
// Explicit key handlers: accepted() doesn't
|
|
|
|
|
|
// fire reliably on the lock surface.
|
|
|
|
|
|
Keys.onReturnPressed: go()
|
|
|
|
|
|
Keys.onEnterPressed: go()
|
|
|
|
|
|
onAccepted: go()
|
2026-07-08 11:04:27 +01:00
|
|
|
|
Keys.onEscapePressed: text = ""
|
|
|
|
|
|
}
|
2026-07-08 11:20:23 +01:00
|
|
|
|
|
|
|
|
|
|
// Visible confirm button (after TextInput: on top)
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
anchors.rightMargin: 6
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
width: 32; height: 32; radius: 16
|
|
|
|
|
|
color: confirmMa.containsMouse ? Theme.base02 : "transparent"
|
|
|
|
|
|
Behavior on color { ColorAnimation { duration: Theme.animFade } }
|
|
|
|
|
|
visible: pwInput.text.length > 0
|
|
|
|
|
|
|
|
|
|
|
|
Text {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
text: "arrow_forward"
|
|
|
|
|
|
font.family: Theme.iconFont
|
|
|
|
|
|
font.pixelSize: 18
|
|
|
|
|
|
color: Theme.base0D
|
|
|
|
|
|
}
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
id: confirmMa
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: pwInput.go()
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-07-08 11:04:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Component.onCompleted: pwInput.forceActiveFocus()
|
|
|
|
|
|
}
|
2026-07-08 12:09:52 +01:00
|
|
|
|
}
|
2026-07-08 11:04:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-06-11 10:00:02 +01:00
|
|
|
|
"quickshell/Commands.qml" = {
|
|
|
|
|
|
onChange = qsRestart;
|
|
|
|
|
|
text = ''
|
|
|
|
|
|
pragma Singleton
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
|
|
readonly property string nmcli: "${nmcli}"
|
|
|
|
|
|
readonly property string wifiConnect: "${wifiConnectScript}"
|
|
|
|
|
|
readonly property string notifSound: "${pkgs.libcanberra-gtk3}/bin/canberra-gtk-play"
|
2026-06-11 10:47:20 +01:00
|
|
|
|
readonly property string systemctl: "${pkgs.systemd}/bin/systemctl"
|
2026-06-11 11:23:28 +01:00
|
|
|
|
readonly property string weatherFetch: "${weatherFetchScript}"
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Recoloured to the theme accent at draw time (ColorOverlay),
|
|
|
|
|
|
// so the stock blue/grey snowflake artwork is fine here.
|
|
|
|
|
|
readonly property string nixLogo: "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
"quickshell/shell.qml" = {
|
|
|
|
|
|
onChange = qsRestart;
|
|
|
|
|
|
text = ''
|
|
|
|
|
|
//@ pragma UseQApplication
|
|
|
|
|
|
import Quickshell
|
2026-06-11 10:47:20 +01:00
|
|
|
|
import Quickshell.Io
|
2026-07-08 10:13:14 +01:00
|
|
|
|
import Quickshell.Wayland
|
2026-06-11 10:00:02 +01:00
|
|
|
|
import Quickshell.Services.Notifications
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
|
|
|
|
|
|
|
ShellRoot {
|
|
|
|
|
|
id: root
|
|
|
|
|
|
property var latestNotification: null
|
2026-06-12 14:06:20 +01:00
|
|
|
|
property var mainBar: null
|
2026-06-11 10:00:02 +01:00
|
|
|
|
signal notificationReceived()
|
|
|
|
|
|
|
2026-06-12 19:45:03 +01:00
|
|
|
|
// Bound in hyprland.nix: Super+R → launcher (bottom of the
|
|
|
|
|
|
// bar window), Super+L → session menu (right edge).
|
2026-06-11 10:47:20 +01:00
|
|
|
|
IpcHandler {
|
|
|
|
|
|
target: "launcher"
|
2026-06-12 19:45:03 +01:00
|
|
|
|
function toggle(): void { if (root.mainBar) root.mainBar.toggleLauncher(); }
|
2026-06-12 14:06:20 +01:00
|
|
|
|
function powermenu(): void { if (root.mainBar) root.mainBar.toggleSession(); }
|
2026-06-11 10:47:20 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 14:49:07 +01:00
|
|
|
|
// Soft reload, used by the nix onChange hook — keeps the
|
|
|
|
|
|
// process and its DBus services (tray host) alive.
|
|
|
|
|
|
IpcHandler {
|
|
|
|
|
|
target: "shell"
|
|
|
|
|
|
function reload(): void { Quickshell.reload(false); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-08 11:04:27 +01:00
|
|
|
|
// Session lock (replaces hyprlock). `qs ipc call lock lock`
|
|
|
|
|
|
// from hypridle / loginctl lock-session; the session menu
|
|
|
|
|
|
// calls root.lock() directly. Idempotent while locked.
|
|
|
|
|
|
Lock { id: lockScreen }
|
|
|
|
|
|
function lock() { lockScreen.locked = true; }
|
|
|
|
|
|
IpcHandler {
|
|
|
|
|
|
target: "lock"
|
|
|
|
|
|
function lock(): void { root.lock(); }
|
2026-07-08 12:09:52 +01:00
|
|
|
|
// Escape hatch from a VT: qs ipc call lock unlock
|
|
|
|
|
|
function unlock(): void { lockScreen.locked = false; }
|
2026-07-08 11:04:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-17 14:19:10 +01:00
|
|
|
|
// Screenshot pin: the Shift+Super+S keybind brackets hyprshot
|
|
|
|
|
|
// with pin/unpin so the focus grab is suspended while slurp
|
|
|
|
|
|
// grabs input — otherwise the open menu would close like any
|
|
|
|
|
|
// click-outside. Self-heals via a watchdog if unpin is missed.
|
|
|
|
|
|
IpcHandler {
|
|
|
|
|
|
target: "screenshot"
|
|
|
|
|
|
function pin(): void { if (root.mainBar) root.mainBar.setScreenshotPin(true); }
|
|
|
|
|
|
function unpin(): void { if (root.mainBar) root.mainBar.setScreenshotPin(false); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 12:35:44 +01:00
|
|
|
|
// ── OSD brightness (replaces swayosd). Volume needs nothing
|
|
|
|
|
|
// here — the bar watches Pipewire directly. Backlight has no
|
|
|
|
|
|
// watchable change event, so the keybind routes through here:
|
|
|
|
|
|
// brightnessctl -m prints the resulting level, which becomes
|
|
|
|
|
|
// the OSD value. Bars pick this up on the focused monitor.
|
|
|
|
|
|
signal osdBrightness(string icon, real value)
|
|
|
|
|
|
|
|
|
|
|
|
Process {
|
|
|
|
|
|
id: brightProc
|
|
|
|
|
|
property string osdIcon: "brightness_6"
|
|
|
|
|
|
stdout: StdioCollector {
|
|
|
|
|
|
// machine-readable: device,class,current,percent%,max
|
|
|
|
|
|
onStreamFinished: {
|
|
|
|
|
|
let f = text.trim().split("\n")[0].split(",");
|
|
|
|
|
|
if (f.length < 5) return;
|
|
|
|
|
|
root.osdBrightness(brightProc.osdIcon, parseInt(f[3]) / 100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function setBrightness(args, icon) {
|
|
|
|
|
|
// Key repeat outpaces the process; dropping a step is
|
|
|
|
|
|
// invisible, rewriting a live command is not.
|
|
|
|
|
|
if (brightProc.running) return;
|
|
|
|
|
|
brightProc.osdIcon = icon;
|
|
|
|
|
|
brightProc.command = ["brightnessctl", "-m"].concat(args);
|
|
|
|
|
|
brightProc.running = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
IpcHandler {
|
|
|
|
|
|
target: "osd"
|
|
|
|
|
|
// floor 1%: `set 0%` turns the panel fully off
|
|
|
|
|
|
function brightnessUp(): void { root.setBrightness(["set", "5%+"], "brightness_6"); }
|
|
|
|
|
|
function brightnessDown(): void { root.setBrightness(["-n", "1", "set", "5%-"], "brightness_6"); }
|
|
|
|
|
|
function kbdUp(): void { root.setBrightness(["-d", "smc::kbd_backlight", "set", "10%+"], "keyboard"); }
|
|
|
|
|
|
function kbdDown(): void { root.setBrightness(["-d", "smc::kbd_backlight", "set", "10%-"], "keyboard"); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-08 13:26:08 +01:00
|
|
|
|
// ── Night light: quickshell owns the schedule, the hyprsunset
|
|
|
|
|
|
// daemon just applies the gamma (hyprctl hyprsunset …).
|
|
|
|
|
|
// sunrise/sunset default to 7:00/21:00 and are replaced with
|
|
|
|
|
|
// real times by the bar's open-meteo weather fetch.
|
|
|
|
|
|
property int sunriseMins: 7 * 60
|
|
|
|
|
|
property int sunsetMins: 21 * 60
|
|
|
|
|
|
readonly property var nightlight: nlState
|
|
|
|
|
|
|
|
|
|
|
|
FileView {
|
|
|
|
|
|
id: nlFile
|
|
|
|
|
|
path: Quickshell.env("HOME") + "/.local/state/quickshell-nightlight.json"
|
|
|
|
|
|
printErrors: false
|
|
|
|
|
|
adapter: JsonAdapter {
|
|
|
|
|
|
id: nlState
|
|
|
|
|
|
property bool autoOn: true
|
|
|
|
|
|
property real warmth: 0.5 // 0 = 6500K … 1 = 2500K
|
|
|
|
|
|
}
|
|
|
|
|
|
onLoaded: root.applyNightlight()
|
|
|
|
|
|
onLoadFailed: writeAdapter() // first run: create with defaults
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function setNightlight(autoOn, warmth) {
|
|
|
|
|
|
nlState.autoOn = autoOn;
|
|
|
|
|
|
nlState.warmth = warmth;
|
|
|
|
|
|
applyNightlight();
|
|
|
|
|
|
nlFile.writeAdapter();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function applyNightlight() {
|
|
|
|
|
|
let w = nlState.warmth;
|
|
|
|
|
|
if (nlState.autoOn) {
|
|
|
|
|
|
let now = new Date();
|
|
|
|
|
|
let mins = now.getHours() * 60 + now.getMinutes();
|
|
|
|
|
|
if (mins >= sunriseMins && mins < sunsetMins) w = 0; // daytime
|
|
|
|
|
|
}
|
|
|
|
|
|
nlApply.command = w < 0.02
|
|
|
|
|
|
? ["hyprctl", "hyprsunset", "identity"]
|
|
|
|
|
|
: ["hyprctl", "hyprsunset", "temperature", String(Math.round(6500 - w * 4000))];
|
|
|
|
|
|
nlApply.running = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Process { id: nlApply }
|
|
|
|
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
|
|
// Re-assert once a minute: crosses the sunrise/sunset
|
|
|
|
|
|
// boundaries and heals a hyprsunset daemon that (re)started
|
|
|
|
|
|
// after us.
|
|
|
|
|
|
interval: 60000; running: true; repeat: true; triggeredOnStart: true
|
|
|
|
|
|
onTriggered: root.applyNightlight()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 10:00:02 +01:00
|
|
|
|
NotificationServer {
|
|
|
|
|
|
id: _notifServer
|
|
|
|
|
|
bodySupported: true
|
|
|
|
|
|
actionsSupported: true
|
|
|
|
|
|
imageSupported: true
|
|
|
|
|
|
persistenceSupported: true
|
|
|
|
|
|
keepOnReload: true
|
|
|
|
|
|
onNotification: (notification) => {
|
|
|
|
|
|
notification.tracked = true;
|
|
|
|
|
|
root.latestNotification = notification;
|
|
|
|
|
|
root.notificationReceived();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-08 10:13:14 +01:00
|
|
|
|
// Wallpaper — replaces the hyprpaper daemon.
|
|
|
|
|
|
Variants {
|
|
|
|
|
|
model: Quickshell.screens
|
|
|
|
|
|
|
|
|
|
|
|
PanelWindow {
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
screen: modelData
|
|
|
|
|
|
WlrLayershell.layer: WlrLayer.Background
|
|
|
|
|
|
exclusionMode: ExclusionMode.Ignore
|
|
|
|
|
|
anchors { top: true; bottom: true; left: true; right: true }
|
|
|
|
|
|
color: "black"
|
|
|
|
|
|
|
|
|
|
|
|
Image {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
source: "file://" + Quickshell.env("HOME") + "/.local/share/backgrounds/wallpaper.png"
|
2026-07-27 12:59:16 +01:00
|
|
|
|
cache: false // same-URL pixmap cache survives soft reload
|
2026-07-08 10:13:14 +01:00
|
|
|
|
fillMode: Image.PreserveAspectCrop
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 10:00:02 +01:00
|
|
|
|
Variants {
|
|
|
|
|
|
model: Quickshell.screens
|
|
|
|
|
|
|
|
|
|
|
|
Bar {
|
|
|
|
|
|
notifServer: _notifServer
|
|
|
|
|
|
shellRoot: root
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
"quickshell/Bar.qml" = {
|
|
|
|
|
|
onChange = qsRestart;
|
|
|
|
|
|
text = ''
|
|
|
|
|
|
import Quickshell
|
|
|
|
|
|
import Quickshell.Hyprland
|
|
|
|
|
|
import Quickshell.Wayland
|
|
|
|
|
|
import Quickshell.Services.SystemTray
|
|
|
|
|
|
import Quickshell.Services.Notifications
|
|
|
|
|
|
import Quickshell.Services.Pipewire
|
2026-06-11 11:03:24 +01:00
|
|
|
|
import Quickshell.Services.UPower
|
2026-06-11 11:23:28 +01:00
|
|
|
|
import Quickshell.Services.Mpris
|
2026-06-11 10:00:02 +01:00
|
|
|
|
import Quickshell.Widgets
|
|
|
|
|
|
import Quickshell.Io
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
|
import Qt5Compat.GraphicalEffects
|
|
|
|
|
|
|
|
|
|
|
|
PanelWindow {
|
|
|
|
|
|
id: bar
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
required property NotificationServer notifServer
|
|
|
|
|
|
required property var shellRoot
|
|
|
|
|
|
screen: modelData
|
|
|
|
|
|
WlrLayershell.namespace: "quickshell-bar"
|
2026-06-12 19:49:25 +01:00
|
|
|
|
// OnDemand + HyprlandFocusGrab is the working combination
|
|
|
|
|
|
// (caelestia's): the grab redirects focus to this window and
|
|
|
|
|
|
// OnDemand lets the layer surface accept it. Exclusive fights
|
|
|
|
|
|
// the grab — it self-clears and instantly closes the panel.
|
2026-06-17 14:19:10 +01:00
|
|
|
|
WlrLayershell.keyboardFocus: (sessionMenu.open || launcherPanel.open || bar.activeDropdown !== null) && !bar.screenshotPinned ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Vertical bar on the left edge. The surface still covers the
|
|
|
|
|
|
// whole screen (the frame band and every panel are drawn into
|
|
|
|
|
|
// it); only the reserved strip is the bar itself.
|
2026-06-11 10:00:02 +01:00
|
|
|
|
anchors {
|
|
|
|
|
|
top: true
|
|
|
|
|
|
left: true
|
2026-07-28 13:09:49 +01:00
|
|
|
|
bottom: true
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
implicitWidth: bar.screen.width
|
|
|
|
|
|
exclusiveZone: Theme.barWidth
|
2026-06-11 10:00:02 +01:00
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
|
|
|
|
mask: Region {
|
|
|
|
|
|
item: barBgRect
|
|
|
|
|
|
Region {
|
|
|
|
|
|
x: activeDropdown ? activeDropdown.x : 0
|
|
|
|
|
|
y: activeDropdown ? activeDropdown.y : 0
|
|
|
|
|
|
width: activeDropdown && activeDropdown.visible ? activeDropdown.width : 0
|
|
|
|
|
|
height: activeDropdown && activeDropdown.visible ? activeDropdown.height : 0
|
|
|
|
|
|
}
|
|
|
|
|
|
Region {
|
|
|
|
|
|
x: toastItem.visible ? toastItem.x : 0
|
|
|
|
|
|
y: toastItem.visible ? toastItem.y : 0
|
|
|
|
|
|
width: toastItem.visible ? toastItem.width : 0
|
|
|
|
|
|
height: toastItem.visible ? toastItem.height : 0
|
|
|
|
|
|
}
|
2026-06-12 14:06:20 +01:00
|
|
|
|
Region {
|
|
|
|
|
|
x: sessionMenu.visible ? sessionMenu.x : 0
|
|
|
|
|
|
y: sessionMenu.visible ? sessionMenu.y : 0
|
|
|
|
|
|
width: sessionMenu.visible ? sessionMenu.width : 0
|
|
|
|
|
|
height: sessionMenu.visible ? sessionMenu.height : 0
|
|
|
|
|
|
}
|
2026-06-12 19:45:03 +01:00
|
|
|
|
Region {
|
|
|
|
|
|
x: launcherPanel.visible ? launcherPanel.x : 0
|
|
|
|
|
|
y: launcherPanel.visible ? launcherPanel.y : 0
|
|
|
|
|
|
width: launcherPanel.visible ? launcherPanel.width : 0
|
|
|
|
|
|
height: launcherPanel.visible ? launcherPanel.height : 0
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-12 09:58:35 +01:00
|
|
|
|
Item {
|
2026-06-11 10:00:02 +01:00
|
|
|
|
id: barBgRect
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
anchors.left: parent.left
|
2026-07-28 13:09:49 +01:00
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
|
width: Theme.barWidth
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-12 14:06:20 +01:00
|
|
|
|
// Register the primary bar so shell.qml's IPC handler can
|
|
|
|
|
|
// reach the session menu.
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
|
|
if (bar.screen === Quickshell.screens[0])
|
|
|
|
|
|
bar.shellRoot.mainBar = bar;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function toggleSession() {
|
|
|
|
|
|
sessionMenu.toggle();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-12 19:45:03 +01:00
|
|
|
|
function toggleLauncher() {
|
|
|
|
|
|
launcherPanel.toggle();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
// ── Shared base text types: default the shell's two fonts so
|
|
|
|
|
|
// no widget repeats `font.family`. Size/colour/weight are
|
|
|
|
|
|
// overridable per use (these are just the common defaults).
|
|
|
|
|
|
component SText: Text {
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.family: Theme.fontFamily
|
|
|
|
|
|
font.pixelSize: 13
|
|
|
|
|
|
}
|
|
|
|
|
|
component SIcon: Text {
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.family: Theme.iconFont
|
|
|
|
|
|
font.pixelSize: 16
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-17 13:22:28 +01:00
|
|
|
|
// ── VolIcon: a slider's volume glyph that toggles its audio
|
|
|
|
|
|
// node's mute on click. Glyph reflects the mute state; pair it
|
|
|
|
|
|
// with a fill that greys when `audioNode.muted`.
|
|
|
|
|
|
component VolIcon: SIcon {
|
|
|
|
|
|
property var audioNode: null
|
|
|
|
|
|
text: (audioNode && audioNode.muted) ? "volume_off" : "volume_up"
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: if (audioNode) audioNode.muted = !audioNode.muted
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-17 13:59:26 +01:00
|
|
|
|
// ── HoverRow: a rounded clickable row that owns the shared
|
|
|
|
|
|
// base02 hover-fade + pointer cursor. Drop content inside and
|
|
|
|
|
|
// handle `onClicked`; override `radius` for non-radiusTiny rows.
|
|
|
|
|
|
component HoverRow: Rectangle {
|
|
|
|
|
|
default property alias rowData: _hrContent.data
|
|
|
|
|
|
signal clicked()
|
|
|
|
|
|
radius: Theme.radiusTiny
|
|
|
|
|
|
color: _hrMa.containsMouse ? Theme.base02 : Theme.base02t
|
|
|
|
|
|
Behavior on color { ColorAnimation { duration: Theme.animFade } }
|
|
|
|
|
|
Item { id: _hrContent; anchors.fill: parent }
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
id: _hrMa
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: parent.clicked()
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
// ── Card: the rounded base01 section surface used by every
|
|
|
|
|
|
// dropdown. Children flow into a padded auto-height column,
|
|
|
|
|
|
// so callers just set `width` and drop content in.
|
|
|
|
|
|
component Card: Rectangle {
|
|
|
|
|
|
default property alias cardData: _cardCol.data
|
|
|
|
|
|
property alias cardSpacing: _cardCol.spacing
|
|
|
|
|
|
radius: Theme.radius
|
2026-06-17 11:30:13 +01:00
|
|
|
|
color: Theme.cardBg
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
implicitHeight: _cardCol.height + 2 * Theme.cardPad
|
|
|
|
|
|
Column {
|
|
|
|
|
|
id: _cardCol
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
anchors.topMargin: Theme.cardPad
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
width: parent.width - 2 * Theme.cardPad
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ── PillSlider: slim rounded track + fill with a full-height
|
|
|
|
|
|
// invisible hit area. `value` is 0..1; `moved(v)` fires on drag.
|
|
|
|
|
|
component PillSlider: Item {
|
|
|
|
|
|
property real value: 0
|
|
|
|
|
|
property color fillColor: Theme.base0D
|
|
|
|
|
|
property real trackH: 6
|
|
|
|
|
|
signal moved(real v)
|
|
|
|
|
|
height: 20
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: parent.trackH
|
|
|
|
|
|
radius: parent.trackH / 2
|
|
|
|
|
|
color: Theme.base02
|
|
|
|
|
|
}
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
width: parent.value > 0 ? Math.max(parent.trackH, parent.value * parent.width) : 0
|
|
|
|
|
|
height: parent.trackH
|
|
|
|
|
|
radius: parent.trackH / 2
|
|
|
|
|
|
color: parent.fillColor
|
|
|
|
|
|
Behavior on width { NumberAnimation { duration: 80 } }
|
|
|
|
|
|
}
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
function set(mouse) { parent.moved(Math.max(0, Math.min(1, mouse.x / width))); }
|
|
|
|
|
|
onPressed: (mouse) => set(mouse)
|
|
|
|
|
|
onPositionChanged: (mouse) => { if (pressed) set(mouse); }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-08 13:26:08 +01:00
|
|
|
|
// ── ToggleSwitch: small on/off pill.
|
|
|
|
|
|
component ToggleSwitch: Rectangle {
|
|
|
|
|
|
property bool on: false
|
|
|
|
|
|
signal toggled(bool v)
|
|
|
|
|
|
width: 34; height: 18; radius: 9
|
|
|
|
|
|
color: on ? Theme.base0D : Theme.base02
|
|
|
|
|
|
Behavior on color { ColorAnimation { duration: Theme.animFade } }
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
width: 12; height: 12; radius: 6
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
x: parent.on ? parent.width - width - 3 : 3
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
Behavior on x { NumberAnimation { duration: Theme.animContent; easing.type: Easing.OutExpo } }
|
|
|
|
|
|
}
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: parent.toggled(!parent.on)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ── NightlightCard: colour-temperature control backed by
|
|
|
|
|
|
// shell.qml's night-light state. Auto on: follows
|
|
|
|
|
|
// sunrise/sunset and the slider sets the *warmest* colour the
|
|
|
|
|
|
// night reaches. Auto off: the slider is the temperature, now.
|
|
|
|
|
|
component NightlightCard: Card {
|
|
|
|
|
|
id: _nlc
|
|
|
|
|
|
cardSpacing: 6
|
|
|
|
|
|
property var nl: bar.shellRoot.nightlight
|
|
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: 20
|
|
|
|
|
|
Row {
|
|
|
|
|
|
spacing: 6
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
SIcon { anchors.verticalCenter: parent.verticalCenter; text: "nightlight"; font.pixelSize: 15 }
|
|
|
|
|
|
SText { anchors.verticalCenter: parent.verticalCenter; text: "Night Light"; font.weight: Font.Medium }
|
|
|
|
|
|
}
|
|
|
|
|
|
Row {
|
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
spacing: 6
|
|
|
|
|
|
SText { anchors.verticalCenter: parent.verticalCenter; text: "Auto"; color: Theme.base04; font.pixelSize: 11 }
|
|
|
|
|
|
ToggleSwitch {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
on: _nlc.nl.autoOn
|
|
|
|
|
|
onToggled: (v) => bar.shellRoot.setNightlight(v, _nlc.nl.warmth)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SText {
|
|
|
|
|
|
text: _nlc.nl.autoOn ? "Warmest colour (at night)" : "Colour temperature"
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 10
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Row {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
PillSlider {
|
|
|
|
|
|
width: parent.width - nlTempLabel.width - 8
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
value: _nlc.nl.warmth
|
|
|
|
|
|
fillColor: Theme.base09
|
|
|
|
|
|
onMoved: (v) => bar.shellRoot.setNightlight(_nlc.nl.autoOn, v)
|
|
|
|
|
|
}
|
|
|
|
|
|
SText {
|
|
|
|
|
|
id: nlTempLabel
|
|
|
|
|
|
width: 38
|
|
|
|
|
|
text: Math.round(6500 - _nlc.nl.warmth * 4000) + "K"
|
|
|
|
|
|
font.pixelSize: 11
|
|
|
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
// ── NotifContent: summary + body + action chips for one
|
|
|
|
|
|
// notification, shared by the calendar list and the toast.
|
|
|
|
|
|
// Callers supply the container, dismiss button and sizes.
|
|
|
|
|
|
component NotifContent: Column {
|
|
|
|
|
|
id: _nc
|
|
|
|
|
|
property var notif
|
2026-06-13 19:25:06 +01:00
|
|
|
|
property int summarySize: 12
|
|
|
|
|
|
property int bodySize: 11
|
|
|
|
|
|
property int bodyLines: 3
|
|
|
|
|
|
property color chipBg: Theme.base01
|
|
|
|
|
|
property color chipBgHover: Theme.base02
|
|
|
|
|
|
property color chipBorder: Theme.base02
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
signal actionInvoked()
|
|
|
|
|
|
spacing: 2
|
|
|
|
|
|
|
2026-06-17 14:56:49 +01:00
|
|
|
|
// App header: icon + name of the sending app, when known.
|
|
|
|
|
|
Row {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 4
|
|
|
|
|
|
visible: _nc.notif && (_nc.notif.appName !== "" || _appIcon.source != "")
|
|
|
|
|
|
Image {
|
|
|
|
|
|
id: _appIcon
|
|
|
|
|
|
width: 14; height: 14
|
|
|
|
|
|
sourceSize.width: 14; sourceSize.height: 14
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
source: _nc.notif && _nc.notif.appIcon ? Quickshell.iconPath(_nc.notif.appIcon, true) : ""
|
|
|
|
|
|
visible: source != ""
|
|
|
|
|
|
}
|
|
|
|
|
|
SText {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: _nc.notif ? _nc.notif.appName : ""
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 10
|
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
|
width: parent.width - (_appIcon.visible ? 18 : 0)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
text: _nc.notif ? (_nc.notif.summary || _nc.notif.appName) : ""
|
|
|
|
|
|
font.pixelSize: _nc.summarySize
|
|
|
|
|
|
font.weight: Font.Medium
|
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
|
}
|
|
|
|
|
|
SText {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
text: _nc.notif ? (_nc.notif.body || "") : ""
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: _nc.bodySize
|
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
|
maximumLineCount: _nc.bodyLines
|
|
|
|
|
|
wrapMode: Text.Wrap
|
2026-06-17 15:39:11 +01:00
|
|
|
|
// ponytail: hyprshot's body is a noisy file path; the
|
|
|
|
|
|
// "Screenshot saved" summary + the preview say enough.
|
|
|
|
|
|
visible: text !== "" && !(_nc.notif && _nc.notif.appName === "Hyprshot")
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
}
|
|
|
|
|
|
Row {
|
|
|
|
|
|
spacing: 4
|
|
|
|
|
|
visible: _nc.notif && _nc.notif.actions.length > 0
|
|
|
|
|
|
Repeater {
|
|
|
|
|
|
model: _nc.notif ? _nc.notif.actions : []
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
width: _at.width + 12
|
|
|
|
|
|
height: _at.height + 6
|
|
|
|
|
|
radius: Theme.radiusTiny
|
|
|
|
|
|
color: _ama.containsMouse ? _nc.chipBgHover : _nc.chipBg
|
|
|
|
|
|
Behavior on color { ColorAnimation { duration: Theme.animFade } }
|
|
|
|
|
|
border.width: 1
|
|
|
|
|
|
border.color: _nc.chipBorder
|
|
|
|
|
|
SText { id: _at; anchors.centerIn: parent; text: modelData.text; font.pixelSize: 10 }
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
id: _ama
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: { modelData.invoke(); _nc.actionInvoked(); }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-12 19:31:56 +01:00
|
|
|
|
// ── Shell chrome: bar, frame, panel and toast rendered as
|
|
|
|
|
|
// ONE signed-distance field (caelestia-style). Surfaces merge
|
|
|
|
|
|
// via circular smooth-min, and the 2px border is the distance
|
|
|
|
|
|
// band just inside the boundary — borders flow through every
|
|
|
|
|
|
// junction fillet by construction, so all of the previous
|
|
|
|
|
|
// ears / border-gaps / melt geometry lives in the math now.
|
|
|
|
|
|
ShaderEffect {
|
|
|
|
|
|
anchors.fill: parent
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Panels grow rightward out of the bar column, so the
|
|
|
|
|
|
// cross-axis is now vertical: the 8px inset that used to
|
|
|
|
|
|
// be left/right is top/bottom.
|
|
|
|
|
|
readonly property real panelTop: chrome.y + 8
|
|
|
|
|
|
readonly property real panelBottom: chrome.y + chrome.height - 8
|
|
|
|
|
|
// The panel/toast/session centre-x uses (barWidth − 4): the
|
|
|
|
|
|
// surface overlaps 4px into the bar so the two melt.
|
|
|
|
|
|
readonly property real surfLeftX: Theme.barWidth - 4
|
2026-06-12 19:31:56 +01:00
|
|
|
|
property vector4d cutout: Qt.vector4d(
|
2026-07-28 13:09:49 +01:00
|
|
|
|
(Theme.barWidth + bar.width - Theme.frameWidth) / 2,
|
|
|
|
|
|
bar.height / 2,
|
|
|
|
|
|
(bar.width - Theme.frameWidth - Theme.barWidth) / 2,
|
|
|
|
|
|
bar.height / 2 - Theme.frameWidth)
|
2026-06-12 19:31:56 +01:00
|
|
|
|
property vector4d panel: chrome.visible
|
2026-07-28 13:09:49 +01:00
|
|
|
|
? Qt.vector4d(surfLeftX + chrome.width / 2, (panelTop + panelBottom) / 2,
|
|
|
|
|
|
4 + chrome.width / 2, (panelBottom - panelTop) / 2)
|
2026-06-12 19:31:56 +01:00
|
|
|
|
: Qt.vector4d(0, 0, 0, 0)
|
2026-07-28 13:09:49 +01:00
|
|
|
|
property vector4d toast: toastItem.visible && _toastRect.width > 0.5
|
|
|
|
|
|
? Qt.vector4d(surfLeftX + _toastRect.width / 2, toastItem.y + 8 + _toastRect.height / 2,
|
|
|
|
|
|
4 + _toastRect.width / 2, _toastRect.height / 2)
|
2026-06-12 19:31:56 +01:00
|
|
|
|
: Qt.vector4d(0, 0, 0, 0)
|
|
|
|
|
|
property vector4d session: sessionMenu.visible
|
2026-07-28 13:09:49 +01:00
|
|
|
|
? Qt.vector4d(surfLeftX + sessionMenu.width / 2, sessionMenu.y + sessionMenu.height / 2,
|
|
|
|
|
|
4 + sessionMenu.width / 2, sessionMenu.height / 2)
|
2026-06-12 19:31:56 +01:00
|
|
|
|
: Qt.vector4d(0, 0, 0, 0)
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// The launcher is the one surface that stays put: it still
|
|
|
|
|
|
// grows from the bottom frame band at screen centre.
|
2026-06-12 19:45:03 +01:00
|
|
|
|
readonly property real launchBot: bar.height - Theme.frameWidth + 4
|
|
|
|
|
|
property vector4d launcher: launcherPanel.visible
|
|
|
|
|
|
? Qt.vector4d(launcherPanel.x + launcherPanel.width / 2, (launcherPanel.y + launchBot) / 2,
|
|
|
|
|
|
launcherPanel.width / 2, (launchBot - launcherPanel.y) / 2)
|
|
|
|
|
|
: Qt.vector4d(0, 0, 0, 0)
|
2026-06-12 19:31:56 +01:00
|
|
|
|
property vector4d fillColor: Qt.vector4d(Theme.barBg.r, Theme.barBg.g, Theme.barBg.b, Theme.barBg.a)
|
|
|
|
|
|
property vector4d borderColor: Qt.vector4d(Theme.base03.r, Theme.base03.g, Theme.base03.b, 1)
|
|
|
|
|
|
property vector2d res: Qt.vector2d(width, height)
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
property real cutoutR: Theme.radius
|
|
|
|
|
|
property real panelR: Theme.radius
|
2026-06-12 19:31:56 +01:00
|
|
|
|
property real meltK: 12
|
|
|
|
|
|
property real borderW: Theme.borderWidth
|
|
|
|
|
|
fragmentShader: "file://${chromeShader}"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-12 14:06:20 +01:00
|
|
|
|
// ── Session menu: icon-only power controls morphing out of
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// the bar at the bottom-left (Super+L, or the power button).
|
|
|
|
|
|
// Keyboard: arrows/Tab move the selection, Enter activates,
|
|
|
|
|
|
// Esc closes.
|
2026-06-12 14:06:20 +01:00
|
|
|
|
Item {
|
|
|
|
|
|
id: sessionMenu
|
|
|
|
|
|
property bool open: false
|
2026-06-12 14:23:33 +01:00
|
|
|
|
property int selIdx: 0
|
2026-06-12 20:10:20 +01:00
|
|
|
|
// Both axes animate so the panel expands from a small
|
|
|
|
|
|
// point on the column (like the top dropdowns' stub seed)
|
|
|
|
|
|
// instead of rolling out at full height.
|
2026-07-08 14:05:05 +01:00
|
|
|
|
property real openW: open ? sessionCard.width + 2 * Theme.panelGap : 0
|
|
|
|
|
|
property real openH: open ? sessionCard.height + 2 * Theme.panelGap : 36
|
2026-06-12 14:06:20 +01:00
|
|
|
|
Behavior on openW {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animMorph; easing.type: Easing.OutExpo }
|
2026-06-12 14:06:20 +01:00
|
|
|
|
}
|
2026-06-12 20:10:20 +01:00
|
|
|
|
Behavior on openH {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animMorph; easing.type: Easing.OutExpo }
|
2026-06-12 20:10:20 +01:00
|
|
|
|
}
|
2026-06-12 14:06:20 +01:00
|
|
|
|
|
2026-06-12 14:23:33 +01:00
|
|
|
|
readonly property var actions: [
|
|
|
|
|
|
{ icon: "lock", danger: false, act: "lock" },
|
|
|
|
|
|
{ icon: "logout", danger: false, act: "logout" },
|
|
|
|
|
|
{ icon: "restart_alt", danger: true, act: "reboot" },
|
|
|
|
|
|
{ icon: "power_settings_new", danger: true, act: "poweroff" }
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
function activate(act) {
|
|
|
|
|
|
open = false;
|
2026-07-08 11:04:27 +01:00
|
|
|
|
if (act === "lock") bar.shellRoot.lock();
|
2026-06-12 14:23:33 +01:00
|
|
|
|
else if (act === "logout") Hyprland.dispatch("hl.dsp.exit()");
|
|
|
|
|
|
else if (act === "reboot") Quickshell.execDetached([Commands.systemctl, "reboot"]);
|
|
|
|
|
|
else Quickshell.execDetached([Commands.systemctl, "poweroff"]);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function toggle() {
|
|
|
|
|
|
open = !open;
|
|
|
|
|
|
if (open) {
|
|
|
|
|
|
selIdx = 0;
|
|
|
|
|
|
forceActiveFocus();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Unfolds rightward out of the bar at the bottom-left,
|
|
|
|
|
|
// level with the power button that opens it.
|
|
|
|
|
|
x: Theme.barWidth
|
|
|
|
|
|
y: Math.round(bar.height - Theme.frameWidth - height - 8)
|
2026-06-12 14:06:20 +01:00
|
|
|
|
width: openW
|
2026-06-12 20:10:20 +01:00
|
|
|
|
height: openH
|
2026-06-12 14:06:20 +01:00
|
|
|
|
visible: openW > 0.5
|
|
|
|
|
|
|
2026-06-12 14:23:33 +01:00
|
|
|
|
focus: open
|
|
|
|
|
|
Keys.onEscapePressed: open = false
|
2026-06-17 14:25:54 +01:00
|
|
|
|
Keys.onUpPressed: selIdx = (selIdx + actions.length - 1) % actions.length
|
|
|
|
|
|
Keys.onDownPressed: selIdx = (selIdx + 1) % actions.length
|
|
|
|
|
|
Keys.onTabPressed: selIdx = (selIdx + 1) % actions.length
|
2026-06-12 14:23:33 +01:00
|
|
|
|
Keys.onReturnPressed: activate(actions[selIdx].act)
|
|
|
|
|
|
Keys.onEnterPressed: activate(actions[selIdx].act)
|
2026-06-12 14:06:20 +01:00
|
|
|
|
|
|
|
|
|
|
// Content pinned to the column edge, revealed by the grow
|
|
|
|
|
|
Item {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
clip: true
|
|
|
|
|
|
opacity: sessionMenu.open ? 1 : 0
|
|
|
|
|
|
Behavior on opacity {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animContent; easing.type: Easing.OutCubic }
|
2026-06-12 14:06:20 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-12 14:23:33 +01:00
|
|
|
|
// Card backing, matching the other dropdowns
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
id: sessionCard
|
2026-06-12 14:06:20 +01:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2026-07-28 13:09:49 +01:00
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.leftMargin: Theme.panelGap
|
2026-06-12 14:23:33 +01:00
|
|
|
|
width: 48
|
|
|
|
|
|
height: sessionCol.height + 8
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
radius: Theme.radius
|
2026-06-17 11:30:13 +01:00
|
|
|
|
color: Theme.cardBg
|
2026-06-12 14:06:20 +01:00
|
|
|
|
|
2026-06-12 19:45:03 +01:00
|
|
|
|
// Sliding selection pill — same tech as the power
|
|
|
|
|
|
// profile selector; glides between the buttons.
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
width: 40
|
|
|
|
|
|
height: 40
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
radius: Theme.radius
|
2026-06-12 19:45:03 +01:00
|
|
|
|
color: Theme.base02
|
|
|
|
|
|
border.width: 1
|
|
|
|
|
|
border.color: Theme.base03
|
|
|
|
|
|
x: sessionCol.x
|
|
|
|
|
|
y: sessionCol.y + sessionMenu.selIdx * 44
|
|
|
|
|
|
Behavior on y {
|
|
|
|
|
|
NumberAnimation { duration: 250; easing.type: Easing.OutExpo }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-12 14:23:33 +01:00
|
|
|
|
Column {
|
|
|
|
|
|
id: sessionCol
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
spacing: 4
|
|
|
|
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
|
|
model: sessionMenu.actions
|
|
|
|
|
|
|
2026-06-12 19:45:03 +01:00
|
|
|
|
Item {
|
2026-06-12 14:23:33 +01:00
|
|
|
|
id: sessBtn
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
required property int index
|
|
|
|
|
|
width: 40
|
|
|
|
|
|
height: 40
|
2026-06-12 14:06:20 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
2026-06-12 14:23:33 +01:00
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
text: sessBtn.modelData.icon
|
2026-06-17 11:30:13 +01:00
|
|
|
|
// All four buttons share the logout
|
|
|
|
|
|
// setup: base05, FILL on selection.
|
|
|
|
|
|
color: Theme.base05
|
2026-06-12 14:23:33 +01:00
|
|
|
|
font.pixelSize: 20
|
2026-06-12 14:28:50 +01:00
|
|
|
|
font.weight: 600
|
2026-06-12 14:23:33 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onEntered: sessionMenu.selIdx = sessBtn.index
|
|
|
|
|
|
onClicked: sessionMenu.activate(sessBtn.modelData.act)
|
2026-06-12 14:06:20 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-12 19:45:03 +01:00
|
|
|
|
// ── Launcher: rises out of the bottom frame edge (Super+R).
|
|
|
|
|
|
// Lives in the SDF field, so it melts into the frame and its
|
|
|
|
|
|
// height morphs live as results filter. Results sit above the
|
|
|
|
|
|
// search box; selection uses an animated ListView highlight.
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: launcherPanel
|
|
|
|
|
|
property bool open: false
|
|
|
|
|
|
readonly property real panelW: 420
|
|
|
|
|
|
property real targetH: 36 + launcherList.contentHeight
|
2026-06-17 11:30:13 +01:00
|
|
|
|
+ (launcherList.count > 0 ? 8 + 2 * Theme.cardPad : 0) + 24
|
2026-06-12 20:10:20 +01:00
|
|
|
|
// Both axes animate: expands from a small point on the
|
|
|
|
|
|
// bottom edge (like the top dropdowns' stub seed).
|
2026-06-12 19:45:03 +01:00
|
|
|
|
property real openH: open ? targetH : 0
|
2026-06-12 20:10:20 +01:00
|
|
|
|
property real openW: open ? panelW : 80
|
2026-06-12 19:45:03 +01:00
|
|
|
|
Behavior on openH {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animMorph; easing.type: Easing.OutExpo }
|
2026-06-12 19:45:03 +01:00
|
|
|
|
}
|
2026-06-12 20:10:20 +01:00
|
|
|
|
Behavior on openW {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animMorph; easing.type: Easing.OutExpo }
|
2026-06-12 20:10:20 +01:00
|
|
|
|
}
|
2026-06-12 19:45:03 +01:00
|
|
|
|
|
2026-06-12 20:10:20 +01:00
|
|
|
|
x: Math.round((bar.width - openW) / 2)
|
2026-06-12 19:45:03 +01:00
|
|
|
|
y: bar.height - Theme.frameWidth - openH
|
2026-06-12 20:10:20 +01:00
|
|
|
|
width: openW
|
2026-06-12 19:45:03 +01:00
|
|
|
|
height: openH
|
|
|
|
|
|
visible: openH > 0.5
|
|
|
|
|
|
|
|
|
|
|
|
function toggle() {
|
|
|
|
|
|
open = !open;
|
|
|
|
|
|
if (open) {
|
|
|
|
|
|
searchInput.text = "";
|
|
|
|
|
|
launcherList.currentIndex = 0;
|
|
|
|
|
|
searchInput.forceActiveFocus();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function activate(item) {
|
|
|
|
|
|
if (!item) return;
|
|
|
|
|
|
item.execute();
|
|
|
|
|
|
open = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function score(name, extra, q) {
|
|
|
|
|
|
let n = name.toLowerCase();
|
|
|
|
|
|
if (n.startsWith(q)) return 5;
|
|
|
|
|
|
if (n.includes(" " + q)) return 4;
|
|
|
|
|
|
if (n.includes(q)) return 3;
|
|
|
|
|
|
if (extra && extra.toLowerCase().includes(q)) return 2;
|
|
|
|
|
|
// Fuzzy: q as an in-order subsequence of n (vktop →
|
|
|
|
|
|
// vesktop); fewer skipped characters scores higher.
|
|
|
|
|
|
let qi = 0, gaps = 0, last = -1;
|
|
|
|
|
|
for (let i = 0; i < n.length && qi < q.length; i++) {
|
|
|
|
|
|
if (n[i] === q[qi]) {
|
|
|
|
|
|
if (last >= 0) gaps += i - last - 1;
|
|
|
|
|
|
last = i;
|
|
|
|
|
|
qi++;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (qi === q.length) return 1 / (1 + gaps);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
property var entries: {
|
|
|
|
|
|
let q = searchInput.text.toLowerCase().trim();
|
|
|
|
|
|
let apps = DesktopEntries.applications.values.filter(a => !a.noDisplay);
|
|
|
|
|
|
if (q === "") {
|
|
|
|
|
|
apps.sort((a, b) => a.name.localeCompare(b.name));
|
|
|
|
|
|
return apps.slice(0, 8);
|
|
|
|
|
|
}
|
|
|
|
|
|
let scored = [];
|
|
|
|
|
|
for (let i = 0; i < apps.length; i++) {
|
|
|
|
|
|
let s = score(apps[i].name, apps[i].genericName + " " + apps[i].comment, q);
|
|
|
|
|
|
if (s > 0) scored.push({ app: apps[i], s: s });
|
|
|
|
|
|
}
|
|
|
|
|
|
scored.sort((a, b) => b.s - a.s || a.app.name.localeCompare(b.app.name));
|
|
|
|
|
|
return scored.slice(0, 8).map(x => x.app);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Content anchored to the bottom so the grow reveals upward
|
|
|
|
|
|
Item {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
clip: true
|
|
|
|
|
|
opacity: launcherPanel.open ? 1 : 0
|
|
|
|
|
|
Behavior on opacity {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animContent; easing.type: Easing.OutCubic }
|
2026-06-12 19:45:03 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
|
anchors.bottomMargin: 12
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
width: launcherPanel.panelW - 24
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
|
2026-06-17 11:30:13 +01:00
|
|
|
|
// Results sit in a base01 card segment, like the
|
|
|
|
|
|
// notification list and the other dropdowns.
|
|
|
|
|
|
Rectangle {
|
2026-06-12 19:45:03 +01:00
|
|
|
|
width: parent.width
|
2026-06-17 11:30:13 +01:00
|
|
|
|
height: launcherList.contentHeight + 2 * Theme.cardPad
|
|
|
|
|
|
radius: Theme.radius
|
|
|
|
|
|
color: Theme.cardBg
|
|
|
|
|
|
visible: launcherList.count > 0
|
|
|
|
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
|
|
id: launcherList
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
anchors.margins: Theme.cardPad
|
2026-06-12 19:45:03 +01:00
|
|
|
|
interactive: false
|
|
|
|
|
|
model: launcherPanel.entries
|
|
|
|
|
|
highlight: Rectangle {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
radius: Theme.radiusSmall
|
2026-06-12 19:45:03 +01:00
|
|
|
|
color: Theme.base02
|
|
|
|
|
|
}
|
|
|
|
|
|
highlightMoveDuration: 200
|
|
|
|
|
|
highlightMoveVelocity: -1
|
|
|
|
|
|
highlightResizeDuration: 0
|
|
|
|
|
|
|
|
|
|
|
|
delegate: Item {
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
required property int index
|
|
|
|
|
|
width: launcherList.width
|
|
|
|
|
|
height: 32
|
|
|
|
|
|
|
|
|
|
|
|
Row {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.leftMargin: 10
|
|
|
|
|
|
spacing: 10
|
|
|
|
|
|
|
|
|
|
|
|
Image {
|
|
|
|
|
|
visible: source != ""
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
width: 18
|
|
|
|
|
|
height: 18
|
|
|
|
|
|
sourceSize.width: 18
|
|
|
|
|
|
sourceSize.height: 18
|
|
|
|
|
|
source: Quickshell.iconPath(modelData.icon, true)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
2026-06-12 19:45:03 +01:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: modelData.name
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.pixelSize: 13
|
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
|
width: 330
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
onEntered: launcherList.currentIndex = index
|
|
|
|
|
|
onClicked: launcherPanel.activate(modelData)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-17 11:30:13 +01:00
|
|
|
|
}
|
2026-06-12 19:45:03 +01:00
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: 36
|
2026-06-17 11:30:13 +01:00
|
|
|
|
radius: Theme.radius
|
|
|
|
|
|
color: Theme.cardBg
|
2026-06-12 19:45:03 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
2026-06-12 19:45:03 +01:00
|
|
|
|
id: searchIcon
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.leftMargin: 10
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: "search"
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 16
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TextInput {
|
|
|
|
|
|
id: searchInput
|
|
|
|
|
|
anchors.left: searchIcon.right
|
|
|
|
|
|
anchors.leftMargin: 8
|
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
anchors.rightMargin: 12
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.family: Theme.fontFamily
|
|
|
|
|
|
font.pixelSize: 13
|
|
|
|
|
|
clip: true
|
|
|
|
|
|
onTextChanged: launcherList.currentIndex = 0
|
|
|
|
|
|
|
|
|
|
|
|
Keys.onEscapePressed: launcherPanel.open = false
|
|
|
|
|
|
Keys.onUpPressed: launcherList.currentIndex = Math.max(0, launcherList.currentIndex - 1)
|
|
|
|
|
|
Keys.onDownPressed: launcherList.currentIndex = Math.min(launcherPanel.entries.length - 1, launcherList.currentIndex + 1)
|
|
|
|
|
|
Keys.onTabPressed: launcherList.currentIndex = (launcherList.currentIndex + 1) % Math.max(1, launcherPanel.entries.length)
|
|
|
|
|
|
Keys.onReturnPressed: launcherPanel.activate(launcherPanel.entries[launcherList.currentIndex])
|
|
|
|
|
|
Keys.onEnterPressed: launcherPanel.activate(launcherPanel.entries[launcherList.currentIndex])
|
|
|
|
|
|
}
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
2026-06-12 19:45:03 +01:00
|
|
|
|
anchors.left: searchIcon.right
|
|
|
|
|
|
anchors.leftMargin: 8
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
visible: searchInput.text === ""
|
|
|
|
|
|
text: "Search"
|
|
|
|
|
|
color: Theme.base03
|
|
|
|
|
|
font.pixelSize: 13
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-17 14:19:10 +01:00
|
|
|
|
// Click-outside dismissal for every panel — the launcher,
|
|
|
|
|
|
// session menu AND the bar dropdowns. Clicking into another
|
|
|
|
|
|
// window (or anywhere outside the bar) clears the grab and
|
|
|
|
|
|
// closes whatever is open. Suspended while screenshotPinned so
|
|
|
|
|
|
// slurp can grab input without dismissing the menu.
|
2026-06-12 19:45:03 +01:00
|
|
|
|
HyprlandFocusGrab {
|
2026-06-17 14:19:10 +01:00
|
|
|
|
active: (sessionMenu.open || launcherPanel.open || bar.activeDropdown !== null) && !bar.screenshotPinned
|
2026-06-12 19:45:03 +01:00
|
|
|
|
windows: [bar]
|
|
|
|
|
|
onCleared: {
|
2026-06-17 14:19:10 +01:00
|
|
|
|
if (bar.screenshotPinned) return;
|
2026-06-12 19:45:03 +01:00
|
|
|
|
sessionMenu.open = false;
|
|
|
|
|
|
launcherPanel.open = false;
|
2026-06-17 14:19:10 +01:00
|
|
|
|
bar.closeAllDropdowns();
|
2026-06-12 19:45:03 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 10:00:02 +01:00
|
|
|
|
property var activeDropdown: null
|
|
|
|
|
|
|
2026-06-17 14:19:10 +01:00
|
|
|
|
// Set by the screenshot keybind (via IPC) to hold menus open
|
|
|
|
|
|
// while a region screenshot runs. Watchdog unpins if the
|
|
|
|
|
|
// bracketing unpin call is ever missed.
|
|
|
|
|
|
property bool screenshotPinned: false
|
|
|
|
|
|
Timer {
|
|
|
|
|
|
id: _pinWatchdog
|
|
|
|
|
|
interval: 30000
|
|
|
|
|
|
onTriggered: bar.screenshotPinned = false
|
|
|
|
|
|
}
|
|
|
|
|
|
function setScreenshotPin(v) {
|
|
|
|
|
|
screenshotPinned = v;
|
|
|
|
|
|
if (v) _pinWatchdog.restart(); else _pinWatchdog.stop();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 10:00:02 +01:00
|
|
|
|
function closeAllDropdowns() {
|
|
|
|
|
|
if (activeDropdown && activeDropdown.visible) {
|
|
|
|
|
|
activeDropdown.animateClose();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-17 15:39:11 +01:00
|
|
|
|
|
|
|
|
|
|
// Preview image for a notification: its image hint, else a
|
|
|
|
|
|
// file-path appIcon (e.g. hyprshot's saved shot). "" = none.
|
|
|
|
|
|
function notifPreviewSource(notif) {
|
|
|
|
|
|
if (!notif) return "";
|
|
|
|
|
|
if (notif.image && notif.image !== "") return notif.image;
|
|
|
|
|
|
let a = notif.appIcon || "";
|
|
|
|
|
|
if (a.startsWith("file://")) return a;
|
|
|
|
|
|
if (a.startsWith("/")) return "file://" + a;
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
function toggleDropdown(dd, setupFn) {
|
|
|
|
|
|
if (dd.visible && !dd.closing) {
|
|
|
|
|
|
dd.animateClose();
|
|
|
|
|
|
} else {
|
2026-06-12 08:52:53 +01:00
|
|
|
|
if (setupFn) setupFn();
|
|
|
|
|
|
// Opening from fully closed: seed the chrome as a
|
|
|
|
|
|
// small stub on the widget so the panel grows out of
|
|
|
|
|
|
// it (reviving mid-close morphs back instead).
|
|
|
|
|
|
if (!activeDropdown && chrome.height < 0.5) {
|
|
|
|
|
|
chrome.seedFromButton(dd);
|
|
|
|
|
|
}
|
2026-06-11 20:32:19 +01:00
|
|
|
|
// Retarget the chrome before closing the previous
|
|
|
|
|
|
// dropdown so it morphs instead of dipping closed.
|
|
|
|
|
|
const prev = activeDropdown;
|
|
|
|
|
|
activeDropdown = dd;
|
|
|
|
|
|
if (prev && prev !== dd && prev.visible) {
|
|
|
|
|
|
prev.animateClose();
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
if (dd.closing) {
|
2026-06-11 20:01:20 +01:00
|
|
|
|
dd.revive();
|
2026-06-11 10:00:02 +01:00
|
|
|
|
} else {
|
|
|
|
|
|
dd.visible = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// SystemClock ticks on the minute boundary instead of a 1 Hz
|
|
|
|
|
|
// Timer; the calendar reads clockText.now too.
|
|
|
|
|
|
SystemClock {
|
|
|
|
|
|
id: sysClock
|
|
|
|
|
|
precision: SystemClock.Minutes
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// ── Top cluster: logo, clock, workspaces. The bar is a column
|
|
|
|
|
|
// now, so the two clusters anchor to opposite ends and the gap
|
|
|
|
|
|
// between them is the OSD slot.
|
|
|
|
|
|
Column {
|
|
|
|
|
|
id: barTop
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
anchors.topMargin: 12
|
|
|
|
|
|
anchors.horizontalCenter: barBgRect.horizontalCenter
|
|
|
|
|
|
spacing: 12
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// NixOS snowflake, flattened to the theme accent with the
|
|
|
|
|
|
// same hidden-Image + ColorOverlay trick the tray uses
|
|
|
|
|
|
// (there is no Material Symbols glyph for it).
|
|
|
|
|
|
Item {
|
|
|
|
|
|
width: Theme.barWidth
|
|
|
|
|
|
height: 24
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
Image {
|
|
|
|
|
|
id: nixLogoImg
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
width: 22
|
|
|
|
|
|
height: 22
|
|
|
|
|
|
source: "file://" + Commands.nixLogo
|
|
|
|
|
|
sourceSize.width: 22
|
|
|
|
|
|
sourceSize.height: 22
|
|
|
|
|
|
smooth: true
|
|
|
|
|
|
visible: false
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ColorOverlay {
|
|
|
|
|
|
anchors.fill: nixLogoImg
|
|
|
|
|
|
source: nixLogoImg
|
|
|
|
|
|
color: Theme.base0D
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: bar.toggleLauncher()
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Clock — HH over mm; "HH:mm" does not fit a 46px column.
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: clockText
|
|
|
|
|
|
width: Theme.barWidth
|
|
|
|
|
|
height: clockCol.height
|
|
|
|
|
|
property date now: sysClock.date
|
|
|
|
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
|
id: clockCol
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
spacing: 0
|
|
|
|
|
|
|
|
|
|
|
|
SText {
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: clockText.now.toLocaleTimeString(Qt.locale(), "HH")
|
|
|
|
|
|
font.pixelSize: 15
|
|
|
|
|
|
font.weight: Font.Medium
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
2026-07-28 13:09:49 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: clockText.now.toLocaleTimeString(Qt.locale(), "mm")
|
|
|
|
|
|
font.pixelSize: 15
|
|
|
|
|
|
font.weight: Font.Medium
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-07-28 13:15:06 +01:00
|
|
|
|
// Anchors to the clock like every other dropdown
|
|
|
|
|
|
// anchors to its widget; the clamp in BarDropdown
|
|
|
|
|
|
// pulls it back on screen when it overhangs.
|
|
|
|
|
|
function openCalendar() {
|
|
|
|
|
|
bar.toggleDropdown(calPopup, function() {
|
|
|
|
|
|
let pos = clockText.mapToItem(bar.contentItem, 0, clockText.height / 2);
|
|
|
|
|
|
calPopup.dropdownY = pos.y;
|
|
|
|
|
|
calPopup.resetView();
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
2026-07-28 13:15:06 +01:00
|
|
|
|
onClicked: clockText.openCalendar()
|
2026-07-28 13:09:49 +01:00
|
|
|
|
onEntered: {
|
|
|
|
|
|
if (bar.activeDropdown) {
|
2026-07-28 13:15:06 +01:00
|
|
|
|
if (bar.activeDropdown !== calPopup) clockText.openCalendar();
|
2026-07-28 13:09:49 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Workspace dots: accent pill for the focused workspace,
|
|
|
|
|
|
// dim dots otherwise. Stacked vertically now, so the
|
|
|
|
|
|
// focused pill grows along HEIGHT rather than width.
|
|
|
|
|
|
Column {
|
|
|
|
|
|
spacing: 4
|
2026-06-11 11:03:24 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
Repeater {
|
|
|
|
|
|
model: Hyprland.workspaces
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
Item {
|
|
|
|
|
|
id: wsItem
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
visible: modelData.id > 0
|
|
|
|
|
|
width: Theme.barWidth
|
|
|
|
|
|
height: visible ? dot.height + 6 : 0
|
|
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
id: dot
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
width: 6
|
|
|
|
|
|
height: wsItem.modelData.focused ? 18 : 6
|
|
|
|
|
|
radius: 3
|
|
|
|
|
|
color: wsItem.modelData.focused ? Theme.base0D
|
|
|
|
|
|
: wsMa.containsMouse ? Theme.base04 : Theme.base03
|
|
|
|
|
|
Behavior on height {
|
|
|
|
|
|
NumberAnimation { duration: 200; easing.type: Easing.OutExpo }
|
|
|
|
|
|
}
|
|
|
|
|
|
Behavior on color { ColorAnimation { duration: Theme.animFade } }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
id: wsMa
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
onClicked: wsItem.modelData.activate()
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// ── Bottom cluster: status icons, tray, power button. Anchored
|
|
|
|
|
|
// to the bottom edge so the gap above it — between here and the
|
|
|
|
|
|
// workspace dots — stays free as the OSD slot.
|
|
|
|
|
|
Column {
|
|
|
|
|
|
id: barBottom
|
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
|
anchors.bottomMargin: 12
|
|
|
|
|
|
anchors.horizontalCenter: barBgRect.horizontalCenter
|
2026-07-28 13:15:06 +01:00
|
|
|
|
spacing: 12
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
// Volume
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: volWidget
|
2026-07-28 13:09:49 +01:00
|
|
|
|
width: Theme.barWidth
|
|
|
|
|
|
height: 26
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
property PwNode sink: Pipewire.defaultAudioSink
|
|
|
|
|
|
|
|
|
|
|
|
PwObjectTracker {
|
|
|
|
|
|
objects: [volWidget.sink]
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
property int vol: sink && sink.audio ? Math.round(sink.audio.volume * 100) : 0
|
|
|
|
|
|
property bool muted: sink && sink.audio ? sink.audio.muted : false
|
2026-06-12 14:06:20 +01:00
|
|
|
|
property string volIcon: muted ? "volume_off"
|
|
|
|
|
|
: vol > 66 ? "volume_up"
|
|
|
|
|
|
: vol > 33 ? "volume_down"
|
|
|
|
|
|
: vol > 0 ? "volume_mute"
|
|
|
|
|
|
: "volume_off"
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
function openVolDropdown() {
|
|
|
|
|
|
bar.toggleDropdown(volDropdown, function() {
|
2026-07-28 13:09:49 +01:00
|
|
|
|
let pos = volWidget.mapToItem(bar.contentItem, 0, volWidget.height / 2);
|
|
|
|
|
|
volDropdown.dropdownY = pos.y;
|
2026-06-11 10:00:02 +01:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Icon only — the level lives in the OSD slot above and
|
|
|
|
|
|
// in the dropdown; "100%" does not fit the column.
|
|
|
|
|
|
SIcon {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
text: volWidget.volIcon
|
|
|
|
|
|
color: volWidget.muted ? Theme.base03 : Theme.base05
|
|
|
|
|
|
font.pixelSize: 18
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
|
|
|
|
|
|
onClicked: (event) => {
|
|
|
|
|
|
if (event.button === Qt.MiddleButton) {
|
|
|
|
|
|
if (volWidget.sink && volWidget.sink.audio)
|
|
|
|
|
|
volWidget.sink.audio.muted = !volWidget.sink.audio.muted;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
volWidget.openVolDropdown();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
onEntered: {
|
|
|
|
|
|
if (bar.activeDropdown) {
|
|
|
|
|
|
if (bar.activeDropdown !== volDropdown) volWidget.openVolDropdown();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Network status
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: netWidget
|
2026-07-28 13:09:49 +01:00
|
|
|
|
width: Theme.barWidth
|
|
|
|
|
|
height: 26
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
property string netState: "disconnected"
|
|
|
|
|
|
property string netConn: ""
|
|
|
|
|
|
property string netType: ""
|
2026-06-12 14:06:20 +01:00
|
|
|
|
property string netIcon: "wifi_off"
|
2026-06-11 10:00:02 +01:00
|
|
|
|
property var wifiNetworks: []
|
|
|
|
|
|
property string netDevice: ""
|
|
|
|
|
|
|
|
|
|
|
|
property string _pendingState: "disconnected"
|
|
|
|
|
|
property string _pendingConn: ""
|
|
|
|
|
|
property string _pendingType: ""
|
|
|
|
|
|
property string _pendingDevice: ""
|
|
|
|
|
|
property var _pendingNets: []
|
|
|
|
|
|
|
2026-06-11 11:03:24 +01:00
|
|
|
|
// Event-driven: `nmcli monitor` prints a line on every
|
|
|
|
|
|
// NetworkManager event; debounce bursts into one refresh.
|
|
|
|
|
|
Process {
|
|
|
|
|
|
id: netMonitor
|
|
|
|
|
|
command: [Commands.nmcli, "monitor"]
|
|
|
|
|
|
running: true
|
|
|
|
|
|
stdout: SplitParser {
|
|
|
|
|
|
onRead: data => netRefreshDebounce.restart()
|
|
|
|
|
|
}
|
|
|
|
|
|
onRunningChanged: if (!running) netMonitorRestart.start()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
|
|
id: netRefreshDebounce
|
|
|
|
|
|
interval: 500
|
|
|
|
|
|
onTriggered: netWidget.refreshNet()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 10:00:02 +01:00
|
|
|
|
Timer {
|
2026-06-11 11:03:24 +01:00
|
|
|
|
id: netMonitorRestart
|
2026-06-11 10:00:02 +01:00
|
|
|
|
interval: 5000
|
2026-06-11 11:03:24 +01:00
|
|
|
|
onTriggered: netMonitor.running = true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Slow fallback poll in case the monitor dies quietly
|
|
|
|
|
|
Timer {
|
|
|
|
|
|
interval: 60000
|
2026-06-11 10:00:02 +01:00
|
|
|
|
running: true
|
|
|
|
|
|
repeat: true
|
|
|
|
|
|
triggeredOnStart: true
|
|
|
|
|
|
onTriggered: netWidget.refreshNet()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function refreshNet() {
|
|
|
|
|
|
netWidget._pendingState = "disconnected";
|
|
|
|
|
|
netWidget._pendingConn = "";
|
|
|
|
|
|
netWidget._pendingType = "";
|
|
|
|
|
|
netProc.running = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Process {
|
|
|
|
|
|
id: netProc
|
|
|
|
|
|
command: [Commands.nmcli, "-t", "-f", "DEVICE,TYPE,STATE,CONNECTION", "device"]
|
|
|
|
|
|
stdout: SplitParser {
|
|
|
|
|
|
onRead: data => {
|
|
|
|
|
|
let fields = data.split(":");
|
|
|
|
|
|
if (fields.length < 4) return;
|
|
|
|
|
|
let type = fields[1];
|
|
|
|
|
|
let state = fields[2];
|
|
|
|
|
|
let conn = fields[3];
|
|
|
|
|
|
if (type !== "ethernet" && type !== "wifi") return;
|
|
|
|
|
|
if (type === "wifi") {
|
|
|
|
|
|
netWidget._pendingDevice = fields[0];
|
|
|
|
|
|
}
|
|
|
|
|
|
if (state === "connected") {
|
|
|
|
|
|
netWidget._pendingState = "connected";
|
|
|
|
|
|
netWidget._pendingConn = conn;
|
|
|
|
|
|
netWidget._pendingType = type;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
onRunningChanged: {
|
|
|
|
|
|
if (!running) {
|
|
|
|
|
|
netWidget.netState = netWidget._pendingState;
|
|
|
|
|
|
netWidget.netConn = netWidget._pendingConn;
|
|
|
|
|
|
netWidget.netType = netWidget._pendingType.length > 0 ? netWidget._pendingType : netWidget.netType;
|
|
|
|
|
|
netWidget.netDevice = netWidget._pendingDevice.length > 0 ? netWidget._pendingDevice : netWidget.netDevice;
|
|
|
|
|
|
if (netWidget.netState === "connected") {
|
2026-06-12 14:06:20 +01:00
|
|
|
|
netWidget.netIcon = netWidget.netType === "wifi" ? "wifi" : "lan";
|
2026-06-11 10:00:02 +01:00
|
|
|
|
} else {
|
2026-06-12 14:06:20 +01:00
|
|
|
|
netWidget.netIcon = netWidget.netType === "wifi" ? "wifi_off" : "settings_ethernet";
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
2026-06-11 10:00:02 +01:00
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
text: netWidget.netIcon
|
|
|
|
|
|
color: Theme.base05
|
2026-06-12 14:06:20 +01:00
|
|
|
|
font.pixelSize: 16
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
|
|
id: netRefreshDelay
|
|
|
|
|
|
interval: 2000
|
|
|
|
|
|
onTriggered: netWidget.refreshNet()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Process {
|
|
|
|
|
|
id: wifiScanProc
|
|
|
|
|
|
command: [Commands.nmcli, "-t", "-f", "SSID,SIGNAL,SECURITY,IN-USE", "device", "wifi", "list", "--rescan", "auto"]
|
|
|
|
|
|
stdout: SplitParser {
|
|
|
|
|
|
onRead: data => {
|
|
|
|
|
|
let fields = data.split(":");
|
|
|
|
|
|
if (fields.length < 4 || fields[0] === "") return;
|
|
|
|
|
|
for (let i = 0; i < netWidget._pendingNets.length; i++) {
|
|
|
|
|
|
if (netWidget._pendingNets[i].ssid === fields[0]) return;
|
|
|
|
|
|
}
|
|
|
|
|
|
netWidget._pendingNets.push({
|
|
|
|
|
|
ssid: fields[0],
|
|
|
|
|
|
signal: parseInt(fields[1]) || 0,
|
|
|
|
|
|
security: fields[2],
|
|
|
|
|
|
active: fields[3] === "*"
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
onRunningChanged: {
|
|
|
|
|
|
if (!running) {
|
|
|
|
|
|
netWidget.wifiNetworks = netWidget._pendingNets;
|
|
|
|
|
|
netWidget._pendingNets = [];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Process {
|
|
|
|
|
|
id: wifiConnectProc
|
|
|
|
|
|
property string targetSsid: ""
|
|
|
|
|
|
command: [Commands.wifiConnect, targetSsid]
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Process {
|
|
|
|
|
|
id: netDisconnectProc
|
|
|
|
|
|
property string targetDevice: ""
|
|
|
|
|
|
command: [Commands.nmcli, "device", "disconnect", targetDevice]
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function openNetDropdown() {
|
|
|
|
|
|
bar.toggleDropdown(netDropdown, function() {
|
|
|
|
|
|
wifiScanProc.running = true;
|
2026-07-28 13:09:49 +01:00
|
|
|
|
let pos = netWidget.mapToItem(bar.contentItem, 0, netWidget.height / 2);
|
|
|
|
|
|
netDropdown.dropdownY = pos.y;
|
2026-06-11 10:00:02 +01:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
onClicked: netWidget.openNetDropdown()
|
|
|
|
|
|
onEntered: {
|
|
|
|
|
|
if (bar.activeDropdown) {
|
|
|
|
|
|
if (bar.activeDropdown !== netDropdown) netWidget.openNetDropdown();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
${lib.optionalString isMacbook ''
|
|
|
|
|
|
// Battery
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: batteryWidget
|
2026-07-28 13:09:49 +01:00
|
|
|
|
width: Theme.barWidth
|
|
|
|
|
|
height: batteryCol.height
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-11 11:03:24 +01:00
|
|
|
|
// Live DBus-driven properties from the UPower service —
|
|
|
|
|
|
// no polling, no /sys parsing, no subprocess spawns.
|
|
|
|
|
|
property var dev: UPower.displayDevice
|
|
|
|
|
|
property int batteryLevel: dev && dev.ready ? Math.round(dev.percentage * 100) : 0
|
|
|
|
|
|
property bool charging: dev ? dev.state === UPowerDeviceState.Charging : false
|
|
|
|
|
|
property real powerDraw: dev ? Math.abs(dev.changeRate) : 0.0
|
|
|
|
|
|
property string timeRemaining: {
|
|
|
|
|
|
if (!dev) return "";
|
|
|
|
|
|
let secs = charging ? dev.timeToFull : dev.timeToEmpty;
|
|
|
|
|
|
if (!secs || secs <= 0) return "";
|
|
|
|
|
|
let h = Math.floor(secs / 3600);
|
|
|
|
|
|
let m = Math.round((secs % 3600) / 60);
|
|
|
|
|
|
return h + "h " + m + "m";
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
2026-06-11 11:03:24 +01:00
|
|
|
|
property string powerProfile:
|
|
|
|
|
|
PowerProfiles.profile === PowerProfile.PowerSaver ? "power-saver"
|
|
|
|
|
|
: PowerProfiles.profile === PowerProfile.Performance ? "performance"
|
|
|
|
|
|
: "balanced"
|
2026-06-12 14:06:20 +01:00
|
|
|
|
property string batteryIcon: charging ? "battery_charging_full"
|
|
|
|
|
|
: batteryLevel >= 90 ? "battery_full"
|
|
|
|
|
|
: batteryLevel >= 70 ? "battery_6_bar"
|
|
|
|
|
|
: batteryLevel >= 50 ? "battery_5_bar"
|
|
|
|
|
|
: batteryLevel >= 30 ? "battery_3_bar"
|
|
|
|
|
|
: batteryLevel >= 15 ? "battery_2_bar"
|
|
|
|
|
|
: "battery_alert"
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Stacked: icon over percentage. Side by side no longer
|
|
|
|
|
|
// fits, but the level is worth keeping on a laptop.
|
|
|
|
|
|
Column {
|
|
|
|
|
|
id: batteryCol
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
spacing: 0
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
SIcon {
|
|
|
|
|
|
id: batteryIconText
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: batteryWidget.batteryIcon
|
2026-06-11 10:00:02 +01:00
|
|
|
|
color: batteryWidget.batteryLevel <= 15 ? Theme.base08
|
|
|
|
|
|
: batteryWidget.batteryLevel <= 30 ? Theme.base0A
|
|
|
|
|
|
: Theme.base05
|
2026-07-28 13:09:49 +01:00
|
|
|
|
font.pixelSize: 18
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
id: batteryText
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: batteryWidget.batteryLevel
|
2026-06-11 10:00:02 +01:00
|
|
|
|
color: batteryWidget.batteryLevel <= 15 ? Theme.base08
|
|
|
|
|
|
: batteryWidget.batteryLevel <= 30 ? Theme.base0A
|
|
|
|
|
|
: Theme.base05
|
2026-07-28 13:09:49 +01:00
|
|
|
|
font.pixelSize: 10
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function openBatteryDropdown() {
|
|
|
|
|
|
bar.toggleDropdown(batteryDropdown, function() {
|
2026-07-28 13:09:49 +01:00
|
|
|
|
let pos = batteryWidget.mapToItem(bar.contentItem, 0, batteryWidget.height / 2);
|
|
|
|
|
|
batteryDropdown.dropdownY = pos.y;
|
2026-07-08 13:26:08 +01:00
|
|
|
|
brightRead.running = true; // refresh sliders on open
|
2026-06-11 10:00:02 +01:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
onClicked: batteryWidget.openBatteryDropdown()
|
|
|
|
|
|
onEntered: {
|
|
|
|
|
|
if (bar.activeDropdown) {
|
|
|
|
|
|
if (bar.activeDropdown !== batteryDropdown) batteryWidget.openBatteryDropdown();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
''}
|
|
|
|
|
|
|
2026-07-08 13:26:08 +01:00
|
|
|
|
${lib.optionalString (!isMacbook) ''
|
|
|
|
|
|
// Quick settings (night light) — no battery widget on the
|
|
|
|
|
|
// desktop, so the card gets its own bar icon.
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: qsWidget
|
2026-07-28 13:09:49 +01:00
|
|
|
|
width: Theme.barWidth
|
|
|
|
|
|
height: 26
|
2026-07-08 13:26:08 +01:00
|
|
|
|
|
|
|
|
|
|
SIcon {
|
|
|
|
|
|
id: qsIcon
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: "nightlight"
|
|
|
|
|
|
font.pixelSize: 16
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function openQsDropdown() {
|
|
|
|
|
|
bar.toggleDropdown(qsDropdown, function() {
|
2026-07-28 13:09:49 +01:00
|
|
|
|
let pos = qsWidget.mapToItem(bar.contentItem, 0, qsWidget.height / 2);
|
|
|
|
|
|
qsDropdown.dropdownY = pos.y;
|
2026-07-08 13:26:08 +01:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
onClicked: qsWidget.openQsDropdown()
|
|
|
|
|
|
onEntered: {
|
|
|
|
|
|
if (bar.activeDropdown) {
|
|
|
|
|
|
if (bar.activeDropdown !== qsDropdown) qsWidget.openQsDropdown();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
''}
|
|
|
|
|
|
|
2026-07-28 13:15:06 +01:00
|
|
|
|
// Group separator: status icons / tray / power read
|
|
|
|
|
|
// as three clusters instead of one clump.
|
|
|
|
|
|
Item { width: Theme.barWidth; height: 5 }
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Tray icons — stacked, like everything else in the column
|
|
|
|
|
|
Column {
|
2026-06-11 10:00:02 +01:00
|
|
|
|
id: trayArea
|
|
|
|
|
|
spacing: 8
|
2026-07-28 13:09:49 +01:00
|
|
|
|
width: Theme.barWidth
|
2026-06-11 10:00:02 +01:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
|
|
model: SystemTray.items
|
|
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
|
required property var modelData
|
2026-07-28 13:09:49 +01:00
|
|
|
|
width: Theme.barWidth
|
|
|
|
|
|
height: 24
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
Image {
|
|
|
|
|
|
id: trayIcon
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
width: 16
|
|
|
|
|
|
height: 16
|
|
|
|
|
|
source: modelData.icon
|
|
|
|
|
|
sourceSize.width: 16
|
|
|
|
|
|
sourceSize.height: 16
|
|
|
|
|
|
smooth: true
|
|
|
|
|
|
mipmap: true
|
|
|
|
|
|
visible: false
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ColorOverlay {
|
|
|
|
|
|
anchors.fill: trayIcon
|
|
|
|
|
|
source: trayIcon
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
acceptedButtons: Qt.NoButton
|
|
|
|
|
|
onEntered: {
|
|
|
|
|
|
if (bar.activeDropdown) {
|
|
|
|
|
|
if (modelData.hasMenu && !(bar.activeDropdown === contextMenu && contextMenu.trayItem === modelData)) {
|
|
|
|
|
|
if (bar.activeDropdown === contextMenu) {
|
|
|
|
|
|
// Same dropdown, just switch content
|
2026-07-28 13:09:49 +01:00
|
|
|
|
let pos = parent.mapToItem(bar.contentItem, 0, parent.height / 2);
|
|
|
|
|
|
contextMenu.dropdownY = pos.y;
|
2026-06-11 10:00:02 +01:00
|
|
|
|
contextMenu.trayItem = modelData;
|
|
|
|
|
|
menuOpener.menu = modelData.menu;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
bar.toggleDropdown(contextMenu, function() {
|
2026-07-28 13:09:49 +01:00
|
|
|
|
let pos = parent.mapToItem(bar.contentItem, 0, parent.height / 2);
|
|
|
|
|
|
contextMenu.dropdownY = pos.y;
|
2026-06-11 10:00:02 +01:00
|
|
|
|
contextMenu.trayItem = modelData;
|
|
|
|
|
|
menuOpener.menu = modelData.menu;
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
|
|
|
|
|
onClicked: (event) => {
|
|
|
|
|
|
if (modelData.hasMenu) {
|
|
|
|
|
|
bar.toggleDropdown(contextMenu, function() {
|
2026-07-28 13:09:49 +01:00
|
|
|
|
let pos = parent.mapToItem(bar.contentItem, 0, parent.height / 2);
|
|
|
|
|
|
contextMenu.dropdownY = pos.y;
|
2026-06-11 10:00:02 +01:00
|
|
|
|
contextMenu.trayItem = modelData;
|
|
|
|
|
|
menuOpener.menu = modelData.menu;
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
modelData.activate();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-07-28 13:09:49 +01:00
|
|
|
|
|
2026-07-28 13:15:06 +01:00
|
|
|
|
// Group separator: status icons / tray / power read
|
|
|
|
|
|
// as three clusters instead of one clump.
|
|
|
|
|
|
Item { width: Theme.barWidth; height: 5 }
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Power menu opener — bottom-left corner. Opens the same
|
|
|
|
|
|
// session menu as Super+L, which now unfolds from here.
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: powerWidget
|
|
|
|
|
|
width: Theme.barWidth
|
|
|
|
|
|
height: 26
|
|
|
|
|
|
|
|
|
|
|
|
SIcon {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
text: "power_settings_new"
|
|
|
|
|
|
color: powerMa.containsMouse || sessionMenu.open ? Theme.base08 : Theme.base05
|
|
|
|
|
|
font.pixelSize: 18
|
|
|
|
|
|
Behavior on color { ColorAnimation { duration: Theme.animFade } }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
id: powerMa
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: bar.toggleSession()
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 19:45:29 +01:00
|
|
|
|
// Dropdown container — content, sizing and autoclose only.
|
|
|
|
|
|
// The background, border and ears are drawn once by the shared
|
|
|
|
|
|
// `chrome` panel below, which morphs between dropdowns.
|
2026-06-11 10:00:02 +01:00
|
|
|
|
component BarDropdown: Item {
|
|
|
|
|
|
id: dropdown
|
|
|
|
|
|
property bool open: false
|
|
|
|
|
|
property bool closing: false
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Vertical centre of the widget that owns this dropdown;
|
|
|
|
|
|
// the panel tracks it, clamped to the screen. The old
|
|
|
|
|
|
// flush-to-far-edge special case is gone — the SDF melt
|
|
|
|
|
|
// already makes a clamped panel meet the frame cleanly.
|
|
|
|
|
|
property real dropdownY: 0
|
2026-06-11 10:00:02 +01:00
|
|
|
|
property real fullWidth: 200
|
|
|
|
|
|
property real fullHeight: 200
|
2026-07-28 13:09:49 +01:00
|
|
|
|
property real dropdownWidth: open ? fullWidth : 0
|
2026-06-11 10:00:02 +01:00
|
|
|
|
default property alias content: dropdownContent.data
|
|
|
|
|
|
|
|
|
|
|
|
function animateClose() {
|
|
|
|
|
|
if (!visible || closing) return;
|
|
|
|
|
|
closing = true;
|
|
|
|
|
|
open = false;
|
2026-06-11 20:32:19 +01:00
|
|
|
|
// Collapse the chrome immediately so the content fade
|
|
|
|
|
|
// and the panel animation run together (when switching
|
|
|
|
|
|
// dropdowns, toggleDropdown retargets activeDropdown
|
|
|
|
|
|
// first, so this doesn't fire and the chrome morphs).
|
2026-06-12 08:52:53 +01:00
|
|
|
|
// The panel also shrinks back toward its widget.
|
|
|
|
|
|
if (bar.activeDropdown === dropdown) {
|
|
|
|
|
|
bar.activeDropdown = null;
|
|
|
|
|
|
chrome.shrinkToButton(dropdown);
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
_closeDelay.start();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 20:01:20 +01:00
|
|
|
|
// Reopen a dropdown that's mid-close: the pending hide
|
|
|
|
|
|
// timer must be cancelled, otherwise it fires later and
|
|
|
|
|
|
// closes the revived dropdown (and the whole chrome).
|
|
|
|
|
|
function revive() {
|
|
|
|
|
|
_closeDelay.stop();
|
|
|
|
|
|
closing = false;
|
|
|
|
|
|
open = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
x: Theme.barWidth
|
|
|
|
|
|
y: Math.round(Math.min(bar.height - Theme.frameWidth - height,
|
|
|
|
|
|
Math.max(Theme.frameWidth, dropdownY - height / 2)))
|
|
|
|
|
|
width: fullWidth + 4
|
|
|
|
|
|
height: fullHeight + 16
|
2026-06-11 10:00:02 +01:00
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
|
|
|
|
onVisibleChanged: {
|
|
|
|
|
|
if (visible) {
|
|
|
|
|
|
closing = false;
|
|
|
|
|
|
open = true;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
open = false;
|
|
|
|
|
|
closing = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
|
|
id: _closeDelay
|
2026-06-11 20:32:19 +01:00
|
|
|
|
interval: 300
|
2026-06-11 10:00:02 +01:00
|
|
|
|
onTriggered: { dropdown.visible = false; dropdown.closing = false; if (bar.activeDropdown === dropdown) bar.activeDropdown = null; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 20:32:19 +01:00
|
|
|
|
// Content is clipped to the chrome's ANIMATED geometry —
|
|
|
|
|
|
// revealed as the panel slides/grows over it and wiped as
|
|
|
|
|
|
// the panel leaves, instead of popping in place. The inner
|
|
|
|
|
|
// item counter-offsets so content stays put while the clip
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// window moves across it. Growth axis is now x (rightward);
|
|
|
|
|
|
// the clip's height is the chrome's inner cross-axis span.
|
2026-06-11 10:00:02 +01:00
|
|
|
|
Item {
|
2026-06-11 19:45:29 +01:00
|
|
|
|
id: _dropdownRect
|
2026-07-28 13:09:49 +01:00
|
|
|
|
x: 0
|
|
|
|
|
|
y: (chrome.y + 8) - dropdown.y
|
|
|
|
|
|
width: Math.min(dropdown.fullWidth, chrome.width)
|
|
|
|
|
|
height: Math.max(0, chrome.height - 16)
|
2026-06-11 10:00:02 +01:00
|
|
|
|
clip: true
|
2026-06-11 19:45:29 +01:00
|
|
|
|
opacity: dropdown.open ? 1 : 0
|
|
|
|
|
|
Behavior on opacity {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animContent; easing.type: Easing.OutCubic }
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 19:45:29 +01:00
|
|
|
|
Item {
|
|
|
|
|
|
id: dropdownContent
|
2026-07-28 13:09:49 +01:00
|
|
|
|
y: 8 - _dropdownRect.y
|
2026-06-11 19:45:29 +01:00
|
|
|
|
width: dropdown.fullWidth
|
|
|
|
|
|
height: dropdown.fullHeight
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 19:45:29 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-11 19:45:29 +01:00
|
|
|
|
// The shared morphing panel: follows the active dropdown's
|
|
|
|
|
|
// geometry with animation (the caelestia-style morph), snaps
|
|
|
|
|
|
// instantly when opening from closed.
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: chrome
|
2026-07-28 13:09:49 +01:00
|
|
|
|
property real tY: 0
|
|
|
|
|
|
property real tH: 200
|
|
|
|
|
|
property real tW: 0
|
|
|
|
|
|
property real openW: bar.activeDropdown ? tW : 0
|
2026-06-12 08:52:53 +01:00
|
|
|
|
property bool snap: false
|
2026-07-28 13:09:49 +01:00
|
|
|
|
readonly property real stubH: 32
|
2026-06-12 08:52:53 +01:00
|
|
|
|
|
|
|
|
|
|
// Grow-from / shrink-to the widget that owns the dropdown:
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// the panel opens as a small stub beside the button and
|
|
|
|
|
|
// expands rightward; closing retargets back to the stub
|
|
|
|
|
|
// while the width collapses.
|
|
|
|
|
|
function stubY(dd) {
|
|
|
|
|
|
return Math.round(Math.min(bar.height - Theme.frameWidth - stubH, Math.max(Theme.frameWidth, dd.dropdownY - stubH / 2)));
|
|
|
|
|
|
}
|
2026-06-12 08:52:53 +01:00
|
|
|
|
function seedFromButton(dd) {
|
|
|
|
|
|
snap = true;
|
2026-07-28 13:09:49 +01:00
|
|
|
|
tY = stubY(dd);
|
|
|
|
|
|
tH = stubH;
|
2026-06-12 08:52:53 +01:00
|
|
|
|
snap = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
function shrinkToButton(dd) {
|
2026-07-28 13:09:49 +01:00
|
|
|
|
tY = stubY(dd);
|
|
|
|
|
|
tH = stubH;
|
2026-06-12 08:52:53 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
x: Theme.barWidth
|
|
|
|
|
|
y: tY
|
|
|
|
|
|
width: openW
|
|
|
|
|
|
height: tH
|
|
|
|
|
|
visible: width > 0.5
|
2026-06-11 19:45:29 +01:00
|
|
|
|
|
|
|
|
|
|
Binding {
|
2026-07-28 13:09:49 +01:00
|
|
|
|
target: chrome; property: "tY"
|
|
|
|
|
|
value: bar.activeDropdown ? bar.activeDropdown.y : 0
|
2026-06-11 19:45:29 +01:00
|
|
|
|
when: bar.activeDropdown !== null
|
|
|
|
|
|
restoreMode: Binding.RestoreNone
|
|
|
|
|
|
}
|
|
|
|
|
|
Binding {
|
|
|
|
|
|
target: chrome; property: "tH"
|
2026-07-28 13:09:49 +01:00
|
|
|
|
value: bar.activeDropdown ? bar.activeDropdown.height : 0
|
2026-06-11 19:45:29 +01:00
|
|
|
|
when: bar.activeDropdown !== null
|
|
|
|
|
|
restoreMode: Binding.RestoreNone
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
2026-06-11 20:10:37 +01:00
|
|
|
|
Binding {
|
2026-07-28 13:09:49 +01:00
|
|
|
|
target: chrome; property: "tW"
|
|
|
|
|
|
value: bar.activeDropdown ? bar.activeDropdown.fullWidth + 4 : 0
|
2026-06-11 20:10:37 +01:00
|
|
|
|
when: bar.activeDropdown !== null
|
|
|
|
|
|
restoreMode: Binding.RestoreNone
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
Behavior on tY {
|
2026-06-12 08:52:53 +01:00
|
|
|
|
enabled: !chrome.snap
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animMorph; easing.type: Easing.OutExpo }
|
2026-06-11 19:45:29 +01:00
|
|
|
|
}
|
2026-07-28 13:09:49 +01:00
|
|
|
|
Behavior on tH {
|
2026-06-12 08:52:53 +01:00
|
|
|
|
enabled: !chrome.snap
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animMorph; easing.type: Easing.OutExpo }
|
2026-06-11 19:45:29 +01:00
|
|
|
|
}
|
2026-07-28 13:09:49 +01:00
|
|
|
|
Behavior on openW {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animMorph; easing.type: Easing.OutExpo }
|
2026-06-11 19:45:29 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Context menu
|
|
|
|
|
|
BarDropdown {
|
|
|
|
|
|
id: contextMenu
|
|
|
|
|
|
property var trayItem: null
|
2026-07-08 14:05:05 +01:00
|
|
|
|
fullWidth: menuItems.width + 2 * Theme.panelGap
|
|
|
|
|
|
fullHeight: menuItems.height + 2 * Theme.panelGap
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
onVisibleChanged: {
|
|
|
|
|
|
if (!visible) menuOpener.menu = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QsMenuOpener {
|
|
|
|
|
|
id: menuOpener
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-17 13:52:15 +01:00
|
|
|
|
Card {
|
2026-06-11 10:00:02 +01:00
|
|
|
|
id: menuItems
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
width: 200
|
2026-06-17 13:52:15 +01:00
|
|
|
|
cardSpacing: 0
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
|
|
model: menuOpener.children
|
|
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
required property var modelData
|
2026-06-17 13:52:15 +01:00
|
|
|
|
width: parent.width
|
2026-06-11 10:00:02 +01:00
|
|
|
|
height: modelData.isSeparator ? 9 : 28
|
|
|
|
|
|
color: !modelData.isSeparator && itemMouse.containsMouse && modelData.enabled
|
2026-06-17 12:52:52 +01:00
|
|
|
|
? Theme.base02 : Theme.base02t
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Behavior on color { ColorAnimation { duration: Theme.animFade } }
|
2026-06-11 10:00:02 +01:00
|
|
|
|
radius: modelData.isSeparator ? 0 : 4
|
|
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
visible: modelData.isSeparator
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
width: parent.width - 20
|
|
|
|
|
|
height: 1
|
|
|
|
|
|
color: Theme.base03
|
|
|
|
|
|
}
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Item {
|
2026-06-11 10:00:02 +01:00
|
|
|
|
visible: !modelData.isSeparator
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
anchors.leftMargin: 10
|
|
|
|
|
|
anchors.rightMargin: 10
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
id: menuCheck
|
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2026-06-11 10:00:02 +01:00
|
|
|
|
visible: modelData.buttonType !== QsMenuButtonType.None
|
|
|
|
|
|
text: modelData.checkState === Qt.Checked ? "\u2713" : ""
|
|
|
|
|
|
color: Theme.base0D
|
|
|
|
|
|
font.pixelSize: 12
|
|
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
|
|
|
|
|
|
SText {
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.right: menuCheck.visible ? menuCheck.left : parent.right
|
|
|
|
|
|
anchors.rightMargin: menuCheck.visible ? 8 : 0
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: modelData.text ?? ""
|
|
|
|
|
|
color: modelData.enabled ? Theme.base05 : Theme.base03
|
|
|
|
|
|
font.pixelSize: 12
|
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
id: itemMouse
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
enabled: !modelData.isSeparator && modelData.enabled
|
|
|
|
|
|
onClicked: {
|
|
|
|
|
|
modelData.triggered();
|
|
|
|
|
|
bar.closeAllDropdowns();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Volume dropdown
|
|
|
|
|
|
BarDropdown {
|
|
|
|
|
|
id: volDropdown
|
2026-07-08 14:05:05 +01:00
|
|
|
|
fullWidth: volDropdownCol.width + 2 * Theme.panelGap
|
|
|
|
|
|
fullHeight: volDropdownCol.height + 2 * Theme.panelGap
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
|
id: volDropdownCol
|
|
|
|
|
|
anchors.centerIn: parent
|
2026-06-12 10:41:13 +01:00
|
|
|
|
width: 268
|
|
|
|
|
|
spacing: 8
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-12 10:41:13 +01:00
|
|
|
|
// Master volume card
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Card {
|
2026-06-12 10:41:13 +01:00
|
|
|
|
width: parent.width
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Row {
|
|
|
|
|
|
spacing: 6
|
2026-06-17 13:22:28 +01:00
|
|
|
|
VolIcon { anchors.verticalCenter: parent.verticalCenter; audioNode: volWidget.sink ? volWidget.sink.audio : null }
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: "Master"
|
|
|
|
|
|
font.weight: Font.Medium
|
2026-06-12 10:41:13 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
}
|
2026-06-12 10:41:13 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Row {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 8
|
2026-06-12 10:41:13 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
PillSlider {
|
|
|
|
|
|
width: parent.width - masterVolLabel.width - 8
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
value: volWidget.sink && volWidget.sink.audio ? Math.min(1, volWidget.sink.audio.volume) : 0
|
|
|
|
|
|
fillColor: volWidget.muted ? Theme.base03 : Theme.base0D
|
|
|
|
|
|
onMoved: (v) => { if (volWidget.sink && volWidget.sink.audio) volWidget.sink.audio.volume = v; }
|
|
|
|
|
|
}
|
2026-06-12 10:41:13 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
id: masterVolLabel
|
|
|
|
|
|
width: 36
|
|
|
|
|
|
text: volWidget.vol + "%"
|
|
|
|
|
|
font.pixelSize: 11
|
|
|
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-12 10:41:13 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
// Mute button
|
2026-06-17 13:59:26 +01:00
|
|
|
|
HoverRow {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: 28
|
2026-06-17 13:59:26 +01:00
|
|
|
|
onClicked: {
|
|
|
|
|
|
if (volWidget.sink && volWidget.sink.audio)
|
|
|
|
|
|
volWidget.sink.audio.muted = !volWidget.sink.audio.muted;
|
|
|
|
|
|
}
|
2026-06-12 10:41:13 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Row {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
spacing: 6
|
|
|
|
|
|
SIcon {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: volWidget.muted ? "volume_off" : "volume_up"
|
|
|
|
|
|
font.pixelSize: 15
|
2026-06-12 10:41:13 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
2026-06-12 10:41:13 +01:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
text: volWidget.muted ? "Unmute" : "Mute"
|
|
|
|
|
|
font.pixelSize: 12
|
2026-06-12 10:41:13 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
2026-06-12 10:41:13 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-12 10:41:13 +01:00
|
|
|
|
// Applications card
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Card {
|
2026-06-12 10:41:13 +01:00
|
|
|
|
visible: appStreamsCol.childrenRect.height > 0
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Row {
|
|
|
|
|
|
spacing: 6
|
|
|
|
|
|
SIcon { anchors.verticalCenter: parent.verticalCenter; text: "graphic_eq" }
|
|
|
|
|
|
SText {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: "Applications"
|
|
|
|
|
|
font.weight: Font.Medium
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Per-app streams
|
2026-06-12 10:41:13 +01:00
|
|
|
|
Column {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
id: appStreamsCol
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 6
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Repeater {
|
|
|
|
|
|
id: appStreamsRepeater
|
|
|
|
|
|
model: Pipewire.nodes
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Column {
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 2
|
|
|
|
|
|
visible: modelData.isStream && modelData.audio !== null
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
PwObjectTracker {
|
|
|
|
|
|
objects: [modelData]
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
text: modelData.properties["application.name"] || modelData.name || "Unknown"
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 11
|
|
|
|
|
|
elide: Text.ElideRight
|
2026-06-12 10:41:13 +01:00
|
|
|
|
width: parent.width
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Row {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 8
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-17 13:22:28 +01:00
|
|
|
|
VolIcon {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
width: 18
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 15
|
|
|
|
|
|
audioNode: modelData.audio
|
|
|
|
|
|
}
|
|
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
PillSlider {
|
2026-06-17 13:22:28 +01:00
|
|
|
|
width: parent.width - 18 - appVolLabel.width - 16
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
height: 16
|
|
|
|
|
|
trackH: 4
|
|
|
|
|
|
value: modelData.audio ? Math.min(1, modelData.audio.volume) : 0
|
|
|
|
|
|
fillColor: modelData.audio && modelData.audio.muted ? Theme.base03 : Theme.base0C
|
|
|
|
|
|
onMoved: (v) => { if (modelData.audio) modelData.audio.volume = v; }
|
2026-06-12 10:41:13 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
id: appVolLabel
|
|
|
|
|
|
width: 36
|
|
|
|
|
|
text: modelData.audio ? Math.round(modelData.audio.volume * 100) + "%" : "0%"
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 10
|
|
|
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-12 10:41:13 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Network dropdown
|
|
|
|
|
|
BarDropdown {
|
|
|
|
|
|
id: netDropdown
|
2026-07-08 14:05:05 +01:00
|
|
|
|
fullWidth: netDropdownCol.width + 2 * Theme.panelGap
|
|
|
|
|
|
fullHeight: netDropdownCol.height + 2 * Theme.panelGap
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
|
id: netDropdownCol
|
|
|
|
|
|
anchors.centerIn: parent
|
2026-06-12 14:06:20 +01:00
|
|
|
|
width: 228
|
|
|
|
|
|
spacing: 8
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-12 14:06:20 +01:00
|
|
|
|
// Connection card
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Card {
|
2026-06-12 14:06:20 +01:00
|
|
|
|
width: parent.width
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
cardSpacing: 4
|
|
|
|
|
|
Row {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 6
|
2026-06-12 14:06:20 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: netWidget.netState === "connected" ? "wifi" : "wifi_off"
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.pixelSize: 16
|
|
|
|
|
|
}
|
2026-06-12 14:06:20 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
width: parent.width - 22
|
|
|
|
|
|
text: netWidget.netState === "connected"
|
|
|
|
|
|
? netWidget.netConn : "Not connected"
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.pixelSize: 13
|
|
|
|
|
|
font.weight: Font.Medium
|
|
|
|
|
|
elide: Text.ElideRight
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-17 13:59:26 +01:00
|
|
|
|
HoverRow {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
visible: netWidget.netState === "connected"
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: 28
|
2026-06-17 13:59:26 +01:00
|
|
|
|
onClicked: {
|
|
|
|
|
|
netDisconnectProc.targetDevice = netWidget.netDevice;
|
|
|
|
|
|
netDisconnectProc.running = true;
|
|
|
|
|
|
netWidget.netState = "disconnected";
|
|
|
|
|
|
netWidget.netConn = "";
|
|
|
|
|
|
netWidget.netIcon = "wifi_off";
|
|
|
|
|
|
bar.closeAllDropdowns();
|
|
|
|
|
|
netRefreshDelay.start();
|
|
|
|
|
|
}
|
2026-06-12 14:06:20 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
text: "Disconnect"
|
|
|
|
|
|
color: Theme.base08
|
|
|
|
|
|
font.pixelSize: 12
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
2026-06-12 14:06:20 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-12 14:06:20 +01:00
|
|
|
|
// Available networks card
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Card {
|
2026-06-12 14:06:20 +01:00
|
|
|
|
width: parent.width
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
cardSpacing: 4
|
|
|
|
|
|
SText {
|
|
|
|
|
|
text: "Available networks"
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 11
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Repeater {
|
|
|
|
|
|
model: netWidget.wifiNetworks
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-17 13:59:26 +01:00
|
|
|
|
HoverRow {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
required property var modelData
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: 32
|
2026-06-17 13:59:26 +01:00
|
|
|
|
onClicked: {
|
|
|
|
|
|
if (!modelData.active) {
|
|
|
|
|
|
wifiConnectProc.targetSsid = modelData.ssid;
|
|
|
|
|
|
wifiConnectProc.running = true;
|
|
|
|
|
|
netRefreshDelay.start();
|
|
|
|
|
|
}
|
|
|
|
|
|
bar.closeAllDropdowns();
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Row {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.leftMargin: 8
|
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
anchors.rightMargin: 8
|
|
|
|
|
|
spacing: 8
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
|
|
|
|
|
text: {
|
|
|
|
|
|
let s = modelData.signal;
|
|
|
|
|
|
if (s >= 75) return "signal_wifi_4_bar";
|
|
|
|
|
|
if (s >= 50) return "network_wifi_3_bar";
|
|
|
|
|
|
if (s >= 25) return "network_wifi_2_bar";
|
|
|
|
|
|
return "network_wifi_1_bar";
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
color: modelData.active ? Theme.base0B : Theme.base04
|
|
|
|
|
|
font.pixelSize: 16
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
text: modelData.ssid
|
|
|
|
|
|
color: modelData.active ? Theme.base0B : Theme.base05
|
|
|
|
|
|
font.pixelSize: 12
|
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
|
width: 140
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
|
|
|
|
|
visible: modelData.security !== "" && modelData.security !== "--"
|
|
|
|
|
|
text: "lock"
|
|
|
|
|
|
color: Theme.base03
|
|
|
|
|
|
font.pixelSize: 13
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-12 14:06:20 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
${lib.optionalString isMacbook ''
|
|
|
|
|
|
// Battery dropdown
|
|
|
|
|
|
BarDropdown {
|
|
|
|
|
|
id: batteryDropdown
|
2026-07-08 14:05:05 +01:00
|
|
|
|
fullWidth: batteryDropdownCol.width + 2 * Theme.panelGap
|
|
|
|
|
|
fullHeight: batteryDropdownCol.height + 2 * Theme.panelGap
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
|
id: batteryDropdownCol
|
|
|
|
|
|
anchors.centerIn: parent
|
2026-06-12 10:41:13 +01:00
|
|
|
|
width: 208
|
|
|
|
|
|
spacing: 8
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-12 10:41:13 +01:00
|
|
|
|
// Battery status card
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Card {
|
2026-06-12 10:41:13 +01:00
|
|
|
|
width: parent.width
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Row {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 8
|
2026-06-12 10:41:13 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
|
|
|
|
|
text: batteryWidget.batteryIcon
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.pixelSize: 22
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Column {
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
SText {
|
|
|
|
|
|
text: batteryWidget.batteryLevel + "%" + (batteryWidget.charging ? " — Charging" : "")
|
2026-06-11 10:00:02 +01:00
|
|
|
|
color: Theme.base05
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
font.pixelSize: 13
|
|
|
|
|
|
font.weight: Font.Medium
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
text: batteryWidget.powerDraw.toFixed(1) + " W"
|
|
|
|
|
|
+ (batteryWidget.timeRemaining !== "" ? " • " + batteryWidget.timeRemaining + (batteryWidget.charging ? " to full" : " left") : "")
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 11
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-12 10:41:13 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-12 10:41:13 +01:00
|
|
|
|
// Power profile card
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Card {
|
2026-06-12 10:41:13 +01:00
|
|
|
|
width: parent.width
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
cardSpacing: 6
|
|
|
|
|
|
SText {
|
|
|
|
|
|
text: "Power Profile"
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 11
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Item {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: 36
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
// Sliding selection pill — glides between
|
|
|
|
|
|
// profiles instead of each button flipping.
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
id: profilePill
|
|
|
|
|
|
readonly property int selIdx:
|
|
|
|
|
|
batteryWidget.powerProfile === "power-saver" ? 0
|
|
|
|
|
|
: batteryWidget.powerProfile === "performance" ? 2
|
|
|
|
|
|
: 1
|
|
|
|
|
|
width: (parent.width - 8) / 3
|
2026-06-12 10:23:35 +01:00
|
|
|
|
height: 36
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
radius: Theme.radiusSmall
|
|
|
|
|
|
color: Theme.base02
|
|
|
|
|
|
border.width: 1
|
|
|
|
|
|
border.color: Theme.base03
|
|
|
|
|
|
x: selIdx * (width + 4)
|
|
|
|
|
|
Behavior on x {
|
|
|
|
|
|
NumberAnimation { duration: 250; easing.type: Easing.OutExpo }
|
2026-06-12 10:23:35 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Row {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
spacing: 4
|
2026-06-12 10:23:35 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Repeater {
|
|
|
|
|
|
model: [
|
|
|
|
|
|
{ name: "power-saver", profile: PowerProfile.PowerSaver, label: "energy_savings_leaf", tip: "Saver" },
|
|
|
|
|
|
{ name: "balanced", profile: PowerProfile.Balanced, label: "balance", tip: "Balanced" },
|
|
|
|
|
|
{ name: "performance", profile: PowerProfile.Performance, label: "speed", tip: "Performance" }
|
|
|
|
|
|
]
|
2026-06-12 10:23:35 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Rectangle {
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
width: (parent.width - 8) / 3
|
|
|
|
|
|
height: 36
|
|
|
|
|
|
radius: Theme.radiusSmall
|
|
|
|
|
|
color: profMouse.containsMouse && batteryWidget.powerProfile !== modelData.name
|
2026-06-17 12:52:52 +01:00
|
|
|
|
? Theme.base02 : Theme.base02t
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Behavior on color { ColorAnimation { duration: Theme.animFade } }
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Column {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
spacing: 1
|
|
|
|
|
|
SIcon {
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: modelData.label
|
2026-06-13 17:45:16 +01:00
|
|
|
|
// Selected = bright, unselected = grey
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
color: batteryWidget.powerProfile === modelData.name
|
2026-06-13 17:45:16 +01:00
|
|
|
|
? Theme.base05 : Theme.base04
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Behavior on color { ColorAnimation { duration: 200 } }
|
|
|
|
|
|
font.pixelSize: 17
|
|
|
|
|
|
}
|
|
|
|
|
|
SText {
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: modelData.tip
|
|
|
|
|
|
color: batteryWidget.powerProfile === modelData.name
|
|
|
|
|
|
? Theme.base05 : Theme.base04
|
|
|
|
|
|
Behavior on color { ColorAnimation { duration: 200 } }
|
|
|
|
|
|
font.pixelSize: 9
|
2026-06-12 10:41:13 +01:00
|
|
|
|
}
|
2026-06-12 10:23:35 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
id: profMouse
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: PowerProfiles.profile = modelData.profile
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-12 10:41:13 +01:00
|
|
|
|
}
|
2026-07-08 13:26:08 +01:00
|
|
|
|
|
|
|
|
|
|
// Brightness card — screen + keyboard backlight.
|
|
|
|
|
|
// Values are read on dropdown open (brightRead); writes
|
|
|
|
|
|
// are debounced latest-wins so a drag doesn't spawn a
|
|
|
|
|
|
// brightnessctl per pixel.
|
|
|
|
|
|
Card {
|
|
|
|
|
|
id: brightCard
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
cardSpacing: 6
|
|
|
|
|
|
property real screenB: 0.5
|
|
|
|
|
|
property real kbdB: 0
|
|
|
|
|
|
|
|
|
|
|
|
SText { text: "Brightness"; color: Theme.base04; font.pixelSize: 11 }
|
|
|
|
|
|
|
|
|
|
|
|
Row {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
SIcon { width: 18; anchors.verticalCenter: parent.verticalCenter; text: "brightness_6"; font.pixelSize: 16 }
|
|
|
|
|
|
PillSlider {
|
|
|
|
|
|
width: parent.width - 26
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
value: brightCard.screenB
|
|
|
|
|
|
onMoved: (v) => { brightCard.screenB = v; screenBTimer.restart(); }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
Row {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
SIcon { width: 18; anchors.verticalCenter: parent.verticalCenter; text: "keyboard"; font.pixelSize: 16 }
|
|
|
|
|
|
PillSlider {
|
|
|
|
|
|
width: parent.width - 26
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
value: brightCard.kbdB
|
|
|
|
|
|
onMoved: (v) => { brightCard.kbdB = v; kbdBTimer.restart(); }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Timer { id: screenBTimer; interval: 80; onTriggered: screenBSet.running = true }
|
|
|
|
|
|
// floor 1%: `set 0%` turns the panel fully off
|
|
|
|
|
|
Process { id: screenBSet; command: ["brightnessctl", "set", Math.max(1, Math.round(brightCard.screenB * 100)) + "%"] }
|
|
|
|
|
|
Timer { id: kbdBTimer; interval: 80; onTriggered: kbdBSet.running = true }
|
|
|
|
|
|
Process { id: kbdBSet; command: ["brightnessctl", "-d", "smc::kbd_backlight", "set", Math.round(brightCard.kbdB * 100) + "%"] }
|
|
|
|
|
|
|
|
|
|
|
|
Process {
|
|
|
|
|
|
id: brightRead
|
|
|
|
|
|
command: ["sh", "-c", "brightnessctl -m; brightnessctl -m -d smc::kbd_backlight"]
|
|
|
|
|
|
stdout: StdioCollector {
|
|
|
|
|
|
// machine-readable: device,class,current,percent%,max
|
|
|
|
|
|
onStreamFinished: {
|
|
|
|
|
|
for (let l of text.trim().split("\n")) {
|
|
|
|
|
|
let f = l.split(",");
|
|
|
|
|
|
if (f.length < 5) continue;
|
|
|
|
|
|
let pct = parseInt(f[3]) / 100;
|
|
|
|
|
|
if (f[0].indexOf("kbd") !== -1) brightCard.kbdB = pct;
|
|
|
|
|
|
else brightCard.screenB = pct;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NightlightCard { width: parent.width }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
''}
|
|
|
|
|
|
|
|
|
|
|
|
${lib.optionalString (!isMacbook) ''
|
|
|
|
|
|
// Quick settings dropdown (desktop) — just the night light.
|
|
|
|
|
|
BarDropdown {
|
|
|
|
|
|
id: qsDropdown
|
2026-07-08 14:05:05 +01:00
|
|
|
|
fullWidth: qsCol.width + 2 * Theme.panelGap
|
|
|
|
|
|
fullHeight: qsCol.height + 2 * Theme.panelGap
|
2026-07-08 13:26:08 +01:00
|
|
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
|
id: qsCol
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
width: 240
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
NightlightCard { width: parent.width }
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
''}
|
|
|
|
|
|
|
2026-06-11 11:23:28 +01:00
|
|
|
|
// Calendar popup — GNOME-style two-pane panel.
|
|
|
|
|
|
// Left: navigable month calendar + 7-day weather strip.
|
|
|
|
|
|
// Right: MPRIS media controls + notification list.
|
2026-06-11 10:00:02 +01:00
|
|
|
|
BarDropdown {
|
|
|
|
|
|
id: calPopup
|
2026-06-11 14:34:19 +01:00
|
|
|
|
// ceil: Text metrics give fractional sizes; fractional rect
|
|
|
|
|
|
// edges render as soft 2px lines
|
2026-07-08 14:05:05 +01:00
|
|
|
|
fullWidth: Math.ceil(calRow.width) + 2 * Theme.panelGap
|
|
|
|
|
|
fullHeight: Math.ceil(calRow.height + 8 + notifCard.height) + 2 * Theme.panelGap
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-11 11:23:28 +01:00
|
|
|
|
// Month being viewed; reset to today when the popup opens
|
|
|
|
|
|
// (via the setup function passed to bar.toggleDropdown).
|
|
|
|
|
|
property int viewYear: clockText.now.getFullYear()
|
|
|
|
|
|
property int viewMonth: clockText.now.getMonth()
|
|
|
|
|
|
function resetView() {
|
|
|
|
|
|
viewYear = clockText.now.getFullYear();
|
|
|
|
|
|
viewMonth = clockText.now.getMonth();
|
2026-06-11 15:01:52 +01:00
|
|
|
|
// Runs on every open: an on-screen toast is redundant
|
|
|
|
|
|
// once the notification list is visible.
|
2026-06-11 15:20:17 +01:00
|
|
|
|
if (toastItem.visible) toastItem.hideNow();
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
|
|
|
|
|
function shiftMonth(d) {
|
|
|
|
|
|
let m = viewMonth + d;
|
|
|
|
|
|
if (m < 0) { viewMonth = 11; viewYear--; }
|
|
|
|
|
|
else if (m > 11) { viewMonth = 0; viewYear++; }
|
|
|
|
|
|
else viewMonth = m;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --- Weather: 7-day forecast, refreshed every 30 min ---
|
|
|
|
|
|
property var weatherDays: []
|
|
|
|
|
|
Process {
|
|
|
|
|
|
id: weatherProc
|
|
|
|
|
|
command: [Commands.weatherFetch]
|
|
|
|
|
|
stdout: StdioCollector {
|
|
|
|
|
|
onStreamFinished: {
|
|
|
|
|
|
try {
|
|
|
|
|
|
let j = JSON.parse(text);
|
|
|
|
|
|
let out = [];
|
|
|
|
|
|
for (let i = 0; i < j.daily.time.length && i < 7; i++) {
|
|
|
|
|
|
out.push({
|
|
|
|
|
|
day: new Date(j.daily.time[i] + "T12:00:00").toLocaleDateString(Qt.locale(), "ddd").slice(0, 2),
|
|
|
|
|
|
code: j.daily.weather_code[i],
|
|
|
|
|
|
max: Math.round(j.daily.temperature_2m_max[i]),
|
|
|
|
|
|
min: Math.round(j.daily.temperature_2m_min[i])
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
if (out.length > 0) calPopup.weatherDays = out;
|
2026-07-08 13:26:08 +01:00
|
|
|
|
// Feed today's real sunrise/sunset to the
|
|
|
|
|
|
// night-light schedule (shell.qml).
|
|
|
|
|
|
if (j.daily.sunrise && j.daily.sunset) {
|
|
|
|
|
|
let sr = new Date(j.daily.sunrise[0]);
|
|
|
|
|
|
let ss = new Date(j.daily.sunset[0]);
|
|
|
|
|
|
bar.shellRoot.sunriseMins = sr.getHours() * 60 + sr.getMinutes();
|
|
|
|
|
|
bar.shellRoot.sunsetMins = ss.getHours() * 60 + ss.getMinutes();
|
|
|
|
|
|
bar.shellRoot.applyNightlight();
|
|
|
|
|
|
}
|
2026-06-11 11:23:28 +01:00
|
|
|
|
} catch (e) { /* keep previous forecast */ }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
Timer {
|
|
|
|
|
|
interval: 1800000
|
|
|
|
|
|
running: true
|
|
|
|
|
|
repeat: true
|
|
|
|
|
|
triggeredOnStart: true
|
|
|
|
|
|
onTriggered: weatherProc.running = true
|
|
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
// WMO weather codes → Material Symbols. Ranges per
|
|
|
|
|
|
// open-meteo: 0 clear, 1-2 partly, 3 overcast, 45-48 fog,
|
|
|
|
|
|
// 51-67 drizzle/rain, 71-77 snow, 80-82 rain showers,
|
|
|
|
|
|
// 85-86 snow showers, 95+ thunder.
|
2026-06-11 11:23:28 +01:00
|
|
|
|
function weatherGlyph(code) {
|
2026-06-12 14:06:20 +01:00
|
|
|
|
if (code === 0) return "clear_day";
|
|
|
|
|
|
if (code <= 2) return "partly_cloudy_day";
|
|
|
|
|
|
if (code === 3) return "cloud";
|
|
|
|
|
|
if (code <= 48) return "foggy";
|
|
|
|
|
|
if (code <= 67) return "rainy";
|
|
|
|
|
|
if (code <= 77) return "cloudy_snowing";
|
|
|
|
|
|
if (code <= 82) return "rainy";
|
|
|
|
|
|
if (code <= 86) return "cloudy_snowing";
|
|
|
|
|
|
return "thunderstorm";
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-17 11:43:45 +01:00
|
|
|
|
// --- Media: one card per MPRIS player so Spotify, a
|
|
|
|
|
|
// browser tab, etc. stay separate instead of collapsing
|
|
|
|
|
|
// into a single combined player. ---
|
|
|
|
|
|
property var players: Mpris.players.values.filter(
|
|
|
|
|
|
p => p.trackTitle || p.playbackState === MprisPlaybackState.Playing)
|
|
|
|
|
|
|
|
|
|
|
|
// Best-effort link from an MPRIS player to its Pipewire
|
|
|
|
|
|
// audio stream (matched by app name), so a card can carry a
|
|
|
|
|
|
// volume slider via the same per-app path as the volume
|
|
|
|
|
|
// widget. null when no stream matches.
|
|
|
|
|
|
function streamFor(player) {
|
|
|
|
|
|
if (!player) return null;
|
|
|
|
|
|
let id = (player.identity || "").toLowerCase();
|
|
|
|
|
|
let ns = Pipewire.nodes.values;
|
|
|
|
|
|
for (let i = 0; i < ns.length; i++) {
|
|
|
|
|
|
let n = ns[i];
|
|
|
|
|
|
if (!n.isStream || !n.audio) continue;
|
|
|
|
|
|
let an = (n.properties["application.name"] || "").toLowerCase();
|
|
|
|
|
|
if (an && (an === id || an.includes(id) || id.includes(an))) return n;
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
2026-06-17 11:43:45 +01:00
|
|
|
|
return null;
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Row {
|
|
|
|
|
|
id: calRow
|
2026-06-11 10:00:02 +01:00
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
anchors.top: parent.top
|
2026-06-11 11:23:28 +01:00
|
|
|
|
anchors.topMargin: 12
|
|
|
|
|
|
spacing: 16
|
2026-06-11 10:00:02 +01:00
|
|
|
|
opacity: calPopup.open ? 1.0 : 0.0
|
|
|
|
|
|
|
|
|
|
|
|
Behavior on opacity {
|
|
|
|
|
|
NumberAnimation { duration: 150; easing.type: Easing.OutCubic }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 14:36:52 +01:00
|
|
|
|
// ── Left pane: calendar card + weather card ──
|
2026-06-11 11:23:28 +01:00
|
|
|
|
Column {
|
|
|
|
|
|
id: calLeftCol
|
2026-06-11 14:36:52 +01:00
|
|
|
|
width: 7 * 32 + 16
|
2026-06-11 11:23:28 +01:00
|
|
|
|
spacing: 8
|
|
|
|
|
|
|
2026-06-11 14:36:52 +01:00
|
|
|
|
// Calendar card
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Card {
|
2026-06-11 11:23:28 +01:00
|
|
|
|
width: parent.width
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
// Month header: ‹ [Month Year] › — label click jumps to today
|
|
|
|
|
|
Item {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: 28
|
2026-06-11 14:36:52 +01:00
|
|
|
|
|
2026-06-17 13:59:26 +01:00
|
|
|
|
HoverRow {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
width: 28; height: 28; radius: Theme.radiusSmall
|
|
|
|
|
|
anchors.left: parent.left
|
2026-06-17 13:59:26 +01:00
|
|
|
|
onClicked: calPopup.shiftMonth(-1)
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
text: "chevron_left"
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.pixelSize: 18
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
text: new Date(calPopup.viewYear, calPopup.viewMonth, 1).toLocaleDateString(Qt.locale(), "MMMM yyyy")
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.pixelSize: 14
|
|
|
|
|
|
font.weight: Font.Medium
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: calPopup.resetView()
|
2026-06-11 14:36:52 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-17 13:59:26 +01:00
|
|
|
|
HoverRow {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
width: 28; height: 28; radius: Theme.radiusSmall
|
|
|
|
|
|
anchors.right: parent.right
|
2026-06-17 13:59:26 +01:00
|
|
|
|
onClicked: calPopup.shiftMonth(1)
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
2026-06-11 14:36:52 +01:00
|
|
|
|
anchors.centerIn: parent
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
text: "chevron_right"
|
2026-06-11 14:36:52 +01:00
|
|
|
|
color: Theme.base05
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
font.pixelSize: 18
|
2026-06-11 14:36:52 +01:00
|
|
|
|
}
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
}
|
2026-06-11 11:23:28 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Row {
|
|
|
|
|
|
spacing: 0
|
|
|
|
|
|
Repeater {
|
|
|
|
|
|
model: ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"]
|
|
|
|
|
|
SText {
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
width: 32
|
|
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
|
text: modelData
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 13
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
2026-06-11 14:36:52 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
}
|
2026-06-11 11:23:28 +01:00
|
|
|
|
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
Grid {
|
|
|
|
|
|
columns: 7
|
|
|
|
|
|
spacing: 0
|
|
|
|
|
|
Repeater {
|
|
|
|
|
|
model: 42
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
required property int index
|
|
|
|
|
|
property int dayNum: {
|
|
|
|
|
|
let first = new Date(calPopup.viewYear, calPopup.viewMonth, 1);
|
|
|
|
|
|
let startDay = (first.getDay() + 6) % 7;
|
|
|
|
|
|
return index - startDay + 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
property int daysInMonth: new Date(calPopup.viewYear, calPopup.viewMonth + 1, 0).getDate()
|
|
|
|
|
|
property bool isToday: dayNum === clockText.now.getDate()
|
|
|
|
|
|
&& calPopup.viewMonth === clockText.now.getMonth()
|
|
|
|
|
|
&& calPopup.viewYear === clockText.now.getFullYear()
|
|
|
|
|
|
width: 32
|
|
|
|
|
|
height: 26
|
|
|
|
|
|
radius: Theme.radiusTiny
|
|
|
|
|
|
color: isToday ? Theme.base03 : "transparent"
|
|
|
|
|
|
|
|
|
|
|
|
SText {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
text: parent.dayNum >= 1 && parent.dayNum <= parent.daysInMonth ? parent.dayNum.toString() : ""
|
|
|
|
|
|
color: parent.isToday ? Theme.base05 : Theme.base04
|
|
|
|
|
|
font.pixelSize: 13
|
2026-06-11 14:36:52 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-11 14:36:52 +01:00
|
|
|
|
// Weather card
|
2026-06-11 11:23:28 +01:00
|
|
|
|
Rectangle {
|
|
|
|
|
|
width: parent.width
|
2026-06-11 14:36:52 +01:00
|
|
|
|
height: weatherRow.height + 16
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
radius: Theme.radius
|
2026-06-17 11:30:13 +01:00
|
|
|
|
color: Theme.cardBg
|
2026-06-11 11:23:28 +01:00
|
|
|
|
visible: calPopup.weatherDays.length > 0
|
2026-06-11 14:36:52 +01:00
|
|
|
|
|
|
|
|
|
|
Row {
|
|
|
|
|
|
id: weatherRow
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
anchors.topMargin: 8
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
Repeater {
|
|
|
|
|
|
model: calPopup.weatherDays
|
|
|
|
|
|
Column {
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
width: 32
|
|
|
|
|
|
spacing: 2
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
2026-06-11 14:36:52 +01:00
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: modelData.day
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 10
|
|
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
2026-06-11 14:36:52 +01:00
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: calPopup.weatherGlyph(modelData.code)
|
|
|
|
|
|
color: Theme.base0C
|
2026-06-12 14:06:20 +01:00
|
|
|
|
font.pixelSize: 16
|
2026-06-11 14:36:52 +01:00
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
2026-06-11 14:36:52 +01:00
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: modelData.max + "°"
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.pixelSize: 10
|
|
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SText {
|
2026-06-11 14:36:52 +01:00
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: modelData.min + "°"
|
|
|
|
|
|
color: Theme.base03
|
|
|
|
|
|
font.pixelSize: 10
|
|
|
|
|
|
}
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-11 11:23:28 +01:00
|
|
|
|
// ── Right pane: media + notifications ──
|
|
|
|
|
|
Column {
|
|
|
|
|
|
id: calRightCol
|
|
|
|
|
|
width: 300
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
|
2026-06-17 11:43:45 +01:00
|
|
|
|
// Media player cards — one per active MPRIS source,
|
|
|
|
|
|
// so Spotify and a browser tab stay separate.
|
|
|
|
|
|
Repeater {
|
|
|
|
|
|
model: calPopup.players
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-17 11:43:45 +01:00
|
|
|
|
Rectangle {
|
|
|
|
|
|
id: mediaCard
|
|
|
|
|
|
required property var modelData
|
|
|
|
|
|
property var pwNode: calPopup.streamFor(modelData)
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: mediaCol.height + 16
|
|
|
|
|
|
radius: Theme.radius
|
|
|
|
|
|
color: Theme.cardBg
|
2026-06-11 11:23:28 +01:00
|
|
|
|
|
2026-06-17 11:43:45 +01:00
|
|
|
|
PwObjectTracker { objects: mediaCard.pwNode ? [mediaCard.pwNode] : [] }
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
Column {
|
2026-06-17 11:43:45 +01:00
|
|
|
|
id: mediaCol
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
anchors.margins: 8
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
|
2026-06-17 14:48:31 +01:00
|
|
|
|
// Album art with title + artist to its
|
|
|
|
|
|
// right; controls and volume below.
|
|
|
|
|
|
Row {
|
2026-06-11 10:00:02 +01:00
|
|
|
|
width: parent.width
|
2026-06-17 14:48:31 +01:00
|
|
|
|
spacing: 12
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-17 14:56:49 +01:00
|
|
|
|
ClippingRectangle {
|
2026-06-17 14:47:02 +01:00
|
|
|
|
width: 128; height: 128
|
2026-06-17 11:43:45 +01:00
|
|
|
|
radius: Theme.radiusSmall
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
color: Theme.base02
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
SIcon {
|
2026-06-11 11:23:28 +01:00
|
|
|
|
anchors.centerIn: parent
|
2026-06-17 11:43:45 +01:00
|
|
|
|
visible: albumArt.status !== Image.Ready
|
|
|
|
|
|
text: "music_note"
|
|
|
|
|
|
color: Theme.base04
|
2026-06-17 14:47:02 +01:00
|
|
|
|
font.pixelSize: 48
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
2026-06-17 11:43:45 +01:00
|
|
|
|
Image {
|
|
|
|
|
|
id: albumArt
|
2026-06-11 11:23:28 +01:00
|
|
|
|
anchors.fill: parent
|
2026-06-17 11:43:45 +01:00
|
|
|
|
fillMode: Image.PreserveAspectCrop
|
|
|
|
|
|
source: mediaCard.modelData.trackArtUrl
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-17 14:48:31 +01:00
|
|
|
|
Column {
|
|
|
|
|
|
width: parent.width - 128 - 12
|
2026-06-17 11:43:45 +01:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2026-06-17 14:48:31 +01:00
|
|
|
|
spacing: 2
|
|
|
|
|
|
SText {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
text: mediaCard.modelData.trackTitle
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.pixelSize: 13
|
|
|
|
|
|
font.weight: Font.Medium
|
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
|
}
|
|
|
|
|
|
SText {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
text: mediaCard.modelData.trackArtist
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 11
|
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Transport controls, centered below.
|
|
|
|
|
|
Item {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: 36
|
|
|
|
|
|
Row {
|
|
|
|
|
|
anchors.centerIn: parent
|
2026-06-17 14:43:09 +01:00
|
|
|
|
spacing: 4
|
2026-06-17 11:43:45 +01:00
|
|
|
|
Repeater {
|
|
|
|
|
|
model: [
|
|
|
|
|
|
{ glyph: "skip_previous", act: "prev" },
|
|
|
|
|
|
{ glyph: mediaCard.modelData.playbackState === MprisPlaybackState.Playing ? "pause" : "play_arrow", act: "toggle" },
|
|
|
|
|
|
{ glyph: "skip_next", act: "next" }
|
|
|
|
|
|
]
|
2026-06-17 13:59:26 +01:00
|
|
|
|
HoverRow {
|
2026-06-17 11:43:45 +01:00
|
|
|
|
id: mediaBtn
|
|
|
|
|
|
required property var modelData
|
2026-06-17 14:43:09 +01:00
|
|
|
|
width: 36; height: 36; radius: 18
|
2026-06-17 13:59:26 +01:00
|
|
|
|
onClicked: {
|
|
|
|
|
|
let p = mediaCard.modelData;
|
|
|
|
|
|
if (!p) return;
|
|
|
|
|
|
if (mediaBtn.modelData.act === "prev") p.previous();
|
|
|
|
|
|
else if (mediaBtn.modelData.act === "next") p.next();
|
|
|
|
|
|
else p.togglePlaying();
|
|
|
|
|
|
}
|
2026-06-17 11:43:45 +01:00
|
|
|
|
SIcon {
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
text: mediaBtn.modelData.glyph
|
|
|
|
|
|
color: Theme.base05
|
2026-06-17 14:43:09 +01:00
|
|
|
|
font.pixelSize: 24
|
2026-06-17 11:43:45 +01:00
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-17 11:43:45 +01:00
|
|
|
|
|
|
|
|
|
|
// Per-source volume — same per-app path
|
|
|
|
|
|
// as the volume widget. Shown when the
|
|
|
|
|
|
// player's Pipewire stream is matched.
|
|
|
|
|
|
Row {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: 8
|
|
|
|
|
|
visible: mediaCard.pwNode !== null && mediaCard.pwNode.audio !== null
|
|
|
|
|
|
|
2026-06-17 13:22:28 +01:00
|
|
|
|
VolIcon {
|
2026-06-17 11:43:45 +01:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2026-06-17 13:22:28 +01:00
|
|
|
|
width: 18
|
2026-06-17 11:43:45 +01:00
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 15
|
2026-06-17 13:22:28 +01:00
|
|
|
|
audioNode: mediaCard.pwNode ? mediaCard.pwNode.audio : null
|
2026-06-17 11:43:45 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PillSlider {
|
2026-06-17 13:22:28 +01:00
|
|
|
|
width: parent.width - 18 - mediaVolLabel.width - 16
|
2026-06-17 11:43:45 +01:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
height: 16
|
|
|
|
|
|
trackH: 4
|
|
|
|
|
|
value: mediaCard.pwNode && mediaCard.pwNode.audio ? Math.min(1, mediaCard.pwNode.audio.volume) : 0
|
2026-06-17 13:22:28 +01:00
|
|
|
|
fillColor: mediaCard.pwNode && mediaCard.pwNode.audio && mediaCard.pwNode.audio.muted ? Theme.base03 : Theme.base0C
|
2026-06-17 11:43:45 +01:00
|
|
|
|
onMoved: (v) => { if (mediaCard.pwNode && mediaCard.pwNode.audio) mediaCard.pwNode.audio.volume = v; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SText {
|
|
|
|
|
|
id: mediaVolLabel
|
|
|
|
|
|
width: 36
|
|
|
|
|
|
text: mediaCard.pwNode && mediaCard.pwNode.audio ? Math.round(mediaCard.pwNode.audio.volume * 100) + "%" : "0%"
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 10
|
|
|
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
2026-06-17 14:56:49 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 14:40:54 +01:00
|
|
|
|
|
2026-07-08 14:05:05 +01:00
|
|
|
|
// ── Notifications: spans both columns, below the panes.
|
|
|
|
|
|
// Header + one Card per notification, matching the media
|
|
|
|
|
|
// cards instead of base02 blocks nested inside a big card.
|
|
|
|
|
|
Column {
|
2026-06-17 14:56:49 +01:00
|
|
|
|
id: notifCard
|
|
|
|
|
|
anchors.top: calRow.bottom
|
|
|
|
|
|
anchors.topMargin: 8
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
width: calRow.width
|
|
|
|
|
|
opacity: calRow.opacity
|
2026-07-08 14:05:05 +01:00
|
|
|
|
spacing: 8
|
2026-06-11 14:40:54 +01:00
|
|
|
|
|
2026-06-17 14:56:49 +01:00
|
|
|
|
Item {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: 20
|
|
|
|
|
|
SText {
|
|
|
|
|
|
anchors.left: parent.left
|
2026-07-08 14:05:05 +01:00
|
|
|
|
anchors.leftMargin: Theme.cardPad
|
2026-06-17 14:56:49 +01:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: "Notifications"
|
|
|
|
|
|
font.weight: Font.Medium
|
|
|
|
|
|
}
|
|
|
|
|
|
SText {
|
|
|
|
|
|
anchors.right: parent.right
|
2026-07-08 14:05:05 +01:00
|
|
|
|
anchors.rightMargin: Theme.cardPad
|
2026-06-17 14:56:49 +01:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
text: bar.notifServer.trackedNotifications.values.length > 0 ? "Clear all" : ""
|
|
|
|
|
|
color: Theme.base04
|
|
|
|
|
|
font.pixelSize: 11
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: {
|
|
|
|
|
|
let notifs = bar.notifServer.trackedNotifications.values;
|
|
|
|
|
|
for (let i = notifs.length - 1; i >= 0; i--) {
|
|
|
|
|
|
notifs[i].dismiss();
|
2026-06-11 11:23:28 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
}
|
2026-06-17 14:56:49 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-06-11 11:23:28 +01:00
|
|
|
|
|
2026-06-17 14:56:49 +01:00
|
|
|
|
SText {
|
|
|
|
|
|
visible: bar.notifServer.trackedNotifications.values.length === 0
|
|
|
|
|
|
text: "No notifications"
|
|
|
|
|
|
color: Theme.base03
|
|
|
|
|
|
font.pixelSize: 11
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
}
|
2026-06-11 14:40:54 +01:00
|
|
|
|
|
2026-06-17 14:56:49 +01:00
|
|
|
|
Repeater {
|
|
|
|
|
|
model: bar.notifServer.trackedNotifications
|
2026-06-11 11:23:28 +01:00
|
|
|
|
|
2026-07-08 14:05:05 +01:00
|
|
|
|
Card {
|
2026-06-17 14:56:49 +01:00
|
|
|
|
id: notifItem
|
|
|
|
|
|
required property var modelData
|
2026-06-17 15:39:11 +01:00
|
|
|
|
readonly property string previewSource: bar.notifPreviewSource(notifItem.modelData)
|
2026-06-17 14:56:49 +01:00
|
|
|
|
width: parent.width
|
2026-06-11 11:23:28 +01:00
|
|
|
|
|
2026-07-08 14:05:05 +01:00
|
|
|
|
Item {
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: Math.max(notifPreview.visible ? 48 : 0, ncBody.height)
|
|
|
|
|
|
|
|
|
|
|
|
// Image preview (album art, screenshot thumb…)
|
|
|
|
|
|
ClippingRectangle {
|
|
|
|
|
|
id: notifPreview
|
|
|
|
|
|
visible: notifItem.previewSource !== ""
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
width: 48; height: 48
|
|
|
|
|
|
radius: Theme.radiusTiny
|
|
|
|
|
|
color: Theme.base01
|
|
|
|
|
|
Image {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
fillMode: Image.PreserveAspectCrop
|
|
|
|
|
|
source: notifItem.previewSource
|
|
|
|
|
|
}
|
2026-06-17 14:56:49 +01:00
|
|
|
|
}
|
2026-06-11 11:23:28 +01:00
|
|
|
|
|
2026-07-08 14:05:05 +01:00
|
|
|
|
NotifContent {
|
|
|
|
|
|
id: ncBody
|
|
|
|
|
|
notif: notifItem.modelData
|
|
|
|
|
|
anchors.left: notifPreview.visible ? notifPreview.right : parent.left
|
|
|
|
|
|
anchors.leftMargin: notifPreview.visible ? 8 : 0
|
|
|
|
|
|
anchors.right: dismissBtn.left
|
|
|
|
|
|
anchors.rightMargin: 8
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
}
|
2026-06-17 14:56:49 +01:00
|
|
|
|
|
2026-07-08 14:05:05 +01:00
|
|
|
|
SIcon {
|
|
|
|
|
|
id: dismissBtn
|
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
text: "close"
|
|
|
|
|
|
color: dismissMa.containsMouse ? Theme.base05 : Theme.base03
|
|
|
|
|
|
font.pixelSize: 15
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
id: dismissMa
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: notifItem.modelData.dismiss()
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// ── OSD: volume / brightness level, shown inline in the bar's
|
|
|
|
|
|
// empty middle — the gap between the two clusters exists for
|
|
|
|
|
|
// this. Volume is reactive: Pipewire reports changes from any
|
|
|
|
|
|
// source (media keys, pavucontrol, a hardware mixer), so no IPC
|
|
|
|
|
|
// is needed. Brightness arrives via shellRoot's signal instead,
|
|
|
|
|
|
// because sysfs backlight notifies with POLLPRI, which inotify
|
|
|
|
|
|
// never sees. Focused monitor only.
|
2026-07-28 12:35:44 +01:00
|
|
|
|
Item {
|
|
|
|
|
|
id: osdItem
|
|
|
|
|
|
readonly property bool isFocused: Hyprland.focusedMonitor
|
|
|
|
|
|
&& Hyprland.focusedMonitor.name === bar.screen.name
|
|
|
|
|
|
// Every binding evaluates once at load; arm on a delay so
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// a shell restart doesn't flash the slider on screen.
|
2026-07-28 12:35:44 +01:00
|
|
|
|
property bool armed: false
|
|
|
|
|
|
property bool shown: false
|
|
|
|
|
|
property string icon: "volume_up"
|
|
|
|
|
|
property real value: 0
|
|
|
|
|
|
property color fill: Theme.base0D
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
width: Theme.barWidth
|
|
|
|
|
|
anchors.horizontalCenter: barBgRect.horizontalCenter
|
|
|
|
|
|
anchors.top: barTop.bottom
|
|
|
|
|
|
anchors.bottom: barBottom.top
|
|
|
|
|
|
opacity: shown ? 1 : 0
|
|
|
|
|
|
visible: opacity > 0.01
|
2026-07-28 12:35:44 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
Behavior on opacity {
|
|
|
|
|
|
NumberAnimation { duration: Theme.animContent; easing.type: Easing.OutCubic }
|
2026-07-28 12:35:44 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function show(ic, v, f) {
|
|
|
|
|
|
if (!armed || !isFocused) return;
|
|
|
|
|
|
icon = ic;
|
|
|
|
|
|
value = v;
|
|
|
|
|
|
fill = f;
|
|
|
|
|
|
shown = true;
|
|
|
|
|
|
osdTimer.restart();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Timer { id: osdTimer; interval: 1600; onTriggered: osdItem.shown = false }
|
|
|
|
|
|
Timer { id: osdArm; interval: 1500; running: true; onTriggered: osdItem.armed = true }
|
|
|
|
|
|
|
|
|
|
|
|
function showVolume() {
|
|
|
|
|
|
// The volume dropdown already shows the level live.
|
|
|
|
|
|
if (bar.activeDropdown === volDropdown) return;
|
|
|
|
|
|
show(volWidget.volIcon, volWidget.vol / 100,
|
|
|
|
|
|
volWidget.muted ? Theme.base03 : Theme.base0D);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
|
target: volWidget.sink && volWidget.sink.audio ? volWidget.sink.audio : null
|
|
|
|
|
|
// `volume` notifies through volumesChanged, not
|
|
|
|
|
|
// volumeChanged — it is a view over the per-channel
|
|
|
|
|
|
// volumes vector.
|
|
|
|
|
|
function onVolumesChanged() { osdItem.showVolume(); }
|
|
|
|
|
|
function onMutedChanged() { osdItem.showVolume(); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
|
target: bar.shellRoot
|
|
|
|
|
|
function onOsdBrightness(icon, value) {
|
|
|
|
|
|
osdItem.show(icon, value, Theme.base0A);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
Column {
|
2026-07-28 12:35:44 +01:00
|
|
|
|
anchors.centerIn: parent
|
2026-07-28 13:09:49 +01:00
|
|
|
|
spacing: 8
|
2026-07-28 12:35:44 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
// Vertical track — fill grows upward from the bottom.
|
|
|
|
|
|
// PillSlider is horizontal-only, so this is its own
|
|
|
|
|
|
// rather than a rotated instance.
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
width: 6
|
|
|
|
|
|
height: 96
|
|
|
|
|
|
radius: 3
|
|
|
|
|
|
color: Theme.base02
|
2026-07-28 12:35:44 +01:00
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
Rectangle {
|
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
height: Math.max(parent.width,
|
|
|
|
|
|
parent.height * Math.max(0, Math.min(1, osdItem.value)))
|
|
|
|
|
|
radius: parent.radius
|
|
|
|
|
|
color: osdItem.fill
|
|
|
|
|
|
Behavior on height { NumberAnimation { duration: 80 } }
|
|
|
|
|
|
}
|
2026-07-28 12:35:44 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
SIcon {
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
text: osdItem.icon
|
|
|
|
|
|
color: Theme.base05
|
|
|
|
|
|
font.pixelSize: 16
|
2026-07-28 12:35:44 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 10:00:02 +01:00
|
|
|
|
// ── Notification Toast (only on primary screen) ──
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: toastItem
|
|
|
|
|
|
visible: false
|
|
|
|
|
|
property var currentNotif: null
|
|
|
|
|
|
property bool toastOpen: false
|
|
|
|
|
|
readonly property var mutedApps: ["discord", "Discord", "Vesktop", "vesktop", "Spotify", "spotify", "vlc", "mpv"]
|
|
|
|
|
|
readonly property bool isPrimary: bar.screen === Quickshell.screens[0]
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
x: Theme.barWidth
|
|
|
|
|
|
y: Theme.frameWidth + 8
|
|
|
|
|
|
width: _toastRect.width + 4
|
|
|
|
|
|
height: _toastRect.height + 16
|
2026-06-11 10:00:02 +01:00
|
|
|
|
|
|
|
|
|
|
Process {
|
|
|
|
|
|
id: notifSoundProc
|
|
|
|
|
|
command: [Commands.notifSound, "-i", "message"]
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
|
target: bar.shellRoot
|
|
|
|
|
|
function onNotificationReceived() {
|
2026-06-11 15:01:52 +01:00
|
|
|
|
if (!toastItem.isPrimary) return;
|
|
|
|
|
|
let n = bar.shellRoot.latestNotification;
|
|
|
|
|
|
// Popup open: the notification list is already on
|
|
|
|
|
|
// screen — play the sound but skip the toast.
|
|
|
|
|
|
if (calPopup.visible) {
|
|
|
|
|
|
if (!toastItem.mutedApps.includes(n.appName)) {
|
|
|
|
|
|
notifSoundProc.running = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
return;
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
2026-06-11 15:01:52 +01:00
|
|
|
|
toastItem.showToast(n);
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function showToast(notification) {
|
|
|
|
|
|
currentNotif = notification;
|
|
|
|
|
|
visible = true;
|
|
|
|
|
|
toastOpen = true;
|
|
|
|
|
|
_toastTimer.restart();
|
|
|
|
|
|
if (!mutedApps.includes(notification.appName)) {
|
|
|
|
|
|
notifSoundProc.running = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function dismiss() {
|
|
|
|
|
|
toastOpen = false;
|
|
|
|
|
|
_toastCloseDelay.start();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 15:20:17 +01:00
|
|
|
|
// Instant hide, no close animation
|
|
|
|
|
|
function hideNow() {
|
|
|
|
|
|
_toastTimer.stop();
|
|
|
|
|
|
_toastCloseDelay.stop();
|
|
|
|
|
|
toastOpen = false;
|
|
|
|
|
|
visible = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-11 10:00:02 +01:00
|
|
|
|
Timer {
|
|
|
|
|
|
id: _toastTimer
|
|
|
|
|
|
interval: 5000
|
|
|
|
|
|
onTriggered: toastItem.dismiss()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
|
|
id: _toastCloseDelay
|
|
|
|
|
|
interval: 230
|
|
|
|
|
|
onTriggered: { toastItem.visible = false; toastItem.toastOpen = false; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HoverHandler {
|
|
|
|
|
|
onHoveredChanged: {
|
|
|
|
|
|
if (hovered) _toastTimer.stop();
|
|
|
|
|
|
else _toastTimer.restart();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: _toastRect
|
2026-07-28 13:09:49 +01:00
|
|
|
|
anchors.left: parent.left
|
2026-06-11 10:00:02 +01:00
|
|
|
|
anchors.top: parent.top
|
2026-07-28 13:09:49 +01:00
|
|
|
|
anchors.topMargin: 8
|
|
|
|
|
|
// Reveals rightward now, so width is the animated axis
|
|
|
|
|
|
// and the card inside keeps a fixed width (otherwise it
|
|
|
|
|
|
// would squash instead of being wiped in).
|
|
|
|
|
|
width: toastItem.toastOpen ? 320 : 0
|
|
|
|
|
|
height: toastCard.height + 2 * Theme.panelGap
|
2026-06-11 10:00:02 +01:00
|
|
|
|
clip: true
|
|
|
|
|
|
|
2026-07-28 13:09:49 +01:00
|
|
|
|
Behavior on width {
|
quickshell: refactor — Theme tokens, reusable components, dedup
Reduces the shell from 2898 → 2712 lines (~316 lines of duplication removed,
~130 of reusable scaffolding added). Rollback point: tag quickshell-pre-refactor.
- Theme tokens: barHeight, radius/radiusSmall/radiusTiny, cardPad, animMorph/
animContent/animFade — bar height and the shader cutout math now derive from
one constant instead of ~10 scattered 30/26 literals
- SText/SIcon base components default the two fonts (removed 58 font.family lines)
- Card component: the rounded base01 section surface, now one definition driving
7 cards (volume ×2, network ×2, battery ×2, calendar)
- PillSlider component: master + per-app volume sliders share one slider
- NotifContent component: calendar list + toast notification bodies deduped
- dead code: dropped unused QtQuick.Shapes import, collapsed redundant
weatherGlyph branches, converted the lone RowLayout to drop QtQuick.Layouts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:05:01 +01:00
|
|
|
|
NumberAnimation { duration: Theme.animMorph; easing.type: Easing.OutExpo }
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-08 14:05:05 +01:00
|
|
|
|
// Notification sits in a cardBg card like every other
|
|
|
|
|
|
// dropdown surface, inset panelGap from the melt panel.
|
2026-06-13 19:36:11 +01:00
|
|
|
|
Rectangle {
|
|
|
|
|
|
id: toastCard
|
2026-06-11 10:00:02 +01:00
|
|
|
|
anchors.top: parent.top
|
2026-06-13 19:36:11 +01:00
|
|
|
|
anchors.left: parent.left
|
2026-07-08 14:05:05 +01:00
|
|
|
|
anchors.margins: Theme.panelGap
|
2026-07-28 13:09:49 +01:00
|
|
|
|
width: 320 - 2 * Theme.panelGap
|
2026-06-17 15:39:11 +01:00
|
|
|
|
height: Math.max(toastPreview.visible ? 48 : 0, toastCol.height) + 16
|
2026-07-08 14:05:05 +01:00
|
|
|
|
radius: Theme.radius
|
|
|
|
|
|
color: Theme.cardBg
|
2026-06-13 19:36:11 +01:00
|
|
|
|
|
2026-06-17 15:39:11 +01:00
|
|
|
|
property string previewSource: bar.notifPreviewSource(toastItem.currentNotif)
|
|
|
|
|
|
|
|
|
|
|
|
// Image preview (screenshot thumb, album art…)
|
|
|
|
|
|
ClippingRectangle {
|
|
|
|
|
|
id: toastPreview
|
|
|
|
|
|
visible: toastCard.previewSource !== ""
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
anchors.margins: 8
|
|
|
|
|
|
width: 48; height: 48
|
|
|
|
|
|
radius: Theme.radiusTiny
|
|
|
|
|
|
color: Theme.base01
|
|
|
|
|
|
Image {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
fillMode: Image.PreserveAspectCrop
|
|
|
|
|
|
source: toastCard.previewSource
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-13 19:36:11 +01:00
|
|
|
|
NotifContent {
|
|
|
|
|
|
id: toastCol
|
|
|
|
|
|
notif: toastItem.currentNotif
|
2026-06-17 15:39:11 +01:00
|
|
|
|
anchors.left: toastPreview.visible ? toastPreview.right : parent.left
|
2026-06-13 19:36:11 +01:00
|
|
|
|
anchors.right: toastDismiss.left
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
anchors.margins: 8
|
|
|
|
|
|
onActionInvoked: toastItem.dismiss()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SIcon {
|
|
|
|
|
|
id: toastDismiss
|
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
|
anchors.margins: 8
|
|
|
|
|
|
text: "close"
|
|
|
|
|
|
color: toastDismissMa.containsMouse ? Theme.base05 : Theme.base03
|
|
|
|
|
|
font.pixelSize: 15
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
id: toastDismissMa
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
onClicked: { toastItem.currentNotif.dismiss(); toastItem.dismiss(); }
|
|
|
|
|
|
}
|
2026-06-11 10:00:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|