From ebccb33b4eb60a07e667332665181ba9ad352615 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 21 Oct 2026 15:05:50 +0200 Subject: ... --- .../shell/quickshell-plugins/Chrono.cpp | 2 +- .../shell/quickshell-plugins/Systemd.cpp | 1 + accounts/gkleen@skadhi/zsh/default.nix | 1 - accounts/gkleen@skadhi/zsh/zshrc | 20 +------------------- 4 files changed, 3 insertions(+), 21 deletions(-) (limited to 'accounts/gkleen@skadhi') diff --git a/accounts/gkleen@skadhi/shell/quickshell-plugins/Chrono.cpp b/accounts/gkleen@skadhi/shell/quickshell-plugins/Chrono.cpp index 22b3469b..2487cddd 100644 --- a/accounts/gkleen@skadhi/shell/quickshell-plugins/Chrono.cpp +++ b/accounts/gkleen@skadhi/shell/quickshell-plugins/Chrono.cpp @@ -75,7 +75,7 @@ void Chrono::schedule(const std::chrono::time_point& } QString Chrono::format(const QString& fmt) const { - return QString::fromStdString(std::format(std::runtime_format(fmt.toStdString()), std::chrono::zoned_time(std::chrono::current_zone(), std::chrono::time_point_cast(this->currentTime)))); + return QString::fromStdString(std::format(std::dynamic_format(fmt.toStdString()), std::chrono::zoned_time(std::chrono::current_zone(), std::chrono::time_point_cast(this->currentTime)))); } QDateTime Chrono::date() const { diff --git a/accounts/gkleen@skadhi/shell/quickshell-plugins/Systemd.cpp b/accounts/gkleen@skadhi/shell/quickshell-plugins/Systemd.cpp index 1fa236f6..a1fbe0d3 100644 --- a/accounts/gkleen@skadhi/shell/quickshell-plugins/Systemd.cpp +++ b/accounts/gkleen@skadhi/shell/quickshell-plugins/Systemd.cpp @@ -1,6 +1,7 @@ #include "Systemd.hpp" #include +#include #include #include diff --git a/accounts/gkleen@skadhi/zsh/default.nix b/accounts/gkleen@skadhi/zsh/default.nix index 1e11d639..d0046bc1 100644 --- a/accounts/gkleen@skadhi/zsh/default.nix +++ b/accounts/gkleen@skadhi/zsh/default.nix @@ -43,7 +43,6 @@ let sysConfig.systemd.package sysConfig.programs.ssh.package gnused - miniserve p7zip ]; execer = with pkgs; [ diff --git a/accounts/gkleen@skadhi/zsh/zshrc b/accounts/gkleen@skadhi/zsh/zshrc index c532b308..ea792718 100644 --- a/accounts/gkleen@skadhi/zsh/zshrc +++ b/accounts/gkleen@skadhi/zsh/zshrc @@ -7,7 +7,6 @@ dir() { wormhole=false gitWorktree="" modifyPDF="" - miniserve=false while getopts ':t:a:d:ir:wg:p:m' arg; do case $arg in @@ -26,7 +25,6 @@ dir() { "w") wormhole=true ;; "g") gitWorktree=${OPTARG} ;; "p") modifyPDF=${OPTARG:a} ;; - "m") miniserve=true ;; *) printf "Invalid option: %s\n" $arg >&2; exit 2 ;; esac done @@ -50,11 +48,6 @@ dir() { gitWorktree="" fi - miniservePIDFile="" - if [[ ${miniserve} = "true" ]]; then - miniservePIDFile=$(mktemp --tmpdir --suffix=.pid) - fi - cleanup() { if [[ -n ${modifyPDF} ]]; then @@ -64,10 +57,6 @@ dir() { magick -verbose "${pages[@]}" $(mktemp --tmpdir=${modifyPDF:h} ${modifyPDF:t:r}_XXXXXXXXXX.${modifyPDF:e}) modifyPDF="" fi - if [[ -n ${miniservePIDFile} ]]; then - command kill --verbose -- $(cat ${miniservePIDFile}) && wait $(cat ${miniservePIDFile}) - miniservePIDFile="" - fi } ( @@ -155,12 +144,7 @@ dir() { cd $(pwd) # Needed for mounting to work - if [[ ${miniserve} = "true" ]]; then - miniserve --random-route --hidden --enable-tar-gz --enable-zip . & - echo $! > "${miniservePIDFile}" - fi - - if [[ ${#@} -eq 0 ]] && [[ ${miniserve} != "true" ]] || [[ $forceShell = "true" ]]; then + if [[ ${#@} -eq 0 ]] || [[ $forceShell = "true" ]]; then isSingleDir() { typeset -a contents contents=(*(N) .*(N)) @@ -175,8 +159,6 @@ dir() { while d=$(isSingleDir); do cd ${d}; done zsh - elif [[ ${miniserve} == "true" ]]; then - wait $(cat "${miniservePIDFile}") fi ) } -- cgit v1.2.3