Contribute to npshell
List of commands, configuration and other usage of np
.
Play sounds in queue as soon as there are any.
--stop
- Stop daemon playback.
# Start the daemon, let it run in the background.
# Could be done at system startup.
np daemon &
Shows the sound currently playing, or first in queue if the player isn't started.
See sounds currently in the queue.
Advance to the next sound in the queue.
Add some sounds to the queue.
-
Limit
- Default is 3.
- You can also use "all".
-
Order
- Default is "shuffle".
-
You can also use "in-order".
-
Path
- Default is
$PWD
. - You can use paths
- to sounds
- to folders
- or "-" to read null-delimited paths from stdin.
- Default is
# Add the default number of shuffled sounds from the current folder.
np add
# Add a single sound to the queue.
np add path/to/sound.mp3
# Add 25 shuffled sounds from the current folder.
np add 25
# Add the first 2 sounds from the current folder.
np add 2 in-order
# Add shuffled sounds from a folder, hierarchically.
np add path/to/folder/with/sounds/
# Add an album.
np add all in-order "Jazz/My Favorite Album/"
# Add sounds by null-delimited paths from stdin.
find . -iname '*best of*.mp3' -print0 | np add -
# Add 10 shuffled sounds from the combined list of a single sound, stdin and a folder.
find . -iname '*best of*.mp3' -print0 | np add 10 path/to/sound.mp3 - path/to/folder/with/sounds/
Start consuming queue by playing back in the current terminal.
- Limit
- Default is -1, meaning no limit.
Empty the queue.
Remove non-existant files from queue.
Show the 999 most recently played sounds.
Create a file with a cached list of all sounds in the current folder, including subfolders.
--force
- Recreate the index file even if it already exists.
--clean
- Remove index files.
--recursive
- Perform the action in subfolders.
Display configuration, runtime and status values.
Settings are read from ~/.np/config.sh
. The format is one setting=value
per line.
- Default is 3.
- Set the number of sounds
np add
adds unless overridden.
- Default is "shuffle".
- The order
np add
adds files in. - Can also be "in-order".
- Default is "false".
- Enable debug output.
- Default is "true".
- Automatically generate index files per folder sounds are loaded from. See
np index
.