diff --git a/home-manager/modules/ezpcusr.nix b/home-manager/modules/ezpcusr.nix index 5bd2a87..9e2a13b 100644 --- a/home-manager/modules/ezpcusr.nix +++ b/home-manager/modules/ezpcusr.nix @@ -56,13 +56,6 @@ in { default = false; description = "If this PC has a battery"; }; - - location = mkOption { - description = "Your location (used for weather)"; - example = "US-12345"; - default = ""; - type = types.str; - }; }; config = lib.mkIf cfg.enable { @@ -300,14 +293,11 @@ in { target = lib.mkDefault "sway-session.target"; }; - settings.mainbar = let - # weatherCommand = f: "(${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=${f}' || echo 'ERR') | ${pkgs.gnused}/bin/sed 's/^Unknown.*/ERR/' | ${pkgs.coreutils}/bin/tr -s ' '"; - weatherCommand = f: "(${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?u&format=${f}' || echo 'ERR') | ${pkgs.gnused}/bin/sed 's/^Unknown.*/ERR/' | ${pkgs.gnused}/bin/sed -e 's/[ +]//g' -e 's/0\\.0/0/g' -e 's/0\\./\\./g' -e 's/mph//g' -e 's/°F/°/g'"; - in { + settings.mainbar = { position = lib.mkDefault "left"; height = lib.mkDefault null; - modules-left = ["sway/workspaces" "custom/spacer" "custom/weather-temp" "custom/weather-precip" "custom/weather-wind"]; + modules-left = ["sway/workspaces" "custom/spacer"]; modules-center = ["clock#1" "clock#2" "custom/spacer" "custom/media" "custom/spacer" "clock#3" "clock#4" "custom/spacer" "clock#5"]; modules-right = ["pulseaudio" "custom/spacer" "memory" "custom/spacer" "cpu"] ++ lib.optionals cfg.battery ["custom/spacer" "battery"] ++ ["custom/spacer" "tray"]; @@ -317,25 +307,6 @@ in { tooltip = lib.mkDefault false; }; - "custom/weather-temp" = { - exec = lib.mkDefault (weatherCommand "%c+%t"); - on-click = lib.mkDefault "${pkgs.xdg-utils}/bin/xdg-open 'https://weather.com/weather/today/l/85625'"; - on-click-right = lib.mkDefault "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'"; - interval = lib.mkDefault 300; - }; - "custom/weather-precip" = { - exec = lib.mkDefault (weatherCommand "🌧️+%p"); - on-click = lib.mkDefault "${pkgs.xdg-utils}/bin/xdg-open 'https://www.lightningmaps.org/'"; - on-click-right = lib.mkDefault "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'"; - interval = lib.mkDefault 300; - }; - "custom/weather-wind" = { - exec = lib.mkDefault (weatherCommand "🌬️+%w"); - on-click = lib.mkDefault "${pkgs.xdg-utils}/bin/xdg-open 'https://www.ventusky.com/"; - on-click-right = lib.mkDefault "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'"; - interval = lib.mkDefault 300; - }; - "custom/media" = { rotate = lib.mkDefault 90; max-length = lib.mkDefault 60; @@ -433,9 +404,6 @@ in { #disk, #tray, #mode, - #custom-weather-temp, - #custom-weather-precip, - #custom-weather-wind, #custom-media { color: @base06; background: @base00; @@ -450,10 +418,6 @@ in { #clock.3 { padding: 5px 0 0 0; } #clock.4 { padding: 0 0 5px 0; } - #custom-weather-temp { padding: 5px 0 0 0; } - #custom-weather-precip { padding: 5px 0; } - #custom-weather-wind { padding: 0 0 5px 0; } - #custom-media.playing { color: @base0A; }