diff --git a/configs/packages.nix b/configs/packages.nix index ef32cf5..9ed5a75 100644 --- a/configs/packages.nix +++ b/configs/packages.nix @@ -153,7 +153,6 @@ in { niveumPackages.mpv-iptv niveumPackages.devanagari niveumPackages.betacode # ancient greek betacode to unicode converter - niveumPackages.meteo niveumPackages.jq-lsp niveumPackages.swallow # window swallowing niveumPackages.literature-quote diff --git a/flake.nix b/flake.nix index 5620cc5..c1a16c7 100644 --- a/flake.nix +++ b/flake.nix @@ -391,7 +391,6 @@ mansplain = pkgs.callPackage packages/mansplain.nix {}; manual-sort = pkgs.callPackage packages/manual-sort.nix {}; menu-calc = pkgs.callPackage packages/menu-calc.nix {}; - meteo = pkgs.callPackage packages/meteo.nix {}; noise-waves = pkgs.callPackage packages/noise-waves.nix {}; mpv-radio = pkgs.callPackage packages/mpv-radio.nix {di-fm-key-file = "/dev/null";}; mpv-tuner = pkgs.callPackage packages/mpv-tuner.nix {di-fm-key-file = "/dev/null";}; diff --git a/packages/meteo.nix b/packages/meteo.nix deleted file mode 100644 index 12ad97c..0000000 --- a/packages/meteo.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ - writers, - lib, - jq, - curl, - xdotool, - nsxiv, - gnused, - defaultStation ? 103840, -}: -writers.writeDashBin "meteo" '' - # usage: meteo --list - # usage: meteo --update - # usage: meteo STATION - set -efu - - PATH=$PATH:${lib.makeBinPath [jq curl xdotool nsxiv gnused]} - - # TODO XDG - CONFIG_DIR=$HOME/.config/wetter - STATIONS_FILE=$CONFIG_DIR/stations.json - - case ''${1-} in - --list) - sed -n 's/^\s*\(--[^)]\+\))$/\1/p' "$0" - jq -r -n \ - --slurpfile stations_file "$STATIONS_FILE" \ - ' - $stations_file[0] as $known_stations | - - $known_stations | keys[] - ' - exit - ;; - --update) - mkdir -p "$(dirname "$STATIONS_FILE")" - exec >"$STATIONS_FILE" - - curl -fsSL http://wetterstationen.meteomedia.de/ | - jq -Rrs ' - def decodeHTML: - gsub("ä";"ä") | - gsub("ö";"ö") | - gsub("ü";"ü") | - gsub("Ä";"Ä") | - gsub("Ö";"Ö") | - gsub("Ü";"Ü") | - gsub("ß";"ß") - ; - [ - match(".*";"g") - .captures | - map({"\(.name)":(.string)}) | - add | - {"\(.name|decodeHTML)":(.station|tonumber)} - ] | - add - ' - exit - ;; - esac - - # set -x - - station=''${1-${toString defaultStation}} - station=$(jq -e -n \ - --arg station "$station" \ - --slurpfile stations_file "$STATIONS_FILE" \ - ' - $stations_file[0] as $known_stations | - - $station | - if test("^[0-9]+$") then - tonumber - else - $known_stations[.] - end - ') - cache="/tmp/''${LOGNAME}_wetter_$station.png" - curl -sSL \ - "http://wetterstationen.meteomedia.de/messnetz/vorhersagegrafik/$station.png" \ - -o "$cache" - - if window_id=$(xdotool search --name "^nsxiv - $cache$"); then - xdotool key --window "$window_id" r - else - nsxiv "$cache" & - fi -'' diff --git a/systems/kibbeh/configuration.nix b/systems/kibbeh/configuration.nix index 52be559..57b550b 100644 --- a/systems/kibbeh/configuration.nix +++ b/systems/kibbeh/configuration.nix @@ -79,7 +79,6 @@ niveumPackages.mpv-tv telegram-desktop (niveumPackages.mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; }) - niveumPackages.meteo spotify ]; };