put shell in subdir, and add nix package
126
ReloadPopup.qml
|
|
@ -1,126 +0,0 @@
|
||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import Quickshell
|
|
||||||
|
|
||||||
Scope {
|
|
||||||
id: root
|
|
||||||
property bool failed
|
|
||||||
property string errorString
|
|
||||||
|
|
||||||
// Connect to the Quickshell global to listen for the reload signals.
|
|
||||||
Connections {
|
|
||||||
target: Quickshell
|
|
||||||
|
|
||||||
function onReloadCompleted() {
|
|
||||||
root.failed = false;
|
|
||||||
popupLoader.loading = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onReloadFailed(error: string) {
|
|
||||||
// Close any existing popup before making a new one.
|
|
||||||
popupLoader.active = false;
|
|
||||||
|
|
||||||
root.failed = true;
|
|
||||||
root.errorString = error;
|
|
||||||
popupLoader.loading = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Keep the popup in a loader because it isn't needed most of the timeand will take up
|
|
||||||
// memory that could be used for something else.
|
|
||||||
LazyLoader {
|
|
||||||
id: popupLoader
|
|
||||||
|
|
||||||
PanelWindow {
|
|
||||||
id: popup
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
top: true
|
|
||||||
left: true
|
|
||||||
}
|
|
||||||
|
|
||||||
margins {
|
|
||||||
top: 25
|
|
||||||
left: 25
|
|
||||||
}
|
|
||||||
|
|
||||||
implicitWidth: rect.width
|
|
||||||
implicitHeight: rect.height
|
|
||||||
|
|
||||||
// color blending is a bit odd as detailed in the type reference.
|
|
||||||
color: "black"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: rect
|
|
||||||
color: failed ? "#40802020" : "#40009020"
|
|
||||||
|
|
||||||
implicitHeight: layout.implicitHeight + 50
|
|
||||||
implicitWidth: layout.implicitWidth + 30
|
|
||||||
|
|
||||||
// Fills the whole area of the rectangle, making any clicks go to it,
|
|
||||||
// which dismiss the popup.
|
|
||||||
MouseArea {
|
|
||||||
id: mouseArea
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: popupLoader.active = false
|
|
||||||
|
|
||||||
// makes the mouse area track mouse hovering, so the hide animation
|
|
||||||
// can be paused when hovering.
|
|
||||||
hoverEnabled: true
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: layout
|
|
||||||
anchors {
|
|
||||||
top: parent.top
|
|
||||||
topMargin: 20
|
|
||||||
horizontalCenter: parent.horizontalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: root.failed ? "Reload failed." : "Reloaded completed!"
|
|
||||||
color: "white"
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: root.errorString
|
|
||||||
color: "white"
|
|
||||||
// When visible is false, it also takes up no space.
|
|
||||||
visible: root.errorString != ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// A progress bar on the bottom of the screen, showing how long until the
|
|
||||||
// popup is removed.
|
|
||||||
Rectangle {
|
|
||||||
id: bar
|
|
||||||
color: "#20ffffff"
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.left: parent.left
|
|
||||||
height: 20
|
|
||||||
|
|
||||||
PropertyAnimation {
|
|
||||||
id: anim
|
|
||||||
target: bar
|
|
||||||
property: "width"
|
|
||||||
from: rect.width
|
|
||||||
to: 0
|
|
||||||
duration: failed ? 10000 : 800
|
|
||||||
onFinished: popupLoader.active = false
|
|
||||||
|
|
||||||
// Pause the animation when the mouse is hovering over the popup,
|
|
||||||
// so it stays onscreen while reading. This updates reactively
|
|
||||||
// when the mouse moves on and off the popup.
|
|
||||||
paused: mouseArea.containsMouse
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// We could set `running: true` inside the animation, but the width of the
|
|
||||||
// rectangle might not be calculated yet, due to the layout.
|
|
||||||
// In the `Component.onCompleted` event handler, all of the component's
|
|
||||||
// properties and children have been initialized.
|
|
||||||
Component.onCompleted: anim.start()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
26
flake.lock
generated
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1750178436,
|
||||||
|
"narHash": "sha256-t1lcWocjeNT3kYqxYUj3R/O/9PbNsvYFzW50NRkx6X4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "479251543fd2a1256569108a5dee5c79e6caf8bd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
31
flake.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
description = "kossLAN's quickshell dots";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
}: let
|
||||||
|
forEachSystem = fn:
|
||||||
|
nixpkgs.lib.genAttrs
|
||||||
|
["x86_64-linux" "aarch64-linux"]
|
||||||
|
(system: fn system nixpkgs.legacyPackages.${system});
|
||||||
|
in {
|
||||||
|
packages = forEachSystem (system: pkgs: rec {
|
||||||
|
default = minmat;
|
||||||
|
minmat = pkgs.stdenv.mkDerivation {
|
||||||
|
pname = "minmat";
|
||||||
|
version = "0.1.0";
|
||||||
|
src = ./shell;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/etc/quickshell
|
||||||
|
cp -r * $out/etc/quickshell
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
|
Before Width: | Height: | Size: 805 B After Width: | Height: | Size: 805 B |
|
Before Width: | Height: | Size: 700 B After Width: | Height: | Size: 700 B |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 879 B After Width: | Height: | Size: 879 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 675 B |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 640 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
|
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 366 B |
|
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 682 B After Width: | Height: | Size: 682 B |
|
Before Width: | Height: | Size: 906 B After Width: | Height: | Size: 906 B |
|
Before Width: | Height: | Size: 797 B After Width: | Height: | Size: 797 B |
|
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 2.8 MiB |
|
Before Width: | Height: | Size: 480 KiB After Width: | Height: | Size: 480 KiB |
|
Before Width: | Height: | Size: 11 MiB After Width: | Height: | Size: 11 MiB |
|
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 10 MiB After Width: | Height: | Size: 10 MiB |
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 12 MiB After Width: | Height: | Size: 12 MiB |