################################################################################ ################################################################################ ## ## ## This configuration file applies to both ocarina-core and ocarina-extra. ## ## The ocarina-core section is to configure the variables used by ## ## ocarina-core. Most of the ocarina-core variables also apply to ## ## ocarina-extra. ## ## ## ################################################################################ ################################################################################ # Import helpful modules from ocarina import vars from ct.path import * from ct.call import * # Helpful variables used by the application # vars.USER is the users home directory # vars.OCARINA is the directory ocarina uses to store all its files # vars.LOCKFILE is the lockfile used by the application # vars.WRITEENABLE controls enables printing from ct.call.write() ################################################################################ ################################################################################ ## ## ## Section 1.1 ocarina-core variable configuration ## ## The goal of ocarina-core is to provide a simple, command line music ## ## player built on python and gstreamer. Many of the variables set in this ## ## section also apply to ocarina-extra ## ## ## ################################################################################ ################################################################################ # Set this variable to force verbosity to always be at the same value. # Calling ocarina with the -v option will have no effect. A higher value will # print more output #vars.VERBOSE = 0 # Setting this variable to change the prompt that is presented to the user # by the built in command line. This variable is only used in ocarina-core #vars.PROMPT = ">>>" # This variable controls if ocarina begins playback as soon as a song is loaded # The default value is True vars.PLAYONLOAD = False # This variable controls the gstreamer volume at startup. Values must be # between 0.0 and 1.0, values less than 0.0 will be changed to 0.0 and values # greater than 1.0 will be changed to 1.0 #vars.VOLUME = 1.0 # This variable controls how much the volume changes when calling # volup() or voldown() #vars.VOLUMEINCR = 0.05 # This variable controls the port that ocarina listens on for requests. Other # ocarina instances will connect to this port to forward a song to load. # Setting this variable to 0 will cause ocarina to use a random port. #vars.PORT = 12345 # These next variables are the initial text shown in the artist, album, title # labels. They will be overwritten when a song is loaded. #vars.ARTIST = "" #vars.ALBUM = "" #vars.TITLE = "" ################################################################################ ################################################################################ ## ## ## Section 1.2 ocarina-core additional configuration ## ## The rest of this section generall applies to features added to the ## ## ocarina-core command line. readline and rlcompleter, for example, are ## ## used to provide tab completion and a stored history. ## ## ## ################################################################################ ################################################################################ # Enable readline tab completion import readline import rlcompleter readline.parse_and_bind("tab:complete") # Configure readline history. # This file is written after every command entered, but you can comment out # these lines to ignore the file history = join(vars.OCARINA,"history") if exists( history ): readline.read_history_file(history) # Set the max number of lines to store in the history file. # A negative number means unlimited length readline.set_history_length(50) ################################################################################ ################################################################################ ## ## ## Section 2.1 ocarina-extra variable configuration ## ## The goal of ocarina-extra is to provide additional features that most ## ## may want to have around. These features include a graphical front end ## ## and a sql based music library. ## ## ## ################################################################################ ################################################################################ # Ocarina uses an xml-based system to build up the GUI. This allows you to # create your own custom gui. #vars.THEME = "themes/simple.xml" #vars.THEME = "themes/classic.xml" #vars.THEME = "themes/ocarina3.xml" vars.THEME = "themes/simple2.xml" # Initial text for library / playlist / queue filtering #vars.FILTERTEXT = ""