add wattage to polybar
This commit is contained in:
8
.config/polybar/cpu-wattage.sh
Executable file
8
.config/polybar/cpu-wattage.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
wattage=$(sensors zenpower-pci-00c3 | grep SVI2_P_Core | sed "s/SVI2_P_Core: //g")
|
||||
|
||||
if [ -z "$wattage" ]; then
|
||||
wattage=""
|
||||
fi
|
||||
|
||||
echo "$wattage"
|
||||
@@ -56,7 +56,7 @@ in {
|
||||
modules-left = "i3 xwindow";
|
||||
modules-center = "";
|
||||
modules-right =
|
||||
"music network memory cpu cpu-temp gpu pulseaudio date tray";
|
||||
"music network memory cpu cpu-wattage cpu-temp gpu pulseaudio date tray";
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
enable-ipc = true;
|
||||
@@ -177,6 +177,11 @@ in {
|
||||
format-prefix-foreground = config.stylix.base16Scheme.base0D;
|
||||
label = "%percentage:2%%";
|
||||
};
|
||||
"module/cpu-wattage" = {
|
||||
type = "custom/script";
|
||||
exec = "~/.config/polybar/cpu-wattage.sh";
|
||||
interval = 3;
|
||||
};
|
||||
"module/cpu-temp" = {
|
||||
type = "custom/script";
|
||||
exec = "~/.config/polybar/temperature.sh";
|
||||
|
||||
@@ -32,6 +32,7 @@ in
|
||||
environment.systemPackages = with pkgs; [
|
||||
getTotalPowerUsed
|
||||
watchCurrentPowerUsed
|
||||
powerjoular # monitor power usage
|
||||
fzf # fuzzy finder
|
||||
bat # fancy cat
|
||||
fd # nicer find
|
||||
|
||||
@@ -112,6 +112,11 @@
|
||||
EndSection
|
||||
'';
|
||||
|
||||
|
||||
#zenpower for ryzen
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
||||
boot.kernelModules = ["zenpower"];
|
||||
boot.blacklistedKernelModules = [ "k10temp" ];
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
Reference in New Issue
Block a user