日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
Linux下配置MOC具體步驟

Music On Console (MOC)是一款在Linux/Unix文字接口下的音樂播放程式。 MOC功能強(qiáng)大且易于使用,整體接口排版近似于Midnight Commandert(一款文字接口檔案管理員)。其具有很高的自訂性。支援ALSA,OSS或JACK輸出;可自訂的色彩主題及接口;快速鍵;播放清單等,下面為大家分享一下Linux下配置MOC具體步驟。

創(chuàng)新互聯(lián)建站堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:成都網(wǎng)站建設(shè)、網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的宣城網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!

mocp配置

在配置mocp之前,可以先從moc的man手冊(cè)頁(yè)或者info頁(yè)獲取更多的信息(比如配置文件是什么,應(yīng)該放到什么位置,格式應(yīng)該是什么樣的……)

$ mocp --help
$ man mocp
$ info mocp

**注:**moc的aur版本允許mocp加載歌詞(但僅限某些utf-8編碼的ascii文本(純英文)),這個(gè)版本會(huì)和系統(tǒng)中已經(jīng)安裝的沖突.

雖然osdlyrics理論上也支持moc,然而僅僅只是安裝moc然后打開mocp再打開osdlyrics并不會(huì)加載音頻文件的lyrics的(盡管這也不會(huì)導(dǎo)致osdlyrics退出)

要讓osdlyrics真正支持moc,還要安裝moc-tray這個(gè)任務(wù)欄小程序并在啟動(dòng)osdlyrics之前啟動(dòng)mocp和moc-tray.

moc-tray可以直接啟動(dòng)mocp并且支持停止/播放/暫停/退出,下一首/上一首等動(dòng)作,不過某些動(dòng)作需要在mocp中配置播放列表才能得到正確響應(yīng)。

aur上的moc構(gòu)建和安裝:

下載PKGBUILD等makepkg需要的腳本.

$ git clone https://aur.archlinux.org/moc-lyrics-git.git
$ pushd mocp-lyrics-git
$ makepkg -sr

編譯成功之后會(huì)產(chǎn)生一個(gè).pkg.tar.xz包,然后使用pacman -U安裝

$ mv moc-lyrics-git-1\:0.2213.c51e02e-1-x86_64.pkg.tar.xz moc-lyrics-git-x86_64.pkg.tar.xz
# pacman -U moc-lyrics-git-x86_64.pkg.tar.xz

拷貝mocp示例配置文件到~/.moc(沒有就創(chuàng)建),參數(shù)配置可以從示例文件config.example(可以運(yùn)行l(wèi)ocate config.example)中找到

mocp的示例配置文件盡管使用了英文,但解釋的很詳細(xì).

$ mkdir ~/.moc
$ cp `locate config.example` ~/.moc/config

下面這是從實(shí)例配置文件拷過來的,以#號(hào)開始的都是注釋(盡管注釋看起來顯得晦澀難懂,但作者解釋的很清楚)。

~/.moc/config

# This is a configuration file for the MOC player. It should be named
# 'config' and placed in the ~/.moc directory. As this file can specify
# commands which invoke other applications, MOC will refuse to start if it
# is not owned by either root or the current user, or if it is writable by
# anyone other than its owner. All options are given with their default
# values, and therefore commented.
# Comments begin with '#'.
# You can use quotes and escape ('\') in parameters.
#
# You can have variable values substituted by enclosing the variable name
# as "${...}". (This only applies to the portion of the option following
# the '='.) Variables are substituted first from the environment then,
# if not found, from the configuration options. (Note that the value of
# a configuration option substituted is that which it has at the time the
# substitution variable is encountered.) If there is a naming conflict
# between an environment and configuration variable, you may be able to
# resolve it by using lowercase as the environment variable matches are
# case-sensitive whereas the configuration variables are not.
#
# You can also use the form "${...:-...}" where the value in the second
# position will be substituted if the variable name given in the first
# position is unset or null.
#
# So, for example:
#
# MusicDir = /music/${USER:-public}
# Fastdir1 = ${MusicDir}/mp3/rock
# Fastdir2 = ${MusicDir}/mp3/electronic
# Fastdir3 = ${MusicDir}/mp3/rap
# Fastdir4 = ${MusicDir}/mp3/etc
#
……
……
……

mocp鍵盤映射配置

mocp鍵盤映射自定義,示例鍵盤映射可以從$prefix/share/moc/keymap.example找到

$ vim ~/.moc/keymap
menu_up            = k UP
menu_down        = j DOWN
menu_page_up            = ^b PAGE_UP
menu_page_down        = ^d PAGE_DOWN
menu_first_item        = M-b HOME
menu_last_item        = M-d END

mocp主題

mocp主題默認(rèn)安裝到$prefix/share/moc/themes目錄下,可以自定義主題只對(duì)用戶生效(放到~/.moc/themes目錄下).

mocp啟動(dòng)時(shí)指定的主題或者在用戶級(jí)配置文件~/.moc/config中指定的主題可以自動(dòng)從$prefix/share/moc/themes和~/.moc/themes中讀取.(沒有就要在~/.moc/config的Theme 使用絕對(duì)路徑來指定)

創(chuàng)建~/.moc/themes目錄

$ mkdir -pv ~/.moc/themes
$ cp /usr/share/moc/themes/moca_theme ~/.moc/themes/user_moca_theme

~/.moc/themes/ user_moca_theme

background        = white    default bold
frame            = white    default bold
window_title        = yellow    default    bold
directory        = white        default
selected_directory    = white        default bold
playlist        = white default
selected_playlist    = cyan        default    bold
file            = green default bold
#selected_file        = yellow    red    bold
selected_file        = white black bold
…….
mocp User themes

這是我的moc最終的樣子:

MOC,命令行音樂播放器MOC,命令行音樂播放器

fbterm顯示出來也是這個(gè)樣子的,不過桌面歌詞就沒有了。

**注:**在fbterm中將TERM變量一直設(shè)為fbterm時(shí)會(huì)讓一些基于ncursers庫(kù)的命令行程序界面(比如mc和alsamixer,mocp)變得亂七八糟。而只有在將TERM變量值設(shè)置為fbterm的時(shí)候才可以讓vim在fbterm上支持更多的顏色。


名稱欄目:Linux下配置MOC具體步驟
鏈接URL:http://www.5511xx.com/article/cdpsgdi.html