Package: tuijam
TUIJam seeks to make a simple, attractive, terminal-based interface to
listening to music for Google Play Music All-Access subscribers.DependenciesPython >= 3.6mpvyoutube-dlInstallationTo install from sourcegitclonegit@github.com:cfangmeier/tuijam.gitcdtuijam
pythonsetup.pyinstall--useror from pypipipinstall--usertuijamor from the AURyay-Stuijam# mainlineyay-Stuijam-git# dev buildFirst Time SetupThe first time TUIJam runs, it will perform an OAuth handshake with Google. Tokens are then stored locally and subsequent logins should be automatic.ConfigurationLocal configuration is stored in$HOME/.config/tuijam/config.yaml.persist_queue: (Default:True) Saves the current queue and reloads it when the app resumesreverse_scrolling: (Default:False) Switches the direction of mouse scrollingYou 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 yourterminal colorschemeor use#RGBfor custom colors. The default values are listed below.palette:header:["white,underline","default"]search-normal:["white","default"]search-select:["white","darkred"]region_bg-normal:["lightgray","default"]region_bg-select:["white","default"]progress:["white","darkred"]progress_remaining:["white","darkgray"]MPRIS SupportTUIJam supports a subset of theMPRISspec to allow for external control via clients such asplayerctl. Currently, the following behavior is supported:Get current song metadata (Title/Album/Artist)Get player status (Playing/Paused/Stopped)Play/Pause current songNext/Previous SongStopIf 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:mpris_enabled:falseYoutubeFrom 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:video:trueLast.fm SupportThe player supports Last.fm scrobbling. To enable it, you need to run:tuijamconfigure_last_fmAPI Key ManagementYoutube 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 adaptingkey_server_example.pyand setting your config file to point to your server.key_server:"https://my-tuijam-key-server.io"ControlsThe 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-cquitctrl-ptoggle play/pausectrl-kstopctrl-qadd all songs in search result to queuectrl-n/rightmove to next songctrl-b/leftmove to previous songctrl-rview recently played songsctrl-wClear the current queuectrl-sshuffle queued songs (Note: If this hangs, try runningstty -ixonin your terminal and restartingtuijam)ctrl-uThumbs up the currently playing songctrl-dThumbs down the currently playing song>/shift-rightseek forward 10 seconds</shift-leftseek backwards 10 seconds+volume up-volume downtab/shift-tabcycle focus through search/queue/input windows\/ctrl-fmove to search barIn search window,qAdd selected song/album to queueshift-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 queueeview information about selected song/album/artistbackspacego back in search/expand historyIn queue window,u/shift-upmove selected song up in queued/shift-downmove selected song down in queueshift-u/v/ctrl-upmove selected song to the top in queueshift-d/ctrl-downmove selected song to the bottom in queuedelete/xremove selected song from queueIn 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 panelswap_up:["u","shiftup"],swap_down:["d","shiftdown"],to_top:["U","ctrlup"],to_bottom:["D","ctrldown"],remove:["delete","x"],play_pause:"",# search and queue paneldown:"j",up:"k",expand:["e","enter"],seek_pos:[">","shiftright"],seek_neg:["<","shiftleft"],vol_up:["+","="],vol_down:["-","_"],focus_search:["ctrlf","/"],# 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:"shifttab",g_play_pause:"ctrlp",g_stop:"ctrlk",g_play_next:["ctrln","right"],g_play_previous:["ctrlb","left"],g_recent:"ctrlr",g_shuffle:"ctrls",g_rate_good:"ctrlu",g_rate_bad:"ctrld",g_clear_queue:"ctrlw",g_queue_all:"ctrlq",There is an experimental "vim mode" which can be enabled by addingvim_mode: trueto your config file. With this mode enabled, pressing escape will mask keys from being typed into the search bar (pressito re-enable typing). This makes it more convenient to have single key commands for controlling playback (e.g. instead ofctrl-nfor next song, simplyn).TranslationsTUIJam 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/langfolder) and work with it or:Clone the repoRunpython setup.py extract_messagesto generate .pot fileRunpython setup.py init_catalog -l <LOCALE_CODE>to generate a new locale.Update the locale withpython setup.py update_catalog -l <LOCALE_CODE> -o <LOCALE_PATH>Compile your locale withpython setup.py compile_catalog.<LOCALE_CODE>isICU locale IDUser 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. (LC_ALL="en_US.UTF-8" tuijam)TUIJam uses Babel for locale generation. You can lookits docsfor further information.ThanksTUIJam was heavily inspired by thegpymusicproject, and, of course,
could not exists without the greatgmusicapi.This project is neither affiliated with nor endorsed by Google.