{ pkgs, config, ... }: { programs.waybar = { enable = true; package = pkgs.waybar; settings = { mainBar = { layer = "top"; position = "top"; height = 30; output = [ "eDP-1" "DP-1" "HDMI-A-1" "Virtual-1" ]; modules-left = [ ]; modules-center = [ "custom/weather" ]; modules-right = [ "custom/hello-from-waybar" ]; "sway/workspaces" = { disable-scroll = true; all-outputs = true; }; "custom/weather": { exec: "python3 ~/.config/waybar/weather.py waybar"; restart-interval: 900; return-type: "json"; }, "custom/hello-from-waybar" = { format = "hello {}"; max-length = 40; interval = "once"; exec = pkgs.writeShellScript "hello-from-waybar" '' echo "from within waybar $USER" ''; }; }; }; }; home.file.".config/waybar" = { "weather.py".source = ./config/weather.py; "style.css".source = ./config/style.css # copy the scripts directory recursively #recursive = true; }; }