add nvidia module
This commit is contained in:
2
.config/waybar/nvidia.sh
Executable file
2
.config/waybar/nvidia.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
nvidia-smi --query-gpu=utilization.gpu,power.draw,temperature.gpu --format=csv,noheader | xargs -I {} echo "GPU: {}°C"
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@define-color nvidia-green #76b900;
|
||||||
|
|
||||||
#other,
|
#other,
|
||||||
#other-drawer,
|
#other-drawer,
|
||||||
#stats,
|
#stats,
|
||||||
@@ -16,6 +18,7 @@
|
|||||||
#memory,
|
#memory,
|
||||||
#temperature,
|
#temperature,
|
||||||
#disk,
|
#disk,
|
||||||
|
#nvidia,
|
||||||
#network {
|
#network {
|
||||||
padding: 0 0.5em;
|
padding: 0 0.5em;
|
||||||
}
|
}
|
||||||
@@ -36,6 +39,10 @@
|
|||||||
color: @blue;
|
color: @blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#custom-nvidia {
|
||||||
|
color: @nvidia-green;
|
||||||
|
}
|
||||||
|
|
||||||
#network.disconnected {
|
#network.disconnected {
|
||||||
background-color: #f53c3c;
|
background-color: #f53c3c;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ in {
|
|||||||
statsStyle = builtins.readFile ./styles/stats.css;
|
statsStyle = builtins.readFile ./styles/stats.css;
|
||||||
workspacesStyle = builtins.readFile ./styles/workspaces.css;
|
workspacesStyle = builtins.readFile ./styles/workspaces.css;
|
||||||
in lib.mkIf cfg.enable {
|
in lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
home.file.".config/waybar" = {
|
||||||
|
recursive = true;
|
||||||
|
source = ../../.config/waybar;
|
||||||
|
};
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
#systemd.enable = true;
|
#systemd.enable = true;
|
||||||
@@ -29,7 +34,7 @@ in {
|
|||||||
modules-right = [ "group/stats" "group/other" ];
|
modules-right = [ "group/stats" "group/other" ];
|
||||||
"group/stats" = {
|
"group/stats" = {
|
||||||
"orientation" = "horizontal";
|
"orientation" = "horizontal";
|
||||||
"modules" = [ "network" "cpu" "memory" "disk" "temperature" ];
|
"modules" = [ "network" "cpu" "memory" "disk" "temperature" "custom/nvidia" ];
|
||||||
};
|
};
|
||||||
"group/other" = {
|
"group/other" = {
|
||||||
"orientation" = "horizontal";
|
"orientation" = "horizontal";
|
||||||
@@ -136,6 +141,12 @@ in {
|
|||||||
};
|
};
|
||||||
"status-icons" = { "paused" = "⏸"; };
|
"status-icons" = { "paused" = "⏸"; };
|
||||||
};
|
};
|
||||||
|
"custom/nvidia" = {
|
||||||
|
"format" = "{}";
|
||||||
|
"interval" = 5;
|
||||||
|
"exec" = "~/.config/waybar/nvidia.sh";
|
||||||
|
"exec-if" = "nvidia-smi";
|
||||||
|
};
|
||||||
"tray".icon-size = 21;
|
"tray".icon-size = 21;
|
||||||
"tray".spacing = 10;
|
"tray".spacing = 10;
|
||||||
"hyprland/window" = {
|
"hyprland/window" = {
|
||||||
|
|||||||
Reference in New Issue
Block a user