Regenerated

This commit is contained in:
2026-04-29 11:54:26 +02:00
parent 5165e9b7df
commit 6c7cf81efe
5 changed files with 784 additions and 420 deletions
+129 -16
View File
@@ -2857,7 +2857,8 @@ bind = , workspace, exec, ~/.config/scripts/set-workspace-wallpaper.sh
#########################
# System stuff
#########################
bind = $mainMod, U, exec, kitty --class update-term -e bash -lc "~/.config/scripts/update.sh; exec bash"
# bind = $mainMod, U, exec, kitty --class update-term -e bash -lc "~/.config/scripts/update.sh; exec bash"
bind = $mainMod, U, exec, qs -c updater
#+END_SRC
** =generated/.config/hypr/exec-once.conf=
@@ -3666,6 +3667,98 @@ ShellRoot {
}
#+END_SRC
** =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
import Quickshell
ShellWindow {
id: root
width: 600
height: 380
visible: true
property int currentStep: 0
property int totalSteps: 4
property string status: "idle"
Column {
anchors.fill: parent
anchors.margins: 16
spacing: 10
Text {
text: "System Updater"
font.pixelSize: 20
}
ProgressBar {
from: 0
to: root.totalSteps
value: root.currentStep
width: parent.width
}
Text {
text: "Step " + root.currentStep + " / " + root.totalSteps
}
Rectangle {
width: parent.width
height: 180
ListView {
id: logView
anchors.fill: parent
model: logModel
}
ListModel {
id: logModel
}
}
Row {
spacing: 10
Button {
text: "Run update"
onClicked: updater.start()
}
Button {
text: "Close"
onClicked: root.visible = false
}
}
}
Process {
id: updater
command: ["bash", "/home/henrov/.config/scripts/update-engine.sh"]
onStdout: function(data) {
let line = data.trim()
logModel.append({ text: line })
if (line.startsWith("STEP:")) {
let parts = line.split(":")
root.currentStep = parseInt(parts[1])
}
if (line.startsWith("DONE")) {
root.status = "done"
}
if (line.startsWith("FAIL")) {
root.status = "error"
}
}
}
}
#+END_SRC
** =generated/.config/quickshell/layoutswitcher/shell.qml=
Provides a layout menu
#+BEGIN_SRC qml :tangle generated/.config/quickshell/layoutswitcher/shell.qml :noweb yes :mkdirp yes :eval never
@@ -3986,29 +4079,49 @@ main() {
main
#+END_SRC
** =generated/.config/scripts/update.sh=
** =generated/.config/scripts/update-engine.sh=
A file containing color variables
#+BEGIN_SRC sh :tangle generated/.config/scripts/update.sh :shebang "#!/usr/bin/env bash" :noweb yes :mkdirp yes :eval never
#+BEGIN_SRC sh :tangle generated/.config/scripts/update-engine.sh :shebang "#!/usr/bin/env bash" :noweb yes :mkdirp yes :eval never
set -uo pipefail
emit() { echo "$1"; }
step() {
echo "STEP:$1:$2"
}
ok() {
echo "OK:$1"
}
fail() {
echo "FAIL:$1"
}
REPO="/home/$USER/Repos/nixos/Droidnix"
HOSTNAME="$(hostname)"
cd "$REPO"
cd "$REPO" || exit 1
run() {
echo
echo "$1"
shift
"$@" || { echo "❌ Failed: $1"; exit 1; }
}
step 1 "Fixing ownership"
sudo chown -R "$USER":"wheel" "$REPO" || fail "ownership"
ok 1
run "Fixing ownership" sudo chown -R "$USER":"wheel" "$REPO"
run "Updating flake" nix flake update
run "Rebuilding NixOS" sudo nixos-rebuild switch --flake ".#$HOSTNAME" && hyprctl reload
run "Updating Flatpaks" flatpak uninstall --unused && flatpak update --appstream && flatpak update -y
step 2 "Updating flake"
nix flake update || fail "flake"
ok 2
echo
echo "✅ Done"
step 3 "Rebuilding system"
sudo nixos-rebuild switch --flake ".#$HOSTNAME" || fail "rebuild"
hyprctl reload
ok 3
step 4 "Flatpak cleanup"
flatpak uninstall --unused -y
flatpak update --appstream -y
flatpak update -y || fail "flatpak"
ok 4
emit "DONE"
#+END_SRC
** =generated/.config/wofi/scripts/wofi-launcher.sh=