Giter VIP home page Giter VIP logo

Comments (13)

mcthomas avatar mcthomas commented on May 30, 2024

Hi @joeldcanfield, thanks for submitting an issue. Could you please share a screenshot of your terminal running np in a large window? the album art really should be flush to the left side. Glad that you like the player, hopefully we can adjust it to your liking.

Edit: also, what terminal emulator are you using?

from apple-music-cli-player.

joeldcanfield avatar joeldcanfield commented on May 30, 2024

Indeed
am sh

from apple-music-cli-player.

joeldcanfield avatar joeldcanfield commented on May 30, 2024

Using Mac's native terminal.

from apple-music-cli-player.

mcthomas avatar mcthomas commented on May 30, 2024

Ah, did you install viu? That's a dependency for np, along with the separate album art AppleScript in /src. The text is padded to make room for the album art. If you don't want to, you can run np with the text mode flag.

from apple-music-cli-player.

joeldcanfield avatar joeldcanfield commented on May 30, 2024

d'oh. used it on my first test, then forgot. looking for a pure text tool, so I'll alias and script it so it's text mode.

I'm munging the time played/left display and the volume/mute, shuffle/repeat buttons with text as well. I'm an old command line curmudgeon who likes what he likes.

For my edification, which part of the code does the padding for the album covers? I just couldn't find it.

Another question: is there a "quit" function? I've been doing CTRL-C which isn't elegant, but it works.

from apple-music-cli-player.

mcthomas avatar mcthomas commented on May 30, 2024

Currently these calls at line 98 of am.sh:
<(printf %s "")
handle the padding. BUT, you shouldn't need to remove these, you can just call np with am np -t so that it runs in text-mode, flush to the left side of your terminal window. That would save you some time.

There isn't a keybinding to exit, I think CTRL-C is standard and it would be redundant to add a key for exiting for a bash script. But if you think that's the wrong approach, I'd think about adding a q keybinding.

from apple-music-cli-player.

joeldcanfield avatar joeldcanfield commented on May 30, 2024

No need for a quit key unless the masses clamor. I sort of expected it, but only because it's common, not because it's necessary.

I do see the padding, and the space left for the art. Thanks.

Another question, but please, let me know when you tire of my pestering: the colors set on lines 64-66 use standard bash codes, and I'm wondering if there's a way to have access to all 256 xterm colors, as I do, for instance, with my zsh prompt.

Thanks again for being willing to chat.

from apple-music-cli-player.

mcthomas avatar mcthomas commented on May 30, 2024

No worries! I love talking about this stuff. You can call any of the 256 xterm colors the same way, just replace the ANSI color codes in the bash variables. For example:
cyan=$(echo -e '\e[00;36m')
Could instead include an xterm color code:
cyan=$(echo -e '\e[38;5;123m')
And that should display correctly if your terminal emulator supports xterm colors.

from apple-music-cli-player.

joeldcanfield avatar joeldcanfield commented on May 30, 2024

Perfect. It does.

I'd skipped past the 8-bit ANSI color coding. Useful. Thanks.

from apple-music-cli-player.

joeldcanfield avatar joeldcanfield commented on May 30, 2024

Rethinking my position on the 'q' option. Currently, I have to hit 'p', then CTRL-C. If I forget to pause the playback, I hit CTRL-C which kills the script but not the player, then after a moment of confusion while the music continues, I look for one of the other ways to stop the Music app.

An option to both stop playback and kill the script would be more elegant and intuitive.

from apple-music-cli-player.

mcthomas avatar mcthomas commented on May 30, 2024

np was written as a "widget" because it runs in parallel to Music.app, but it cannot run in place of it. So the philosophy is that you can already have music playing, and decide to run the script. It's an optional controller, but playback can be played or paused universally with the special Fn keys / Touch Bar, or within Music.app itself. With that in mind, I wouldn't want the script to halt a user's playback just because they sent a kill signal to the np widget.

I feel that an option to just kill the script could be useful though, thank you for that suggestion.

from apple-music-cli-player.

joeldcanfield avatar joeldcanfield commented on May 30, 2024

Understood. I've been modifying my copy of the script visually. Might continue making some changes just for my own use, if that doesn't feel invasive and impertinent to you.

from apple-music-cli-player.

mcthomas avatar mcthomas commented on May 30, 2024

Yes of course! Feel free to fork it too!

from apple-music-cli-player.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.