From 3bdb37559d2c912dc829ab240428a01b71802ff9 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 22 Sep 2024 11:03:43 +0200 Subject: [PATCH] adjust mpris and nvidia on polybar --- .config/polybar/nvidia.sh | 2 +- .config/polybar/player-mpris-simple.sh | 6 ++++-- home-manager/i3.nix | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.config/polybar/nvidia.sh b/.config/polybar/nvidia.sh index f6ce33f..3de20d6 100755 --- a/.config/polybar/nvidia.sh +++ b/.config/polybar/nvidia.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -nvidia-smi --query-gpu=utilization.gpu,temperature.gpu --format=csv,noheader | xargs -I {} echo "GPU: {}°C" +nvidia-smi --query-gpu=utilization.gpu,power.draw,temperature.gpu --format=csv,noheader | xargs -I {} echo "GPU: {}°C" diff --git a/.config/polybar/player-mpris-simple.sh b/.config/polybar/player-mpris-simple.sh index 59419b7..4c20fae 100755 --- a/.config/polybar/player-mpris-simple.sh +++ b/.config/polybar/player-mpris-simple.sh @@ -4,9 +4,11 @@ player_status=$(playerctl status 2> /dev/null) if [ "$player_status" = "Playing" ]; then - echo " $(playerctl metadata artist) - $(playerctl metadata title)" + #echo " $(playerctl metadata artist) - $(playerctl metadata title)" + echo " $(playerctl metadata title)" elif [ "$player_status" = "Paused" ]; then - echo " $(playerctl metadata artist) - $(playerctl metadata title)" + #echo " $(playerctl metadata artist) - $(playerctl metadata title)" + echo " $(playerctl metadata title)" else echo "" # nothing is playing fi diff --git a/home-manager/i3.nix b/home-manager/i3.nix index cf70a9e..5e56f98 100644 --- a/home-manager/i3.nix +++ b/home-manager/i3.nix @@ -182,9 +182,10 @@ in { exec = "~/.config/polybar/temperature.sh"; interval = 3; }; - "module/gpu" = { type = "custom/script"; + format-foreground = "76b900"; #nvidia green + label = "%output:0:35:...%"; exec = "~/.config/polybar/nvidia.sh"; interval = 3; };