Add Noctalia shell with Quickshell overview
- Add `noctalia` input to flake and lock it in `flake.lock`. - Include `noctalia` and `quickshell` modules in `flake.nix`. - Extend core packages to accept `inputs` and `system`; add `quickshell.nix` with required Qt6 packages and environment variables. - Enable `upower` service for battery handling. - Add home modules `noctalia.nix` and `overview.nix` (QML UI, README, assets, widgets, services) to provide a workspace overview. - Comment out unused rofi and web‑search binds; update `exec‑once` to start the overview daemon and `noctalia-shell`. - Provide `restart.noctalia` script and its Nix wrapper. - Enable `noctalia-shell` in `stylix` configuration.
This commit is contained in:
68
modules/home/overview/common/functions/ColorUtils.qml
Normal file
68
modules/home/overview/common/functions/ColorUtils.qml
Normal file
@@ -0,0 +1,68 @@
|
||||
pragma Singleton
|
||||
import Quickshell
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
function colorWithHueOf(color1, color2) {
|
||||
var c1 = Qt.color(color1);
|
||||
var c2 = Qt.color(color2);
|
||||
var hue = c2.hsvHue;
|
||||
var sat = c1.hsvSaturation;
|
||||
var val = c1.hsvValue;
|
||||
var alpha = c1.a;
|
||||
return Qt.hsva(hue, sat, val, alpha);
|
||||
}
|
||||
|
||||
function colorWithSaturationOf(color1, color2) {
|
||||
var c1 = Qt.color(color1);
|
||||
var c2 = Qt.color(color2);
|
||||
var hue = c1.hsvHue;
|
||||
var sat = c2.hsvSaturation;
|
||||
var val = c1.hsvValue;
|
||||
var alpha = c1.a;
|
||||
return Qt.hsva(hue, sat, val, alpha);
|
||||
}
|
||||
|
||||
function colorWithLightness(color, lightness) {
|
||||
var c = Qt.color(color);
|
||||
return Qt.hsla(c.hslHue, c.hslSaturation, lightness, c.a);
|
||||
}
|
||||
|
||||
function colorWithLightnessOf(color1, color2) {
|
||||
var c2 = Qt.color(color2);
|
||||
return colorWithLightness(color1, c2.hslLightness);
|
||||
}
|
||||
|
||||
function adaptToAccent(color1, color2) {
|
||||
var c1 = Qt.color(color1);
|
||||
var c2 = Qt.color(color2);
|
||||
var hue = c2.hslHue;
|
||||
var sat = c2.hslSaturation;
|
||||
var light = c1.hslLightness;
|
||||
var alpha = c1.a;
|
||||
return Qt.hsla(hue, sat, light, alpha);
|
||||
}
|
||||
|
||||
function mix(color1, color2, percentage = 0.5) {
|
||||
var c1 = Qt.color(color1);
|
||||
var c2 = Qt.color(color2);
|
||||
return Qt.rgba(
|
||||
percentage * c1.r + (1 - percentage) * c2.r,
|
||||
percentage * c1.g + (1 - percentage) * c2.g,
|
||||
percentage * c1.b + (1 - percentage) * c2.b,
|
||||
percentage * c1.a + (1 - percentage) * c2.a
|
||||
);
|
||||
}
|
||||
|
||||
function transparentize(color, percentage = 1) {
|
||||
var c = Qt.color(color);
|
||||
return Qt.rgba(c.r, c.g, c.b, c.a * (1 - percentage));
|
||||
}
|
||||
|
||||
function applyAlpha(color, alpha) {
|
||||
var c = Qt.color(color);
|
||||
var a = Math.max(0, Math.min(1, alpha));
|
||||
return Qt.rgba(c.r, c.g, c.b, a);
|
||||
}
|
||||
}
|
||||
1
modules/home/overview/common/functions/qmldir
Normal file
1
modules/home/overview/common/functions/qmldir
Normal file
@@ -0,0 +1 @@
|
||||
singleton ColorUtils 1.0 ColorUtils.qml
|
||||
Reference in New Issue
Block a user