pinwheel: Update music and use naviterm
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user