2009年6月8日 星期一
在gnome右鍵加上“加曲目到foobar2000”功能
I made a little script to add files/folders in foobar from the Nautilus context menu. You should install the Nautilus-actions extension to add customized entries to the context menu.
I'm sure it's not perfect but it works on my linux (ubuntu) perhaps on yours too
Save this script in where you want with the name: foobar2000.sh. and make it executable.
After, create a context menu item using the Nautilus Actions Configuration tool. Click on Add in the Nautilus Action configuration window, and in the Add a New Action dialog box, fill in the field like this:
Label: Send to foobar2000 (or what you want)
Tooltip: Send to foobar2000 (or what you want)
Path: /your/directory/foobar2000.sh
Parameters: %M
Next, click on the Conditions tab.:
Filenames: *
Mimetypes: */*
Check "both"
and check "appears if selection has multiple files or folders"
After, click on the Advanced conditions:
Check "smb (windwos file)"
Finally, click OK and close the Nautilus Actions Configuration tool. Now, when you right-click on a file or folder, you'll see the "Send to foobar2000, and clicking on it will add file and/or folder to foobar2000.
I'm sure it's not perfect but it works on my linux (ubuntu) perhaps on yours too
CODE
#!/bin/bash
#foobar2000.sh
# your installation directory
cd ~/.foobar2000/
if [ "$1" != "" ]; then
i="$@"
else
echo "No files"
exit 0
fi
#files
#add extensions if you want
for ext in .aac .mp3 .mp4 .ogg .flac .m4a .wma .mpc .wav .rar .zip; do
files=`echo $i | sed "s/$ext /$ext\" \"z:/g"`
i=$files
done
#folder
files=`echo \"z:$i | sed "s/ \//\" \"z:\//g"`
eval wine foobar2000.exe /add "$files\""
echo "Action: adding Directory or Files \"z:${files}\" to foobar2000"
exit 0
#foobar2000.sh
# your installation directory
cd ~/.foobar2000/
if [ "$1" != "" ]; then
i="$@"
else
echo "No files"
exit 0
fi
#files
#add extensions if you want
for ext in .aac .mp3 .mp4 .ogg .flac .m4a .wma .mpc .wav .rar .zip; do
files=`echo $i | sed "s/$ext /$ext\" \"z:/g"`
i=$files
done
#folder
files=`echo \"z:$i | sed "s/ \//\" \"z:\//g"`
eval wine foobar2000.exe /add "$files\""
echo "Action: adding Directory or Files \"z:${files}\" to foobar2000"
exit 0
Save this script in where you want with the name: foobar2000.sh. and make it executable.
After, create a context menu item using the Nautilus Actions Configuration tool. Click on Add in the Nautilus Action configuration window, and in the Add a New Action dialog box, fill in the field like this:
Label: Send to foobar2000 (or what you want)
Tooltip: Send to foobar2000 (or what you want)
Path: /your/directory/foobar2000.sh
Parameters: %M
Next, click on the Conditions tab.:
Filenames: *
Mimetypes: */*
Check "both"
and check "appears if selection has multiple files or folders"
After, click on the Advanced conditions:
Check "smb (windwos file)"
Finally, click OK and close the Nautilus Actions Configuration tool. Now, when you right-click on a file or folder, you'll see the "Send to foobar2000, and clicking on it will add file and/or folder to foobar2000.
Okay, this is how I do it... shouldn't need any additional scripts, it passes on as many options as you'd like. So "foobar2000 -add file1 file2 directory3 -hide" acts just like "foobar2000.exe /add file1 file2 directory3 /hide" would.
CODE
1234567
#!/bin/bash
# launches fb2k w/ options
# set path to foobar executable
FB2K="C:\Program Files\foobar2000\foobar2000.exe"
# set Internal Field Separator : character should not appear in filepaths uris or options
IFS='|'
# gives the absolute z: path usable by wine
winepath () {
case "$1" in
/*) # absolute path
file="$1"
;;
~*) # unexpanded home-relative (?)
file="$HOME${1:1}"
# HOME + ~/path, stripping ~
;;
*) # relative path
file="$(pwd)/$1"
;;
esac
file=`echo "z:$file" | sed -e '
s%/[^/]\+/\.\./%/%g # replaces /somedir/../ by /
s%\./%%g # removes ./
s%/%\\\\%g # replace / by \
'`
}
# list of arguments separated by IFS instead of space to prevent string splitting
args=""
# go through all parameters given to script and transform them for wine use if needed
until [ -z "$1" ] ; do
case "$1" in
-h|-help)
echo "Usage : `basename $0` [options] [file1 [file2 [...]]]"
echo "Available switches: -add, -play, -pause, -playpause, -prev, -next, -rand, -stop, -exit, -show, -hide, -config -command:
#!/bin/bash
# launches fb2k w/ options
# set path to foobar executable
FB2K="C:\Program Files\foobar2000\foobar2000.exe"
# set Internal Field Separator : character should not appear in filepaths uris or options
IFS='|'
# gives the absolute z: path usable by wine
winepath () {
case "$1" in
/*) # absolute path
file="$1"
;;
~*) # unexpanded home-relative (?)
file="$HOME${1:1}"
# HOME + ~/path, stripping ~
;;
*) # relative path
file="$(pwd)/$1"
;;
esac
file=`echo "z:$file" | sed -e '
s%/[^/]\+/\.\./%/%g # replaces /somedir/../ by /
s%\./%%g # removes ./
s%/%\\\\%g # replace / by \
'`
}
# list of arguments separated by IFS instead of space to prevent string splitting
args=""
# go through all parameters given to script and transform them for wine use if needed
until [ -z "$1" ] ; do
case "$1" in
-h|-help)
echo "Usage : `basename $0` [options] [file1 [file2 [...]]]"
echo "Available switches: -add, -play, -pause, -playpause, -prev, -next, -rand, -stop, -exit, -show, -hide, -config -command:
Inspired by plukin's script.
You can add as many custom options as you want, see comment inside second "case" block.
Edit : minor readability change.
kinda funny how all this fuss about changing a unix path into a wine path is totally useless since there is a "winepath" utility. Didin't notice myself before today.
A complete & simpler version of the script to launch foobar with command line arguments would be :
A complete & simpler version of the script to launch foobar with command line arguments would be :
CODE
#!/bin/bash
# launches fb2k w/ options
# set path to foobar executable
FB2K="C:\Program Files\foobar2000\foobar2000.exe"
# set Internal Field Separator : character should not appear in filepaths uris or options
IFS='|'
# list of arguments separated by IFS instead of space to prevent string splitting
args=""
# go through all parameters given to script and transform them for wine use if needed
until [ -z "$1" ] ; do
case "$1" in
-h|-help)
echo "Usage : `basename $0` [options] [file1 [file2 [...]]]"
echo "Available switches: -add, -play, -pause, -playpause, -prev, -next, -rand, -stop, -exit, -show, -hide, -config -command:
This post has been edited by Houlecorn: Feb 14 2009, 01:05# launches fb2k w/ options
# set path to foobar executable
FB2K="C:\Program Files\foobar2000\foobar2000.exe"
# set Internal Field Separator : character should not appear in filepaths uris or options
IFS='|'
# list of arguments separated by IFS instead of space to prevent string splitting
args=""
# go through all parameters given to script and transform them for wine use if needed
until [ -z "$1" ] ; do
case "$1" in
-h|-help)
echo "Usage : `basename $0` [options] [file1 [file2 [...]]]"
echo "Available switches: -add, -play, -pause, -playpause, -prev, -next, -rand, -stop, -exit, -show, -hide, -config -command:
2009年6月6日 星期六
wine + foobar2000 安裝後調整筆記
mv ~/.wine/drive_c/Program\ Files/foobar2000 ~/.foobar2000
改用建link的方式玩
ln -s ~/.wine/drive_c/Program\ Files/foobar2000 ~/.foobar2000
sudo gedit /usr/bin/foobar2000
CODE
#!/bin/sh
cd ~/.foobar2000/
if [ "$1" != "" ]; then
filename=`echo z:$1 | sed 's/\\//\\\\/g'`
env LANG="zh_TW.UTF-8" WINEPREFIX="/home/你的登入名稱/.wine" wine foobar2000.exe "$filename" &
else
env LANG="zh_TW.UTF-8" WINEPREFIX="/home/你的登入名稱/.wine" wine foobar2000.exe &
fi
單用
LANG="zh_TW.UTF-8"
似乎就可以
加一個icon連結到聲音及多媒體的選單底下
gksudo gedit /usr/share/applications/foobar2000.desktop
[Desktop Entry]
Type=Application
Name=foobar2000
GenericName=Plays Music
Version=1.0
Encoding=UTF-8
Terminal=false
Exec=/usr/bin/foobar2000
Comment=Plays Music
Icon=foobar2000.png
Categories=GNOME;GTK;AudioVideo;Audio;Player;
Type=Application
Name=foobar2000
GenericName=Plays Music
Version=1.0
Encoding=UTF-8
Terminal=false
Exec=/usr/bin/foobar2000
Comment=Plays Music
Icon=foobar2000.png
Categories=GNOME;GTK;AudioVideo;Audio;Player;
在gnome右鍵選單加上“add files to foobar2000 ”
Foobar安裝後慣用變更筆記
在第一次安裝後,第一次啟動的 “Quick Appearance Setup”中
再選 “View” -> “Layout” -> “Enable Layout Editing Mode”
用滑鼠右鍵點選左邊的 “Cover Art + Tabs” 區塊,複製(Copy UI Element)
再選 “View” -> “Layout” -> “Quick Setup”
改用慣用的 “Album List + Properties”
按右鍵選“paste UI Element”,把左邊的區塊蓋上去貼掉
先選最底下的“Visualisation + Cover Art + Tabs”
再選 “View” -> “Layout” -> “Enable Layout Editing Mode”
用滑鼠右鍵點選左邊的 “Cover Art + Tabs” 區塊,複製(Copy UI Element)
再選 “View” -> “Layout” -> “Quick Setup”
改用慣用的 “Album List + Properties”
按右鍵選“paste UI Element”,把左邊的區塊蓋上去貼掉
2009年5月27日 星期三
Audacious2 - 播放 cue + ape
在 Ubuntu9.04下,用 Synaptic 查找Audacious
直接選 audacious-plngins-extra
這個套件包的內容說明寫到:支援
去人聲功能、LIRC、Last.fm 、MIDI、Esound/PluseAudio
等等…未經測試的功能…
Synaptic 就自動幫忙找出所有相關要裝的... 共15個包,11.5MB
audacious (version 1.5.1-4ubuntu3) will be installed
audacious-plugins (version 1.5.1-2ubuntu3) will be installed
audacious-plugins-extra (version 1.5.1-2ubuntu3) will be installed
ladcca2 (version 0.4.0-6) will be installed
libaudclient1 (version 1.5.1-4ubuntu3) will be installed
libaudid3tag1 (version 1.5.1-4ubuntu3) will be installed
libbinio1ldbl (version 1.4-12) will be installed
libcddb2 (version 1.2.1-1) will be installed
libfluidsynth1 (version 1.0.8-1.1build1) will be installed
libimlib2 (version 1.4.2-4ubuntu1) will be installed
libmcs1 (version 0.7.1-1) will be installed
libmowgli1 (version 0.6.1-1) will be installed
libresid-builder0c2a (version 2.1.1-7) will be installed
libsidplay2 (version 2.1.1-7) will be installed
python-chardet (version 1.0.1-1.1) will be installed
直接選 audacious-plngins-extra
這個套件包的內容說明寫到:支援
去人聲功能、LIRC、Last.fm 、MIDI、Esound/PluseAudio
等等…未經測試的功能…
Synaptic 就自動幫忙找出所有相關要裝的... 共15個包,11.5MB
audacious (version 1.5.1-4ubuntu3) will be installed
audacious-plugins (version 1.5.1-2ubuntu3) will be installed
audacious-plugins-extra (version 1.5.1-2ubuntu3) will be installed
ladcca2 (version 0.4.0-6) will be installed
libaudclient1 (version 1.5.1-4ubuntu3) will be installed
libaudid3tag1 (version 1.5.1-4ubuntu3) will be installed
libbinio1ldbl (version 1.4-12) will be installed
libcddb2 (version 1.2.1-1) will be installed
libfluidsynth1 (version 1.0.8-1.1build1) will be installed
libimlib2 (version 1.4.2-4ubuntu1) will be installed
libmcs1 (version 0.7.1-1) will be installed
libmowgli1 (version 0.6.1-1) will be installed
libresid-builder0c2a (version 2.1.1-7) will be installed
libsidplay2 (version 2.1.1-7) will be installed
python-chardet (version 1.0.1-1.1) will be installed
安裝完後,
開 Preference -> Audio -> Format Detection
“Detect file formats by extension” 取消勾選
開 Preference -> Audio -> Format Detection
“Detect file formats by extension” 取消勾選
================================================
http://cpg811106.spaces.live.com/blog/cns!B7E3CF93766170BD!639.entry?sa=589632868
10月4日
Linux Audacious 播放 cue ape 方法
在安裝Audacious與其plugin後在偏好設定
音訊下 自動偵測檔案格=>依副檔名偵測檔案格式取消
竟然就可以讀取cue檔了耶
安裝Audacious ubuntu 指令
$ sudo apt-get install audacious
PLUGIN指令其實可以用萬用字元*來搜尋全部字串
$ sudo apt-get install audacious*
但是直接搜尋會有相依性問題所以還是一步一步來
$ sudo apt-get insatll audacious-plngins
$ sudo apt-get insatll audacious-plngins-extra
訂閱:
文章 (Atom)