From 395ca23e9599460cdfa91c34ae52296edf7cfd41 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 24 Apr 2026 09:35:22 +0200 Subject: ... --- accounts/gkleen@sif/niri.nix | 1 + overlays/FinanceQuote/default.nix | 11 +++++++++++ overlays/FinanceQuote/tradegate.patch | 18 ++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 overlays/FinanceQuote/default.nix create mode 100644 overlays/FinanceQuote/tradegate.patch diff --git a/accounts/gkleen@sif/niri.nix b/accounts/gkleen@sif/niri.nix index c7f450aa..098386d0 100644 --- a/accounts/gkleen@sif/niri.nix +++ b/accounts/gkleen@sif/niri.nix @@ -656,6 +656,7 @@ in { (sleaf "match" { app-id = "^emacs$"; }) (sleaf "match" { app-id = "^firefox$"; }) (sleaf "match" { app-id = "^gnucash$"; }) + (sleaf "exclude" { app-id = "^gnucash$"; title = "^(Securities|Price Database)$"; }) (plain "default-column-width" [(sleaf "proportion" (2. / 3.))]) ]) (plain "window-rule" [ diff --git a/overlays/FinanceQuote/default.nix b/overlays/FinanceQuote/default.nix new file mode 100644 index 00000000..45c7d833 --- /dev/null +++ b/overlays/FinanceQuote/default.nix @@ -0,0 +1,11 @@ +{ prev, final, ... }: { + perlPackages = (final.perl.override { + overrides = p: { + FinanceQuote = prev.perl.pkgs.FinanceQuote.overrideAttrs (oldAttrs: { + patches = (oldAttrs.patches or []) ++ [ + ./tradegate.patch + ]; + }); + }; + }).pkgs; +} diff --git a/overlays/FinanceQuote/tradegate.patch b/overlays/FinanceQuote/tradegate.patch new file mode 100644 index 00000000..f1081fc4 --- /dev/null +++ b/overlays/FinanceQuote/tradegate.patch @@ -0,0 +1,18 @@ +--- old/lib/Finance/Quote/Tradegate.pm ++++ new/lib/Finance/Quote/Tradegate.pm +@@ -98,12 +98,13 @@ + @child = $td1->content_list; + my $exchange = $child[0]; + + $td1 = ($lastvalue->look_down('_tag'=>'td'))[7]; + @child = $td1->content_list; +- my $date = substr($child[0], 0, 8); +- my $time = substr($child[0], 9, 5); # CE(S)T ++ $child[0] =~ /(?\d{2}\.\d{2}\.\d{2,4})\s*\/\s*(?