A fancy TUI client for Google Play Music
TUIJam seeks to make a simple, attractive, terminal-based interface to listening to music for Google Play Music All-Access subscribers.
To install from source
git clone email@example.com:cfangmeier/tuijam.git cd tuijam python setup.py install --user
or from pypi
pip install --user tuijam
or from the AUR
yay -S tuijam # mainline yay -S tuijam-git # dev build
First Time Setup
The first time TUIJam runs, it will perform an OAuth handshake with Google. Tokens are then stored locally and subsequent logins should be automatic.
Local configuration is stored in
True) Saves the current queue and reloads it when the app resumes
False) Switches the direction of mouse scrolling
You can customize the visual theme of TUIJam by specifying the foreground/background colors of many of the UI elements in your configuration file. You can specify named colors to use your terminal colorscheme or use
#RGB for custom colors. The default values are listed below.
palette: header: ["white,underline", "default"] search-normal: ["white", "default"] search-select: ["white", "dark red"] region_bg-normal: ["light gray", "default"] region_bg-select: ["white", "default"] progress: ["white", "dark red"] progress_remaining: ["white", "dark gray"]
- Get current song metadata (Title/Album/Artist)
- Get player status (Playing/Paused/Stopped)
- Play/Pause current song
- Next/Previous Song
If this causes problems for you, please feel free to create an issue, but this feature can also be disabled by placing the following line in your config file:
From version 0.3.0, Youtube videos are included in search results. By default, no video is shown during playback, but this can be changed by adding the following line to the config file:
The player supports Last.fm scrobbling. To enable it, you need to run:
API Key Management
Youtube and Last.fm integration uses api keys that are supplied by me. TUIJam queries them at runtime from a server that I maintain. If the server goes down, of if you would just prefer not to rely on it, you can specify your own keys in the config file. Keys are only queried if they are not present in the config file.
GOOGLE_DEVELOPER_KEY: "yourdeveloperkeyhere" LASTFM_API_KEY: "yourapikeyhere" LASTFM_API_SECRET: "yoursecrethere"
You can also run your own server using or adapting
key_server_example.py and setting your config file to point to your server.
The default control keys are listed below with short descriptions. However, many of these can be overridden by specifying alternative keys in the configuration file.
ctrl-qadd all songs in search result to queue
rightmove to next song
leftmove to previous song
ctrl-rview recently played songs
ctrl-wClear the current queue
ctrl-sshuffle queued songs (Note: If this hangs, try running
stty -ixonin your terminal and restarting
ctrl-uThumbs up the currently playing song
ctrl-dThumbs down the currently playing song
shift-rightseek forward 10 seconds
shift-leftseek backwards 10 seconds
shift-tabcycle focus through search/queue/input windows
ctrl-fmove to search bar
- In search window,
qAdd selected song/album to queue
shift-qAdd selected song/album to the top of queue (play next)
rCreate radio station around selected song/album/artist and add 50 songs from it to queue
eview information about selected song/album/artist
backspacego back in search/expand history
- In queue window,
shift-upmove selected song up in queue
shift-downmove selected song down in queue
ctrl-upmove selected song to the top in queue
ctrl-downmove selected song to the bottom in queue
xremove selected song from queue
- In input window,
- Type search query and press enter. Results are shown in search window.
- Enter an empty query to view the suggested "Listen Now" stations and albums.
To customize these keys, add as many of the following entries into your config file as you want. A list indicates that multiple keys are assigned to that action.
controls: queue: "q" queue_next: "Q" expand: ["e", "enter"] back: "backspace", radio: "r", # queue panel swap_up: ["u", "shift up"], swap_down: ["d", "shift down"], to_top: ["U", "ctrl up"], to_bottom: ["D", "ctrl down"], remove: ["delete", "x"], play_pause: " ", # search and queue panel down: "j", up: "k", expand: ["e", "enter"], seek_pos: [">", "shift right"], seek_neg: ["<", "shift left"], vol_up: ["+", "="], vol_down: ["-", "_"], focus_search: ["ctrl f", "/"], # global inputs # Avoid single letter/number/symb keys to work with search input focused, unless vim-mode is active. g_focus_next: "tab", g_focus_prev: "shift tab", g_play_pause: "ctrl p", g_stop: "ctrl k", g_play_next: ["ctrl n", "right"], g_play_previous: ["ctrl b", "left"], g_recent: "ctrl r", g_shuffle: "ctrl s", g_rate_good: "ctrl u", g_rate_bad: "ctrl d", g_clear_queue: "ctrl w", g_queue_all: "ctrl q",
There is an experimental "vim mode" which can be enabled by adding
vim_mode: true to your config file. With this mode enabled, pressing escape will mask keys from being typed into the search bar (press
i to re-enable typing). This makes it more convenient to have single key commands for controlling playback (e.g. instead of
ctrl-n for next song, simply
TUIJam supports translations! It has only English and Russian for now, but you can make your own ones.
You can grab .pot file from the repo (
tuijam/lang folder) and work with it or:
- Clone the repo
python setup.py extract_messagesto generate .pot file
python setup.py init_catalog -l <LOCALE_CODE>to generate a new locale.
- Update the locale with
python setup.py update_catalog -l <LOCALE_CODE> -o <LOCALE_PATH>
- Compile your locale with
python setup.py compile_catalog.
<LOCALE_CODE> is ICU locale ID
User locales are supported. Copy generated .mo files to $HOME/.config/tuijam/lang/<LOCALE_CODE>/LC_MESSAGES folder. Notice that .po files are not supported for now.
The player's locale can be overridden by launching with LC_ALL environment variables. (
TUIJam uses Babel for locale generation. You can look its docs for further information.
This project is neither affiliated with nor endorsed by Google.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size tuijam-0.7.1.tar.gz (24.6 kB)||File type Source||Python version None||Upload date||Hashes View|