diff options
Diffstat (limited to 'scripts/scrolling-title.nix')
| -rw-r--r-- | scripts/scrolling-title.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/scrolling-title.nix b/scripts/scrolling-title.nix index 91d0838..0351fa9 100644 --- a/scripts/scrolling-title.nix +++ b/scripts/scrolling-title.nix @@ -1,13 +1,16 @@ { pkgs }: pkgs.writeShellApplication { name = "scrolling-title"; - runtimeInputs = with pkgs; [ mpc coreutils ]; + runtimeInputs = with pkgs; [ + mpc + coreutils + ]; text = '' WIDTH=16 PADDING=" " - + RAW_STR=$(mpc current) - + if [ -z "$RAW_STR" ]; then echo "Stopped" exit 0 @@ -22,5 +25,5 @@ pkgs.writeShellApplication { # Output the scrolled window DOUBLE_STR="''$STR''$STR" echo "''${DOUBLE_STR:''$INDEX:''$WIDTH}" -''; + ''; } |
