Changed: Waybar
This commit is contained in:
		@@ -5,7 +5,6 @@
 | 
			
		||||
        ./hypridle.nix
 | 
			
		||||
        ./hyprlock.nix
 | 
			
		||||
        ./hyprpaper.nix
 | 
			
		||||
        ./waybar # Status Bar 
 | 
			
		||||
        ./rofi # App Launcher
 | 
			
		||||
        ./mako.nix # Notifyer
 | 
			
		||||
    ];
 | 
			
		||||
 
 | 
			
		||||
@@ -12,8 +12,6 @@ import sys
 | 
			
		||||
# - snowfall data
 | 
			
		||||
# - weather warnings
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### CONSTANTS ###
 | 
			
		||||
 | 
			
		||||
# api key - get it at https://openweathermap.org/
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										46
									
								
								home/hyprland/waybar/double-monitor.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								home/hyprland/waybar/double-monitor.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
			
		||||
{
 | 
			
		||||
  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 = [ "sway/workspaces" "sway/mode" "wlr/taskbar" ];
 | 
			
		||||
                modules-center = [ "sway/window" "custom/hello-from-waybar" ];
 | 
			
		||||
                modules-right = [ "mpd" "custom/mymodule#with-css-id" "temperature" ];
 | 
			
		||||
 | 
			
		||||
                "sway/workspaces" = {
 | 
			
		||||
                    disable-scroll = true;
 | 
			
		||||
                    all-outputs = true;
 | 
			
		||||
                };
 | 
			
		||||
                "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" = {
 | 
			
		||||
        source = ./configs;
 | 
			
		||||
        # copy the scripts directory recursively
 | 
			
		||||
        recursive = true;
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										54
									
								
								home/hyprland/waybar/single-monitor.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								home/hyprland/waybar/single-monitor.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
			
		||||
{
 | 
			
		||||
  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;
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
@@ -11,6 +11,7 @@
 | 
			
		||||
 | 
			
		||||
    ../../home/hyprland # Window Manager
 | 
			
		||||
    ../../home/themes/dark
 | 
			
		||||
    ../../home/hyprland/waybar/single-monitor.nix
 | 
			
		||||
 | 
			
		||||
    ../../home/programs/dev # Dev Tools
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user