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-left = "i3 xwindow";
|
||||||
modules-center = "";
|
modules-center = "";
|
||||||
modules-right =
|
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-click = "pointer";
|
||||||
cursor-scroll = "ns-resize";
|
cursor-scroll = "ns-resize";
|
||||||
enable-ipc = true;
|
enable-ipc = true;
|
||||||
@@ -177,6 +177,11 @@ in {
|
|||||||
format-prefix-foreground = config.stylix.base16Scheme.base0D;
|
format-prefix-foreground = config.stylix.base16Scheme.base0D;
|
||||||
label = "%percentage:2%%";
|
label = "%percentage:2%%";
|
||||||
};
|
};
|
||||||
|
"module/cpu-wattage" = {
|
||||||
|
type = "custom/script";
|
||||||
|
exec = "~/.config/polybar/cpu-wattage.sh";
|
||||||
|
interval = 3;
|
||||||
|
};
|
||||||
"module/cpu-temp" = {
|
"module/cpu-temp" = {
|
||||||
type = "custom/script";
|
type = "custom/script";
|
||||||
exec = "~/.config/polybar/temperature.sh";
|
exec = "~/.config/polybar/temperature.sh";
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ in
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
getTotalPowerUsed
|
getTotalPowerUsed
|
||||||
watchCurrentPowerUsed
|
watchCurrentPowerUsed
|
||||||
|
powerjoular # monitor power usage
|
||||||
fzf # fuzzy finder
|
fzf # fuzzy finder
|
||||||
bat # fancy cat
|
bat # fancy cat
|
||||||
fd # nicer find
|
fd # nicer find
|
||||||
|
|||||||
@@ -112,6 +112,11 @@
|
|||||||
EndSection
|
EndSection
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
#zenpower for ryzen
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
||||||
|
boot.kernelModules = ["zenpower"];
|
||||||
|
boot.blacklistedKernelModules = [ "k10temp" ];
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user