diff --git a/Droidnix/README.html b/Droidnix/README.html index b2e111212..9cbde023a 100644 --- a/Droidnix/README.html +++ b/Droidnix/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Droidnix: A Dendritic NixOS + Home Manager Configuration NixOS Configuration Structure @@ -204,142 +204,142 @@

Table of Contents

-
-

Shortcuts

-
+
+

Shortcuts

+

Introduction The Assets Folder @@ -355,25 +355,25 @@

Introduction   intro

-
-

What is Droidnix

-
+
+

What is Droidnix

+

Droidnix is a modular, declarative NixOS + Home Manager configuration system. with configurations managed via Emacs Org and Nix Flakes. The project is designed for reproducibility, maintainability, and cross-machine compatibility.

-
-

Installed components:

-
+
+

Installed components:

+
    -
  • Core
  • -
  • Hyprland
  • +
  • Core
  • +
  • Hyprland
-
-

Goals, project Structure, import hierarchy

-
+
+

Goals, project Structure, import hierarchy

+

This project uses a modular NixOS configuration with Hyprland support, designed for literate programming and cross-device reusability. The Droidnix repository is organized into two main parts: @@ -386,9 +386,9 @@ The Droidnix repository is organized into two main parts:

-
-

Root Level

-
+
+

Root Level

+
  • = is the entry point and imports:
      @@ -399,16 +399,16 @@ The Droidnix repository is organized into two main parts:
-
-

Generated Structure

-
+
+

Generated Structure

+

The generated/ directory contains all generated configurations, divided into three main groups: system, hyprland, and mangowc.

-
-

First Setup

-
+
+

First Setup

+
  1. Clone this repository.
  2. Run the setup script: ./setup_droid.
  3. @@ -429,9 +429,9 @@ The generated/ directory contains all generated configurations, div The .assets/ folder contains all static files, such as configs, scripts, and themes. These files are not generated and can be edited directly.

-
-

generated/assets/2_b_installed.conf

-
+
+

generated/assets/2_b_installed.conf

+

This is a list of additional apps to install

@@ -509,9 +509,9 @@ com.logseq.Logseq
-
-

generated/assets/aliases.conf

-
+
+

generated/assets/aliases.conf

+

This is a list of additional apps to install

@@ -553,9 +553,9 @@ keys=hyprctl binds This section contains the Org blocks for tangling Nix code into the generated folders.

-
-

generated/flake.nix

-
+
+

generated/flake.nix

+

The Nix flake definition for Droidnix.

@@ -646,9 +646,9 @@ The Nix flake definition for Droidnix.
-
-

generated/modules/traveldroid/system/colors.nix

-
+
+

generated/modules/traveldroid/system/colors.nix

+

Setting the colors for Droidnix.

@@ -725,9 +725,9 @@ in
-
-

generated/hosts/traveldroid/boot.nix

-
+
+

generated/hosts/traveldroid/boot.nix

+
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
 { config, pkgs, lib, flakeRoot, ... }:
@@ -796,9 +796,9 @@ in
 
-
-

generated/hosts/traveldroid/hardware-configuration.nix

-
+
+

generated/hosts/traveldroid/hardware-configuration.nix

+
  1. Boot into NixOS Live ISO or your installed system.
  2. Open a terminal.
  3. @@ -856,9 +856,9 @@ in
-
-

generated/hosts/traveldroid/host.nix

-
+
+

generated/hosts/traveldroid/host.nix

+
{ lib, config, pkgs, flakeRoot, import-tree, home-manager, ... }:
 
@@ -918,13 +918,13 @@ in
 
-
-

generated/traveldroid/modules/apps

-
+
+

generated/traveldroid/modules/apps

+
-
-

generated/modules/traveldroid/apps/2_b_installed.nix

-
+
+

generated/modules/traveldroid/apps/2_b_installed.nix

+

This installs a list of apps

