pinwheel: Update music and use naviterm

This commit is contained in:
Alexander Heldt
2025-10-20 18:47:46 +02:00
parent 87d1d96211
commit 9e45600e37
2 changed files with 17 additions and 12 deletions

View File

@@ -7,14 +7,14 @@
let
hyprlandEnabled = config.mod.hyprland.enable;
spotify-status = pkgs.writeShellScript "spotify-status" ''
STATUS=$(${pkgs.playerctl}/bin/playerctl -p spotify status 2>&1)
music-status = pkgs.writeShellScript "music-status" ''
STATUS=$(${pkgs.playerctl}/bin/playerctl -p naviterm,spotify status 2>&1)
if [ "$STATUS" = "No players found" ]; then
echo ""
else
FORMAT="{{markup_escape(xesam:title)}} - {{markup_escape(xesam:artist)}}"
OUTPUT=$(${pkgs.playerctl}/bin/playerctl -p spotify metadata --format "$FORMAT")
OUTPUT=$(${pkgs.playerctl}/bin/playerctl -p naviterm,spotify metadata --format "$FORMAT")
case "$STATUS" in
"Playing")
echo "<span font='14' rise='-3000'></span> $OUTPUT"
@@ -126,7 +126,7 @@ in
modules-left = lib.mkIf hyprlandEnabled [ "hyprland/workspaces" ];
modules-right = [
"custom/work-vpn-status"
"custom/spotify"
"custom/music"
"custom/container-status"
"custom/dunst"
"bluetooth"
@@ -142,8 +142,8 @@ in
interval = 2;
};
"custom/spotify" = {
exec = spotify-status;
"custom/music" = {
exec = music-status;
interval = 2;
max-length = 70;
tooltip = false;
@@ -222,7 +222,10 @@ in
height = 30;
spacing = 20;
fixed-center = false;
output = [ "HDMI-A-1" ];
output = [
"HDMI-A-1"
"DP-3"
];
modules-left = lib.mkIf hyprlandEnabled [ "hyprland/workspaces" ];
modules-right = [