Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/livenl/spotify-tmux-applescript
To show the current playing artist and track in your tmux statusbar.
https://github.com/livenl/spotify-tmux-applescript
applescript macos osascript shell spotify tmux
Last synced: 6 days ago
JSON representation
To show the current playing artist and track in your tmux statusbar.
- Host: GitHub
- URL: https://github.com/livenl/spotify-tmux-applescript
- Owner: LiveNL
- License: mit
- Created: 2023-03-16T07:41:44.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-16T22:19:59.000Z (almost 2 years ago)
- Last Synced: 2025-01-02T22:07:22.523Z (7 days ago)
- Topics: applescript, macos, osascript, shell, spotify, tmux
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
To show the artist and name of the current playing track on Spotify in your [tmux](https://github.com/tmux/tmux) status bar.
Not the first tmux/spotify code. But an attempt to be as simple as possible.
## Requirements
- macOS (as we use applescript)
- Spotify## Installation
1. Clone this repository
2. `cd` into the root of repository-folder
3. Run the install script:> The install script will add the code that acutally adds the output of the spotify-script to your status-bar.
```bash
./bin/install.sh
```4. When you start playing a song on spotify, it should now show in tmux!
---
### (Install) options
`--filename`: Use parameter to specify the name of the file the code should be added to. Default ~/.tmux.conf."
`--with-datetime`: Add datetime info to your statusbar. Default false"
### Customization
If you want to change the code related that generates the name of the track and artist, please alter `bin/spotify_artist_and_track.applescript`
More spotify commands can be found here: `/Applications/Spotify.app/Contents/Resources/Spotify.sdef`
### Applescript syntax highlighting in nvim
To get syntax highlighting for applescript (in nvim + lua):
1. Download the syntax file for applescript here: https://www.vim.org/scripts/script.php?script_id=1736
2. Add it to the syntax folder for your nvim runtime. You can find the location by executing the following command in nvim.```
:echo $VIMRUNTIME . '/syntax'
```3. Make sure nvim recognises the filetype by adding the following to a lua script file that is used (for example `init.lua`)
```lua
vim.filetype.add({
extension = {
applescript = "applescript",
},
})
```