@@ -1032,9 +1032,9 @@ in {
-
-

generated/modules/traveldroid/apps/emacs/emacs.nix

-
+
+

generated/modules/traveldroid/apps/emacs/emacs.nix

+

This installs emacs

@@ -1130,9 +1130,9 @@ in
-
-

generated/disabled/modules/traveldroid/apps/flameshot.nix

-
+
+

generated/disabled/modules/traveldroid/apps/flameshot.nix

+

This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

@@ -1192,9 +1192,9 @@ in
-
-

generated/modules/traveldroid/apps/kdeconnect.nix

-
+
+

generated/modules/traveldroid/apps/kdeconnect.nix

+

This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

@@ -1223,9 +1223,9 @@ in
-
-

generated/modules/traveldroid/apps/kitty.nix

-
+
+

generated/modules/traveldroid/apps/kitty.nix

+

This file sets up Kitty terminal

@@ -1277,9 +1277,9 @@ in
-
-

generated/modules/traveldroid/apps/starship.nix

-
+
+

generated/modules/traveldroid/apps/starship.nix

+

This file sets up starship prompt

@@ -1318,9 +1318,9 @@ in
-
-

generated/modules/traveldroid/apps/thunar.nix

-
+
+

generated/modules/traveldroid/apps/thunar.nix

+

This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

@@ -1366,9 +1366,9 @@ in
-
-

generated/modules/traveldroid/apps/wofi.nix

-
+
+

generated/modules/traveldroid/apps/wofi.nix

+

This is the install for Wofi, the launcher

@@ -1403,9 +1403,9 @@ in
-
-

generated/modules/traveldroid/apps/zenbrowser.nix

-
+
+

generated/modules/traveldroid/apps/zenbrowser.nix

+

This installs zen browser

@@ -1425,9 +1425,9 @@ in
-
-

generated/modules/traveldroid/apps/zeditor.nix

-
+
+

generated/modules/traveldroid/apps/zeditor.nix

+

This sets Zed Editor

@@ -1483,9 +1483,9 @@ in
-
-

generated/modules/traveldroid/apps/zsh.nix

-
+
+

generated/modules/traveldroid/apps/zsh.nix

+

This sets up the zsh in the terminal

@@ -1599,13 +1599,13 @@ in
-
-

generated/modules/traveldroid/desktop

-
+
+

generated/modules/traveldroid/desktop

+
-
-

generated/modules/traveldroid/desktop/fonts.nix

-
+
+

generated/modules/traveldroid/desktop/fonts.nix

+

This file installs and configures fonts

@@ -1623,9 +1623,9 @@ This file installs and configures fonts
-
-

generated/modules/traveldroid/desktop/gtk.nix

-
+
+

generated/modules/traveldroid/desktop/gtk.nix

+

Setting up GTK

@@ -1651,9 +1651,9 @@ in
-
-

generated/modules/traveldroid/desktop/hyprland.nix

-
+
+

generated/modules/traveldroid/desktop/hyprland.nix

+

Setting up Hyprland

@@ -1698,9 +1698,9 @@ in
-
-

generated/modules/traveldroid/desktop/stylix.nix

-
+
+

generated/modules/traveldroid/desktop/stylix.nix

+
{ lib, config, pkgs, flakeRoot, stylix, ... }:
 
@@ -1787,9 +1787,9 @@ in
 
-
-

generated/modules/traveldroid/desktop/wallpaper.nix

-
+
+

generated/modules/traveldroid/desktop/wallpaper.nix

+

Setting up wallpaper engine + wallpaper gui

@@ -1888,9 +1888,9 @@ in
-
-

generated/modules/traveldroid/desktop/waybar.nix

-
+
+

generated/modules/traveldroid/desktop/waybar.nix

+

This file installs and configures waybar

@@ -1936,9 +1936,9 @@ in
-
-

generated/modules/traveldroid/desktop/wayland.nix

-
+
+

generated/modules/traveldroid/desktop/wayland.nix

+
{ lib, config, pkgs, ... }:
 
@@ -1968,9 +1968,9 @@ in
 
-
-

generated/modules/traveldroid/desktop/xdg.nix

-
+
+

generated/modules/traveldroid/desktop/xdg.nix

+

This sets the XDG implementation

@@ -2041,13 +2041,13 @@ in
-
-

generated/modules/traveldroid/system

-
+
+

generated/modules/traveldroid/system

+
-
-

generated/modules/traveldroid/system/audio.nix

-
+
+

generated/modules/traveldroid/system/audio.nix

+
{ lib, config, pkgs, ... }:
 
@@ -2066,9 +2066,9 @@ in
 
-
-

generated/modules/traveldroid/system/avahi.nix

-
+
+

generated/modules/traveldroid/system/avahi.nix

+

Avahi helps discovering services

@@ -2088,9 +2088,9 @@ Avahi helps discovering services
-
-

generated/modules/traveldroid/system/bluetooth.nix

-
+
+

generated/modules/traveldroid/system/bluetooth.nix

+

Installing Bluetooth services and supporting aps

@@ -2117,9 +2117,9 @@ in
-
-

generated/modules/traveldroid/system/copy_scripts.nix

-
+
+

generated/modules/traveldroid/system/copy_scripts.nix

+

This copies any scripts from generated.config/scripts to ~/.config/scripts and makes any .sh files executable.

@@ -2160,9 +2160,9 @@ in
-
-

generated/modules/traveldroid/system/dbus.nix

-
+
+

generated/modules/traveldroid/system/dbus.nix

+

This sets the dbus implementation

@@ -2189,9 +2189,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/firewall.nix

-
+
+

generated/modules/traveldroid/system/firewall.nix

+

This sets the firewall.

@@ -2272,9 +2272,9 @@ This sets the firewall.
-
-

generated/modules/traveldroid/system/hypridle.nix

-
+
+

generated/modules/traveldroid/system/hypridle.nix

+

This installs hypridle

@@ -2330,9 +2330,9 @@ in
-
-

generated/modules/traveldroid/system/hyprlock.nix

-
+
+

generated/modules/traveldroid/system/hyprlock.nix

+

This installs hyprlock

@@ -2389,9 +2389,9 @@ in
-
-

generated/modules/traveldroid/system/gnome-keyring.nix

-
+
+

generated/modules/traveldroid/system/gnome-keyring.nix

+

This sets the dbus implementation

@@ -2439,9 +2439,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/login-tuigreet.nix

-
+
+

generated/modules/traveldroid/system/login-tuigreet.nix

+

This sets up tuigreeter which is not fancy but imho fits the aesthetic I am aiming for

@@ -2488,9 +2488,9 @@ in
-
-

generated/modules/traveldroid/system/networking.nix

-
+
+

generated/modules/traveldroid/system/networking.nix

+

This sets the networking.

@@ -2539,9 +2539,9 @@ This sets the networking.
-
-

generated/modules/traveldroid/system/nix.nix

-
+
+

generated/modules/traveldroid/system/nix.nix

+
{ lib, config, ... }:
 {
@@ -2564,9 +2564,9 @@ This sets the networking.
 
-
-

generated/modules/traveldroid/system/printing.nix

-
+
+

generated/modules/traveldroid/system/printing.nix

+

This sets the dbus implementation

@@ -2590,9 +2590,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/quickshell.nix

-
+
+

generated/modules/traveldroid/system/quickshell.nix

+

This sets the quickshell implementation

@@ -2638,9 +2638,9 @@ in
-
-

generated/modules/traveldroid/system/swaync.nix

-
+
+

generated/modules/traveldroid/system/swaync.nix

+

This sets the dbus implementation

@@ -2689,13 +2689,13 @@ in
-
-

generated/users

-
+
+

generated/users

+
-
-

generated/users/

-
+
+

generated/users/

+

This is the default user, just search and replace henrov another name if you want to change

@@ -2757,9 +2757,9 @@ in

These are all the prepared config files

-
-

generated/.config/emacs/early-init.el

-
+
+

generated/.config/emacs/early-init.el

+

This contaions emacs

@@ -2860,9 +2860,9 @@ package-archive-priorities '(("gnu" . 99)
-
-

generated/.config/emacs/init.el

-
+
+

generated/.config/emacs/init.el

+

This contaions emacs

@@ -3272,9 +3272,9 @@ the top of the file."
-
-

generated/.config/hypr/animations.conf

-
+
+

generated/.config/hypr/animations.conf

+

These are config files for .config/hypr

@@ -3293,9 +3293,9 @@ These are config files for .config/hypr
-
-

generated/.config/hypr/behaviour.conf

-
+
+

generated/.config/hypr/behaviour.conf

+

These are config files for .config/hypr

@@ -3317,9 +3317,9 @@ input {
-
-

generated/.config/hypr/bindings.conf

-
+
+

generated/.config/hypr/bindings.conf

+

These are config files for .config/hypr

@@ -3496,9 +3496,9 @@ bind = $mainMod, U, exec, qs -c updater
-
-

generated/.config/hypr/exec-once.conf

-
+
+

generated/.config/hypr/exec-once.conf

+

These are config files for .config/hypr

@@ -3519,9 +3519,9 @@ exec-once = waybar
-
-

generated/.config/hypr/hypridle.conf

-
+
+

generated/.config/hypr/hypridle.conf

+

These are config files for .config/hypr

@@ -3552,9 +3552,9 @@ listener {
-
-

generated/.config/hypr/hyprlock.conf

-
+
+

generated/.config/hypr/hyprlock.conf

+

These are config files for .config/hypr

@@ -3584,9 +3584,9 @@ input-field {
-
-

generated/.config/hypr/hyprland.conf

-
+
+

generated/.config/hypr/hyprland.conf

+

These are config files for .config/hypr

@@ -3605,9 +3605,9 @@ source = ./workspace-rules.conf
-
-

generated/.config/hypr/layer-rules.conf

-
+
+

generated/.config/hypr/layer-rules.conf

+

These are config files for .config/hypr

@@ -3620,9 +3620,9 @@ layerrule = xray 1, match:namespace swaync-control-center
-
-

generated/.config/hypr/layout.conf

-
+
+

generated/.config/hypr/layout.conf

+

These settings control Hyprland config

@@ -3637,9 +3637,9 @@ scrolling {
-
-

generated/.config/hypr/monitor-rules.conf

-
+
+

generated/.config/hypr/monitor-rules.conf

+

These are config files for .config/hypr

@@ -3650,9 +3650,9 @@ monitor = eDP-1, preferred, auto-left, 1.5
-
-

generated/.config/hypr/theming.conf

-
+
+

generated/.config/hypr/theming.conf

+

These are config files for .config/hypr

@@ -3718,9 +3718,9 @@ misc {
-
-

generated/.config/hypr/window-rules.conf

-
+
+

generated/.config/hypr/window-rules.conf

+

These are config files for .config/hypr

@@ -3772,6 +3772,16 @@ windowrule { pin = on } +#Quickshell updater +windowrule { + name = quickshell-updater + match:title = quickshell-updater + opacity = 1.0 0.8 + float = on + move = cursor -50% 0 + pin = on +} + #Quickshell layoutswitcher windowrule { name = quickshell-layoutswitcher @@ -3811,9 +3821,9 @@ windowrule {
-
-

generated/.config/hypr/workspace-rules.conf

-
+
+

generated/.config/hypr/workspace-rules.conf

+

These setttings configure rules for workspaces

@@ -3828,9 +3838,9 @@ workspace = 6, monitor:DP-1 #, layout:dwindle
-
-

generated/.config/quickshell/media/shell.qml

-
+
+

generated/.config/quickshell/media/shell.qml

+

offers a audio widget

@@ -4224,9 +4234,9 @@ ShellRoot {
-
-

generated/.config/quickshell/powermenu/shell.qml

-
+
+

generated/.config/quickshell/powermenu/shell.qml

+

Provides a powermenu

@@ -4374,15 +4384,14 @@ ShellRoot {
-
-

generated/.config/quickshell/updater/shell.qml

-
+
+

generated/.config/quickshell/updater/shell.qml

+

Updates the system

-
// --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
-import Quickshell
+
import Quickshell
 import Quickshell.Io
 import QtQuick
 import QtQuick.Layouts
@@ -4399,38 +4408,35 @@ ShellRoot {
         readonly property color blue:     "#89b4fa"
         readonly property color red:      "#f38ba8"
         readonly property color yellow:   "#f9e2af"
-        readonly property color peach:    "#fab387"
     }
 
-    QtObject {
-        id: state
-        property int    step:    0
-        property bool   running: false
-        property bool   failed:  false
-        property string log:     ""
+    property int     currentStep:  0
+    property bool    isRunning:    false
+    property bool    isFailed:     false
+    property string  currentLog:   ""
+    property bool    started:      false
 
-        readonly property var steps: [
-            { label: "Updating flake.lock",   cmd: ["nix", "flake", "update"],                                                     cwd: "/home/henrov/Repos/nixos/Droidnix" },
-            { label: "Updating Flatpaks",      cmd: ["flatpak", "update", "-y"],                                                    cwd: "/home/henrov" },
-            { label: "Staging changes",        cmd: ["git", "add", "."],                                                            cwd: "/home/henrov/Repos/nixos/Droidnix" },
-            { label: "Committing changes",     cmd: ["git", "commit", "-m", "Updated system"],                                      cwd: "/home/henrov/Repos/nixos/Droidnix" },
-            { label: "Pushing to remote",      cmd: ["git", "push"],                                                                cwd: "/home/henrov/Repos/nixos/Droidnix" },
-            { label: "Rebuilding NixOS",       cmd: ["sudo", "nixos-rebuild", "switch", "--flake", ".#traveldroid"],                cwd: "/home/henrov/Repos/nixos/Droidnix" },
-            { label: "Reloading Hyprland",     cmd: ["hyprctl", "reload"],                                                         cwd: "/home/henrov" },
-        ]
-    }
+    readonly property var steps: [
+        { label: "Updating flake.lock",  cmd: ["nix", "flake", "update"],                                       cwd: "/home/henrov/Repos/nixos/Droidnix" },
+        { label: "Updating Flatpaks",    cmd: ["flatpak", "update", "-y"],                                      cwd: "/home/henrov" },
+        { label: "Staging changes",      cmd: ["git", "add", "."],                                              cwd: "/home/henrov/Repos/nixos/Droidnix" },
+        { label: "Committing changes",   cmd: ["git", "commit", "-m", "Updated system"],                        cwd: "/home/henrov/Repos/nixos/Droidnix" },
+        { label: "Pushing to remote",    cmd: ["git", "push"],                                                  cwd: "/home/henrov/Repos/nixos/Droidnix" },
+        { label: "Rebuilding NixOS",     cmd: ["sudo", "nixos-rebuild", "switch", "--flake", ".#traveldroid"],  cwd: "/home/henrov/Repos/nixos/Droidnix" },
+        { label: "Reloading Hyprland",   cmd: ["hyprctl", "reload"],                                           cwd: "/home/henrov" },
+    ]
 
     function runStep(index) {
-        if (index >= state.steps.length) {
-            state.running = false
-            state.step    = state.steps.length
+        if (index >= steps.length) {
+            isRunning   = false
+            currentStep = steps.length
             return
         }
-        state.step = index
-        state.log  = ""  // clear log for each new step
-        state.running = true
-        stepProc.command          = state.steps[index].cmd
-        stepProc.workingDirectory = state.steps[index].cwd
+        currentStep = index
+        currentLog  = ""
+        isRunning   = true
+        stepProc.command          = steps[index].cmd
+        stepProc.workingDirectory = steps[index].cwd
         stepProc.running          = true
     }
 
@@ -4439,32 +4445,31 @@ ShellRoot {
 
         stdout: SplitParser {
             onRead: (line) => {
-                state.log = (state.log + "\n" + line).split("\n").slice(-8).join("\n").trim()
+                currentLog = (currentLog + "\n" + line).split("\n").slice(-8).join("\n").trim()
             }
         }
 
         stderr: SplitParser {
             onRead: (line) => {
                 if (line.trim() !== "")
-                    state.log = (state.log + "\n" + line).split("\n").slice(-8).join("\n").trim()
+                    currentLog = (currentLog + "\n" + line).split("\n").slice(-8).join("\n").trim()
             }
         }
 
         onExited: (code) => {
-            if (code !== 0 && state.step !== 3) {
-                state.failed  = true
-                state.running = false
+            if (code !== 0 && currentStep !== 3) {
+                isFailed  = true
+                isRunning = false
             } else {
-                runStep(state.step + 1)
+                runStep(currentStep + 1)
             }
         }
     }
 
     FloatingWindow {
-        id: root
         title:   "quickshell-updater"
         visible: true
-        width:   520
+        width:   540
         height:  contentCol.implicitHeight + 32
         color:   "transparent"
 
@@ -4473,7 +4478,6 @@ ShellRoot {
             onActivated: Qt.quit()
         }
 
-        // Gradient border
         Rectangle {
             anchors.fill:    parent
             anchors.margins: -2
@@ -4499,119 +4503,89 @@ ShellRoot {
                     right:   parent.right
                     margins: 20
                 }
-                spacing: 12
+                spacing: 8
 
-                // Title
                 Text {
-                    text:           "  System Update"
-                    color:          colors.text
-                    font.pixelSize: 15
-                    font.bold:      true
-                    Layout.topMargin: 4
+                    text:             "  System Update"
+                    color:            colors.text
+                    font.pixelSize:   15
+                    font.bold:        true
+                    Layout.topMargin: 8
                 }
 
-                // Steps list
+                // Steps
                 Repeater {
-                    model: state.steps.length
+                    model: steps.length
 
                     delegate: RowLayout {
-                        spacing: 10
+                        spacing:          10
                         Layout.fillWidth: true
 
-                        // Icon
+                        readonly property bool done:    !isFailed && (index < currentStep || (!isRunning && currentStep === steps.length))
+                        readonly property bool active:  isRunning && index === currentStep
+                        readonly property bool failed:  isFailed && index === currentStep
+                        readonly property bool pending: !done && !active && !failed
+
+                        // icon
                         Text {
                             font.pixelSize: 14
-                            text: {
-                                if (state.failed && index === state.step) return "✗"
-                                if (index < state.step || (!state.running && index === state.step)) return "✓"
-                                if (index === state.step && state.running) return "…"
-                                return "○"
-                            }
-                            color: {
-                                if (state.failed && index === state.step) return colors.red
-                                if (index < state.step || (!state.running && !state.failed && index === state.step)) return colors.green
-                                if (index === state.step && state.running) return colors.yellow
-                                return colors.surface1
-                            }
+                            text:  failed ? "✗" : done ? "✓" : active ? "›" : "○"
+                            color: failed ? colors.red : done ? colors.green : active ? colors.yellow : colors.surface1
                         }
 
+                        // label
                         Text {
-                            text:           state.steps[index].label
+                            text:           steps[index].label
                             font.pixelSize: 13
-                            color: {
-                                if (state.failed && index === state.step) return colors.red
-                                if (index < state.step)                   return colors.subtext0
-                                if (index === state.step)                 return colors.text
-                                return colors.surface1
-                            }
-                        }
-
-                        // Spinner for active step
-                        Text {
-                            visible:        index === state.step && state.running
-                            text:           "⠋"
-                            color:          colors.blue
-                            font.pixelSize: 13
-
-                            RotationAnimation on rotation {
-                                running:  index === state.step && state.running
-                                from:     0; to: 360
-                                duration: 1000
-                                loops:    Animation.Infinite
-                            }
+                            color:          failed ? colors.red : done ? colors.green : active ? colors.text : colors.surface1
                         }
                     }
                 }
 
-                // Log output
+                // Log box
                 Rectangle {
-                    Layout.fillWidth:    true
-                    height:              160
-                    radius:              8
-                    color:               colors.surface0
-                    visible:             state.log !== ""
+                    Layout.fillWidth: true
+                    height:           160
+                    radius:           8
+                    color:            colors.surface0
+                    visible:          currentLog !== "" && started
 
                     Text {
                         anchors {
                             fill:    parent
-                            margins: 8
+                            margins: 10
                         }
-                        text:            state.log
-                        color:           colors.subtext0
-                        font.pixelSize:  11
-                        font.family:     "monospace"
-                        wrapMode:        Text.WrapAnywhere
-                        elide:           Text.ElideLeft
+                        text:              currentLog
+                        color:             colors.subtext0
+                        font.pixelSize:    11
+                        font.family:       "monospace"
+                        wrapMode:          Text.WrapAnywhere
                         verticalAlignment: Text.AlignBottom
                     }
                 }
 
-                // Status / close
+                // Bottom bar
                 RowLayout {
-                    Layout.fillWidth: true
-                    Layout.bottomMargin: 4
+                    Layout.fillWidth:    true
+                    Layout.bottomMargin: 8
 
                     Text {
-                        text: {
-                            if (state.failed)                          return "✗ Failed at: " + state.steps[state.step].label
-                            if (state.step === state.steps.length)     return "✓ Done!"
-                            if (state.running)                         return "Running…"
-                            return "Press Start"
-                        }
-                        color: {
-                            if (state.failed)                      return colors.red
-                            if (state.step === state.steps.length) return colors.green
-                            return colors.subtext0
-                        }
                         font.pixelSize: 12
+                        text: {
+                            if (!started)                        return "Press Start to begin"
+                            if (isFailed)                        return "✗ Failed at: " + steps[currentStep].label
+                            if (currentStep === steps.length)    return "✓ All done!"
+                            if (isRunning)                       return steps[currentStep].label + "…"
+                            return ""
+                        }
+                        color: isFailed ? colors.red : currentStep === steps.length ? colors.green : colors.subtext0
                     }
 
                     Item { Layout.fillWidth: true }
 
-                    // Start button
                     Rectangle {
-                        visible: !state.running && state.step === 0
-                        width:  80; height: 28
+                        visible: !started
+                        width: 80; height: 28
                         radius: 14
                         gradient: Gradient {
                             orientation: Gradient.Horizontal
@@ -4620,29 +4594,31 @@ ShellRoot {
                         }
                         Text {
                             anchors.centerIn: parent
-                            text:  "Start"
-                            color: colors.base
-                            font.pixelSize: 12
-                            font.bold: true
+                            text:             "Start"
+                            color:            colors.base
+                            font.pixelSize:   12
+                            font.bold:        true
                         }
                         MouseArea {
                             anchors.fill: parent
                             cursorShape:  Qt.PointingHandCursor
-                            onClicked:    runStep(0)
+                            onClicked: {
+                                started = true
+                                runStep(0)
+                            }
                         }
                     }
 
-                    // Close button
                     Rectangle {
-                        visible: !state.running && state.step > 0
-                        width:  80; height: 28
+                        visible: !isRunning && started
+                        width: 80; height: 28
                         radius: 14
                         color:  colors.surface1
                         Text {
                             anchors.centerIn: parent
-                            text:  "Close"
-                            color: colors.text
-                            font.pixelSize: 12
+                            text:             currentStep === steps.length ? "Close" : "Dismiss"
+                            color:            colors.text
+                            font.pixelSize:   12
                         }
                         MouseArea {
                             anchors.fill: parent
@@ -4659,9 +4635,9 @@ ShellRoot {
 
-
-

generated/.config/quickshell/layoutswitcher/shell.qml

-
+
+

generated/.config/quickshell/layoutswitcher/shell.qml

+

Provides a layout menu

@@ -4808,9 +4784,9 @@ ShellRoot {
-
-

generated/.config/waybar/scripts/batterywarn.sh

-
+
+

generated/.config/waybar/scripts/batterywarn.sh

+

Providing an media

@@ -4827,9 +4803,9 @@ fi
-
-

generated/.config/waybar/scripts/media.sh

-
+
+

generated/.config/waybar/scripts/media.sh

+

Providing an media

@@ -4928,9 +4904,9 @@ jq -c -n \
-
-

generated/.config/scripts/numlock-check.sh

-
+
+

generated/.config/scripts/numlock-check.sh

+

Count keyboards and enable numlock if more then 1, else disable

@@ -4952,9 +4928,9 @@ fi
-
-

generated/.config/scripts/power.sh

-
+
+

generated/.config/scripts/power.sh

+

Enables a terminal power menu

@@ -5009,9 +4985,9 @@ main
-
-

generated/.config/wofi/scripts/wofi-launcher.sh

-
+
+

generated/.config/wofi/scripts/wofi-launcher.sh

+

Providing an media

@@ -5026,9 +5002,9 @@ Providing an media
-
-

generated/.config/shared/colors.css

-
+
+

generated/.config/shared/colors.css

+

A file containing color variables

@@ -5069,9 +5045,9 @@ A file containing color variables
-
-

generated/.config/starship.toml

-
+
+

generated/.config/starship.toml

+

These are config files for Starship

@@ -5359,9 +5335,9 @@ crust = "#181926"
-
-

generated/.config/stylix/stylix.conf

-
+
+

generated/.config/stylix/stylix.conf

+

These are config files for .config/stylix

@@ -5398,9 +5374,9 @@ icons = {
-
-

generated/.config/stylix/palette.json

-
+
+

generated/.config/stylix/palette.json

+

These are config files for .config/stylix

@@ -5430,9 +5406,9 @@ These are config files for .config/stylix
-
-

generated/.config/stylix/palette.html

-
+
+

generated/.config/stylix/palette.html

+

These are config files for .config/stylix

@@ -5509,9 +5485,9 @@ These are config files for .config/stylix
-
-

generated/.config/swaync/config.json

-
+
+

generated/.config/swaync/config.json

+

These are config files for waybar

@@ -5572,9 +5548,9 @@ These are config files for waybar
-
-

generated/.config/swaync/style.css

-
+
+

generated/.config/swaync/style.css

+

These are config files for waybar

@@ -5767,9 +5743,9 @@ These are config files for waybar
-
-

generated/.config/waybar/config.jsonc

-
+
+

generated/.config/waybar/config.jsonc

+

These are config files for waybar

@@ -6106,9 +6082,9 @@ These are config files for waybar
-
-

generated/.config/waybar/style-dark.css

-
+
+

generated/.config/waybar/style-dark.css

+

This file contains all css for waybar

@@ -6368,9 +6344,9 @@ label#custom-windows:not(.active) {
-
-

generated/.config/waybar/scripts/bluetooth-status.sh

-
+
+

generated/.config/waybar/scripts/bluetooth-status.sh

+

These are config files for waybar

@@ -6395,9 +6371,9 @@ printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
-
-

generated/.config/waybar/scripts/hypr-workspaces.sh

-
+
+

generated/.config/waybar/scripts/hypr-workspaces.sh

+

These are config files for waybar

@@ -6439,9 +6415,9 @@ jq -c -n \
-
-

generated/.config/waybar/scripts/hypr-workspacesmenu.sh

-
+
+

generated/.config/waybar/scripts/hypr-workspacesmenu.sh

+

These are config files for waybar

@@ -6463,9 +6439,9 @@ hyprctl dispatch focuswindow address:"$addr"
-
-

generated/.config/waybar/scripts/kdeconnect-status.sh

-
+
+

generated/.config/waybar/scripts/kdeconnect-status.sh

+

These are config files for waybar

@@ -6489,9 +6465,9 @@ fi
-
-

generated/.config/waypaper/config.ini

-
+
+

generated/.config/waypaper/config.ini

+

These are config files for waypaper

@@ -6528,9 +6504,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/.config/waypaper/config.ini

-
+
+

generated/.config/waypaper/config.ini

+

These are config files for .config/waypaper

@@ -6566,9 +6542,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/.config/wofi/config

-
+
+

generated/.config/wofi/config

+

These are config files for .config/wofi

@@ -6595,9 +6571,9 @@ prompt = > ...
-
-

generated/.config/wofi/style.css

-
+
+

generated/.config/wofi/style.css

+

This is the default layout for wofi

@@ -6693,9 +6669,9 @@ This is the default layout for wofi
-
-

generated/.config/zed/settings.json

-
+
+

generated/.config/zed/settings.json

+

These are config files for Zed editor

@@ -6733,9 +6709,9 @@ These are config files for Zed editor
-
-

generated/.config/zsh/.zshrc

-
+
+

generated/.config/zsh/.zshrc

+

This sets up the zsh in the terminal

@@ -6772,7 +6748,7 @@ cd() {

Author: Henro Veijer

-

Created: 2026-04-29 wo 12:55

+

Created: 2026-04-29 wo 13:01

Validate

diff --git a/Droidnix/README.org b/Droidnix/README.org index 341eaecb5..a8dfe0cf7 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -3081,6 +3081,16 @@ windowrule { pin = on } +#Quickshell updater +windowrule { + name = quickshell-updater + match:title = quickshell-updater + opacity = 1.0 0.8 + float = on + move = cursor -50% 0 + pin = on +} + #Quickshell layoutswitcher windowrule { name = quickshell-layoutswitcher @@ -3666,7 +3676,6 @@ ShellRoot { ** =generated/.config/quickshell/updater/shell.qml= Updates the system #+BEGIN_SRC qml :tangle generated/.config/quickshell/updater/shell.qml :noweb yes :mkdirp yes :eval never -// --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. --- import Quickshell import Quickshell.Io import QtQuick @@ -3684,38 +3693,35 @@ ShellRoot { readonly property color blue: "#89b4fa" readonly property color red: "#f38ba8" readonly property color yellow: "#f9e2af" - readonly property color peach: "#fab387" } - QtObject { - id: state - property int step: 0 - property bool running: false - property bool failed: false - property string log: "" + property int currentStep: 0 + property bool isRunning: false + property bool isFailed: false + property string currentLog: "" + property bool started: false - readonly property var steps: [ - { label: "Updating flake.lock", cmd: ["nix", "flake", "update"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, - { label: "Updating Flatpaks", cmd: ["flatpak", "update", "-y"], cwd: "/home/henrov" }, - { label: "Staging changes", cmd: ["git", "add", "."], cwd: "/home/henrov/Repos/nixos/Droidnix" }, - { label: "Committing changes", cmd: ["git", "commit", "-m", "Updated system"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, - { label: "Pushing to remote", cmd: ["git", "push"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, - { label: "Rebuilding NixOS", cmd: ["sudo", "nixos-rebuild", "switch", "--flake", ".#traveldroid"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, - { label: "Reloading Hyprland", cmd: ["hyprctl", "reload"], cwd: "/home/henrov" }, - ] - } + readonly property var steps: [ + { label: "Updating flake.lock", cmd: ["nix", "flake", "update"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, + { label: "Updating Flatpaks", cmd: ["flatpak", "update", "-y"], cwd: "/home/henrov" }, + { label: "Staging changes", cmd: ["git", "add", "."], cwd: "/home/henrov/Repos/nixos/Droidnix" }, + { label: "Committing changes", cmd: ["git", "commit", "-m", "Updated system"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, + { label: "Pushing to remote", cmd: ["git", "push"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, + { label: "Rebuilding NixOS", cmd: ["sudo", "nixos-rebuild", "switch", "--flake", ".#traveldroid"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, + { label: "Reloading Hyprland", cmd: ["hyprctl", "reload"], cwd: "/home/henrov" }, + ] function runStep(index) { - if (index >= state.steps.length) { - state.running = false - state.step = state.steps.length + if (index >= steps.length) { + isRunning = false + currentStep = steps.length return } - state.step = index - state.log = "" // clear log for each new step - state.running = true - stepProc.command = state.steps[index].cmd - stepProc.workingDirectory = state.steps[index].cwd + currentStep = index + currentLog = "" + isRunning = true + stepProc.command = steps[index].cmd + stepProc.workingDirectory = steps[index].cwd stepProc.running = true } @@ -3724,32 +3730,31 @@ ShellRoot { stdout: SplitParser { onRead: (line) => { - state.log = (state.log + "\n" + line).split("\n").slice(-8).join("\n").trim() + currentLog = (currentLog + "\n" + line).split("\n").slice(-8).join("\n").trim() } } stderr: SplitParser { onRead: (line) => { if (line.trim() !== "") - state.log = (state.log + "\n" + line).split("\n").slice(-8).join("\n").trim() + currentLog = (currentLog + "\n" + line).split("\n").slice(-8).join("\n").trim() } } onExited: (code) => { - if (code !== 0 && state.step !== 3) { - state.failed = true - state.running = false + if (code !== 0 && currentStep !== 3) { + isFailed = true + isRunning = false } else { - runStep(state.step + 1) + runStep(currentStep + 1) } } } FloatingWindow { - id: root title: "quickshell-updater" visible: true - width: 520 + width: 540 height: contentCol.implicitHeight + 32 color: "transparent" @@ -3758,7 +3763,6 @@ ShellRoot { onActivated: Qt.quit() } - // Gradient border Rectangle { anchors.fill: parent anchors.margins: -2 @@ -3784,119 +3788,89 @@ ShellRoot { right: parent.right margins: 20 } - spacing: 12 + spacing: 8 - // Title Text { - text: " System Update" - color: colors.text - font.pixelSize: 15 - font.bold: true - Layout.topMargin: 4 + text: " System Update" + color: colors.text + font.pixelSize: 15 + font.bold: true + Layout.topMargin: 8 } - // Steps list + // Steps Repeater { - model: state.steps.length + model: steps.length delegate: RowLayout { - spacing: 10 + spacing: 10 Layout.fillWidth: true - // Icon + readonly property bool done: !isFailed && (index < currentStep || (!isRunning && currentStep === steps.length)) + readonly property bool active: isRunning && index === currentStep + readonly property bool failed: isFailed && index === currentStep + readonly property bool pending: !done && !active && !failed + + // icon Text { font.pixelSize: 14 - text: { - if (state.failed && index === state.step) return "✗" - if (index < state.step || (!state.running && index === state.step)) return "✓" - if (index === state.step && state.running) return "…" - return "○" - } - color: { - if (state.failed && index === state.step) return colors.red - if (index < state.step || (!state.running && !state.failed && index === state.step)) return colors.green - if (index === state.step && state.running) return colors.yellow - return colors.surface1 - } + text: failed ? "✗" : done ? "✓" : active ? "›" : "○" + color: failed ? colors.red : done ? colors.green : active ? colors.yellow : colors.surface1 } + // label Text { - text: state.steps[index].label + text: steps[index].label font.pixelSize: 13 - color: { - if (state.failed && index === state.step) return colors.red - if (index < state.step) return colors.subtext0 - if (index === state.step) return colors.text - return colors.surface1 - } - } - - // Spinner for active step - Text { - visible: index === state.step && state.running - text: "⠋" - color: colors.blue - font.pixelSize: 13 - - RotationAnimation on rotation { - running: index === state.step && state.running - from: 0; to: 360 - duration: 1000 - loops: Animation.Infinite - } + color: failed ? colors.red : done ? colors.green : active ? colors.text : colors.surface1 } } } - // Log output + // Log box Rectangle { - Layout.fillWidth: true - height: 160 - radius: 8 - color: colors.surface0 - visible: state.log !== "" + Layout.fillWidth: true + height: 160 + radius: 8 + color: colors.surface0 + visible: currentLog !== "" && started Text { anchors { fill: parent - margins: 8 + margins: 10 } - text: state.log - color: colors.subtext0 - font.pixelSize: 11 - font.family: "monospace" - wrapMode: Text.WrapAnywhere - elide: Text.ElideLeft + text: currentLog + color: colors.subtext0 + font.pixelSize: 11 + font.family: "monospace" + wrapMode: Text.WrapAnywhere verticalAlignment: Text.AlignBottom } } - // Status / close + // Bottom bar RowLayout { - Layout.fillWidth: true - Layout.bottomMargin: 4 + Layout.fillWidth: true + Layout.bottomMargin: 8 Text { - text: { - if (state.failed) return "✗ Failed at: " + state.steps[state.step].label - if (state.step === state.steps.length) return "✓ Done!" - if (state.running) return "Running…" - return "Press Start" - } - color: { - if (state.failed) return colors.red - if (state.step === state.steps.length) return colors.green - return colors.subtext0 - } font.pixelSize: 12 + text: { + if (!started) return "Press Start to begin" + if (isFailed) return "✗ Failed at: " + steps[currentStep].label + if (currentStep === steps.length) return "✓ All done!" + if (isRunning) return steps[currentStep].label + "…" + return "" + } + color: isFailed ? colors.red : currentStep === steps.length ? colors.green : colors.subtext0 } Item { Layout.fillWidth: true } - // Start button Rectangle { - visible: !state.running && state.step === 0 - width: 80; height: 28 + visible: !started + width: 80; height: 28 radius: 14 gradient: Gradient { orientation: Gradient.Horizontal @@ -3905,29 +3879,31 @@ ShellRoot { } Text { anchors.centerIn: parent - text: "Start" - color: colors.base - font.pixelSize: 12 - font.bold: true + text: "Start" + color: colors.base + font.pixelSize: 12 + font.bold: true } MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor - onClicked: runStep(0) + onClicked: { + started = true + runStep(0) + } } } - // Close button Rectangle { - visible: !state.running && state.step > 0 - width: 80; height: 28 + visible: !isRunning && started + width: 80; height: 28 radius: 14 color: colors.surface1 Text { anchors.centerIn: parent - text: "Close" - color: colors.text - font.pixelSize: 12 + text: currentStep === steps.length ? "Close" : "Dismiss" + color: colors.text + font.pixelSize: 12 } MouseArea { anchors.fill: parent diff --git a/Droidnix/generated/.config/hypr/window-rules.conf b/Droidnix/generated/.config/hypr/window-rules.conf index 8a8bb14d9..728965d09 100644 --- a/Droidnix/generated/.config/hypr/window-rules.conf +++ b/Droidnix/generated/.config/hypr/window-rules.conf @@ -46,6 +46,16 @@ windowrule { pin = on } +#Quickshell updater +windowrule { + name = quickshell-updater + match:title = quickshell-updater + opacity = 1.0 0.8 + float = on + move = cursor -50% 0 + pin = on +} + #Quickshell layoutswitcher windowrule { name = quickshell-layoutswitcher diff --git a/Droidnix/generated/.config/quickshell/updater/shell.qml b/Droidnix/generated/.config/quickshell/updater/shell.qml index ff9d8fcdb..cf1db96dc 100644 --- a/Droidnix/generated/.config/quickshell/updater/shell.qml +++ b/Droidnix/generated/.config/quickshell/updater/shell.qml @@ -1,5 +1,4 @@ // --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. --- -// --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. --- import Quickshell import Quickshell.Io import QtQuick @@ -17,38 +16,35 @@ ShellRoot { readonly property color blue: "#89b4fa" readonly property color red: "#f38ba8" readonly property color yellow: "#f9e2af" - readonly property color peach: "#fab387" } - QtObject { - id: state - property int step: 0 - property bool running: false - property bool failed: false - property string log: "" + property int currentStep: 0 + property bool isRunning: false + property bool isFailed: false + property string currentLog: "" + property bool started: false - readonly property var steps: [ - { label: "Updating flake.lock", cmd: ["nix", "flake", "update"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, - { label: "Updating Flatpaks", cmd: ["flatpak", "update", "-y"], cwd: "/home/henrov" }, - { label: "Staging changes", cmd: ["git", "add", "."], cwd: "/home/henrov/Repos/nixos/Droidnix" }, - { label: "Committing changes", cmd: ["git", "commit", "-m", "Updated system"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, - { label: "Pushing to remote", cmd: ["git", "push"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, - { label: "Rebuilding NixOS", cmd: ["sudo", "nixos-rebuild", "switch", "--flake", ".#traveldroid"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, - { label: "Reloading Hyprland", cmd: ["hyprctl", "reload"], cwd: "/home/henrov" }, - ] - } + readonly property var steps: [ + { label: "Updating flake.lock", cmd: ["nix", "flake", "update"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, + { label: "Updating Flatpaks", cmd: ["flatpak", "update", "-y"], cwd: "/home/henrov" }, + { label: "Staging changes", cmd: ["git", "add", "."], cwd: "/home/henrov/Repos/nixos/Droidnix" }, + { label: "Committing changes", cmd: ["git", "commit", "-m", "Updated system"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, + { label: "Pushing to remote", cmd: ["git", "push"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, + { label: "Rebuilding NixOS", cmd: ["sudo", "nixos-rebuild", "switch", "--flake", ".#traveldroid"], cwd: "/home/henrov/Repos/nixos/Droidnix" }, + { label: "Reloading Hyprland", cmd: ["hyprctl", "reload"], cwd: "/home/henrov" }, + ] function runStep(index) { - if (index >= state.steps.length) { - state.running = false - state.step = state.steps.length + if (index >= steps.length) { + isRunning = false + currentStep = steps.length return } - state.step = index - state.log = "" // clear log for each new step - state.running = true - stepProc.command = state.steps[index].cmd - stepProc.workingDirectory = state.steps[index].cwd + currentStep = index + currentLog = "" + isRunning = true + stepProc.command = steps[index].cmd + stepProc.workingDirectory = steps[index].cwd stepProc.running = true } @@ -57,32 +53,31 @@ ShellRoot { stdout: SplitParser { onRead: (line) => { - state.log = (state.log + "\n" + line).split("\n").slice(-8).join("\n").trim() + currentLog = (currentLog + "\n" + line).split("\n").slice(-8).join("\n").trim() } } stderr: SplitParser { onRead: (line) => { if (line.trim() !== "") - state.log = (state.log + "\n" + line).split("\n").slice(-8).join("\n").trim() + currentLog = (currentLog + "\n" + line).split("\n").slice(-8).join("\n").trim() } } onExited: (code) => { - if (code !== 0 && state.step !== 3) { - state.failed = true - state.running = false + if (code !== 0 && currentStep !== 3) { + isFailed = true + isRunning = false } else { - runStep(state.step + 1) + runStep(currentStep + 1) } } } FloatingWindow { - id: root title: "quickshell-updater" visible: true - width: 520 + width: 540 height: contentCol.implicitHeight + 32 color: "transparent" @@ -91,7 +86,6 @@ ShellRoot { onActivated: Qt.quit() } - // Gradient border Rectangle { anchors.fill: parent anchors.margins: -2 @@ -117,119 +111,89 @@ ShellRoot { right: parent.right margins: 20 } - spacing: 12 + spacing: 8 - // Title Text { - text: " System Update" - color: colors.text - font.pixelSize: 15 - font.bold: true - Layout.topMargin: 4 + text: " System Update" + color: colors.text + font.pixelSize: 15 + font.bold: true + Layout.topMargin: 8 } - // Steps list + // Steps Repeater { - model: state.steps.length + model: steps.length delegate: RowLayout { - spacing: 10 + spacing: 10 Layout.fillWidth: true - // Icon + readonly property bool done: !isFailed && (index < currentStep || (!isRunning && currentStep === steps.length)) + readonly property bool active: isRunning && index === currentStep + readonly property bool failed: isFailed && index === currentStep + readonly property bool pending: !done && !active && !failed + + // icon Text { font.pixelSize: 14 - text: { - if (state.failed && index === state.step) return "✗" - if (index < state.step || (!state.running && index === state.step)) return "✓" - if (index === state.step && state.running) return "…" - return "○" - } - color: { - if (state.failed && index === state.step) return colors.red - if (index < state.step || (!state.running && !state.failed && index === state.step)) return colors.green - if (index === state.step && state.running) return colors.yellow - return colors.surface1 - } + text: failed ? "✗" : done ? "✓" : active ? "›" : "○" + color: failed ? colors.red : done ? colors.green : active ? colors.yellow : colors.surface1 } + // label Text { - text: state.steps[index].label + text: steps[index].label font.pixelSize: 13 - color: { - if (state.failed && index === state.step) return colors.red - if (index < state.step) return colors.subtext0 - if (index === state.step) return colors.text - return colors.surface1 - } - } - - // Spinner for active step - Text { - visible: index === state.step && state.running - text: "⠋" - color: colors.blue - font.pixelSize: 13 - - RotationAnimation on rotation { - running: index === state.step && state.running - from: 0; to: 360 - duration: 1000 - loops: Animation.Infinite - } + color: failed ? colors.red : done ? colors.green : active ? colors.text : colors.surface1 } } } - // Log output + // Log box Rectangle { - Layout.fillWidth: true - height: 160 - radius: 8 - color: colors.surface0 - visible: state.log !== "" + Layout.fillWidth: true + height: 160 + radius: 8 + color: colors.surface0 + visible: currentLog !== "" && started Text { anchors { fill: parent - margins: 8 + margins: 10 } - text: state.log - color: colors.subtext0 - font.pixelSize: 11 - font.family: "monospace" - wrapMode: Text.WrapAnywhere - elide: Text.ElideLeft + text: currentLog + color: colors.subtext0 + font.pixelSize: 11 + font.family: "monospace" + wrapMode: Text.WrapAnywhere verticalAlignment: Text.AlignBottom } } - // Status / close + // Bottom bar RowLayout { - Layout.fillWidth: true - Layout.bottomMargin: 4 + Layout.fillWidth: true + Layout.bottomMargin: 8 Text { - text: { - if (state.failed) return "✗ Failed at: " + state.steps[state.step].label - if (state.step === state.steps.length) return "✓ Done!" - if (state.running) return "Running…" - return "Press Start" - } - color: { - if (state.failed) return colors.red - if (state.step === state.steps.length) return colors.green - return colors.subtext0 - } font.pixelSize: 12 + text: { + if (!started) return "Press Start to begin" + if (isFailed) return "✗ Failed at: " + steps[currentStep].label + if (currentStep === steps.length) return "✓ All done!" + if (isRunning) return steps[currentStep].label + "…" + return "" + } + color: isFailed ? colors.red : currentStep === steps.length ? colors.green : colors.subtext0 } Item { Layout.fillWidth: true } - // Start button Rectangle { - visible: !state.running && state.step === 0 - width: 80; height: 28 + visible: !started + width: 80; height: 28 radius: 14 gradient: Gradient { orientation: Gradient.Horizontal @@ -238,29 +202,31 @@ ShellRoot { } Text { anchors.centerIn: parent - text: "Start" - color: colors.base - font.pixelSize: 12 - font.bold: true + text: "Start" + color: colors.base + font.pixelSize: 12 + font.bold: true } MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor - onClicked: runStep(0) + onClicked: { + started = true + runStep(0) + } } } - // Close button Rectangle { - visible: !state.running && state.step > 0 - width: 80; height: 28 + visible: !isRunning && started + width: 80; height: 28 radius: 14 color: colors.surface1 Text { anchors.centerIn: parent - text: "Close" - color: colors.text - font.pixelSize: 12 + text: currentStep === steps.length ? "Close" : "Dismiss" + color: colors.text + font.pixelSize: 12 } MouseArea { anchors.fill: parent