Screenshots
misc screenshots
Fvwm config is being rewritten to get published properly (February, MMX)
Proud to get 2nd place on Gentoo's 10th anniversary screenshot contest ;)
Fvwm2+XMMS2
Six shots of my modest XMMS2 menu in action (it allows me to toggle play/pause, show info about current song, rating, rate it, show lyrics, fetch wikipedia info, browse my music directories, switch between playlists and jump to a song on current playlist).
The config I'm using was made by univac, so all credits go for him and the great guys he credits (just read his config). My XMMS2 config needs to be polished but it's pretty usable...
Artwork credits for the XMMS2 menu go for some I've forgotten at deviantart, icons at wikipedia, lyricwiki, xmms2 and chinho for his work with The GIMP ;)
Here you are relevant config sections, If you find errors or improve them, please contact me. Thanks
$HOME/.fvwm/fvwm2rc.menus:
DestroyMenu /XMMS2 AddToMenu /XMMS2 + "%xmms222.png%Now Playing" Popup xmms2NP + "%xmms222.png%Extra info" Popup xmms2INF + "%star22.png%Rating" Popup xmms2Info + "%rate22.png%Rate" Popup /Rating + "%lyrics22.png%Lyrics" Exec urxvtc --title '...xmms2lyrics ;)' -e $HOME/.scripts/xmms2lyrics.sh + "%wikipedia22.png%Wiki" Exec urxvtc --title '...xmms2wiki ;)' -e $HOME/.scripts/xmms2wiki.sh + "%music22.png%Playlist content" Popup xmms2Pl + "%music22.png%Playlists" Popup xmms2Playlists + "%random22.png%Random album" $HOME/.scripts/xmms2_random_album_fvwm.sh + "" Nop + MissingSubmenuFunction FuncFvwmMenuDirectory + "%music22.png%Music01" Popup $[audio_path] + "%music22.png%Music02" Popup $[audio_path2] DestroyMenu /Rating AddToMenu /Rating + "%rating1.png%Awful" Exec xmms2_rate 1 + "%rating2.png%Bah" Exec exec xmms2_rate 2 + "%rating3.png%Good" Exec exec xmms2_rate 3 + "%rating4.png%Great" Exec exec xmms2_rate 4 + "%rating5.png%Masterpiece" Exec exec xmms2_rate 5
Where xmms2lyrics.sh and xmms2wiki.sh are the ones at 'Shell scripts' section. xmms2_rate is:
#!/bin/sh
#xmms2_rate
if ps axo uid,comm,user|grep xmms2d|grep $USER>/dev/null
then
ID=$(xmms2 current '${id}')
xmms2 mlib setstr $ID rating "$1"
if [ "$1" == "1" ]
then MESSAGE="Awful"
elif [ "$1" == "2" ]
then MESSAGE="Bah"
elif [ "$1" == "3" ]
then MESSAGE="Good"
elif [ "$1" == "4" ]
then MESSAGE="Great"
elif [ "$1" == "5" ]
then MESSAGE="Masterpiece"
else MESSAGE=$1
fi
/usr/bin/FvwmCommand "RatingPopup SongRated::'$MESSAGE'"
else
/usr/bin/FvwmCommand "RatingPopup Error::XMMS2_off"
exit 0
fi
Where RatingPopup is just a copy of ScreenshotPopup with changed logo (xmms2 official logo).
Now let's go for relevant $HOME/fvwm2rc.func:
#### XMMS2_CTRL # Rating info DestroyFunc xmms2Info AddToFunc xmms2Info + I DestroyMenu recreate xmms2Info + I AddToMenu xmms2Info + I PipeRead 'echo + \\\"`$HOME/.fvwm/scripts/ratingi.sh`\\\" Exec exec xmms2_rating' DestroyMenu xmms2Info AddToMenu xmms2Info + DynamicPopupAction Function xmms2Info # Now playing DestroyFunc xmms2NP AddToFunc xmms2NP + I DestroyMenu recreate xmms2NP + I AddToMenu xmms2NP + I PipeRead 'echo + \\\"`$HOME/.fvwm/scripts/xmms2np.sh`\\\" Exec exec "xmms2 toggleplay"' DestroyMenu xmms2NP AddToMenu xmms2NP + DynamicPopupAction Function xmms2NP # Now playing extra DestroyFunc xmms2INF AddToFunc xmms2INF + I DestroyMenu recreate xmms2INF + I AddToMenu xmms2INF + I PipeRead 'echo + \\\"`$HOME/.fvwm/scripts/xmms2np_extra.sh`\\\" Exec exec "xmms2 toggleplay"' DestroyMenu xmms2INF AddToMenu xmms2INF + DynamicPopupAction Function xmms2INF #playlist /test01 DestroyMenu recreate xmms2Pl AddToMenu xmms2Pl + DynamicPopupAction Function Buildxmms2Pl AddToFunc Buildxmms2Pl + I DestroyMenu recreate xmms2Pl + I AddToMenu xmms2Pl + I Piperead 'echo "`$HOME/.fvwm/scripts/xmms2_playlist_fvwm.sh`"' # Playlists DestroyMenu recreate xmms2Playlists AddToMenu xmms2Playlists + DynamicPopupAction Function Buildxmms2Playlists AddToFunc Buildxmms2Playlists + I DestroyMenu recreate xmms2Playlists + I AddToMenu xmms2Playlists + I Piperead 'echo "`$HOME/.fvwm/scripts/xmms2_playlists.sh`"'
Where xmms2_rating is a script on 'MPD Scripts' section, and ratingi.sh, xmms2np.sh, xmms2np_extra.sh, xmms2_playlist_fvwm.sh and xmms2_playlists.sh are, respectively:
#!/bin/sh
#ratingi.sh
if ps axo uid,comm,user|grep xmms2d|grep $USER>/dev/null
then
RATING=$(xmms2 current '${rating}')
if [ "$RATING" == "" ]
then echo "Not rated"
elif [ "$RATING" == "1" ]
then echo '"%rating1.png%Awful"'
elif [ "$RATING" == "2" ]
then echo '"%rating2.png%Bah"'
elif [ "$RATING" == "3" ]
then echo '"%rating3.png%Good"'
elif [ "$RATING" == "4" ]
then echo '"%rating4.png%Great"'
elif [ "$RATING" == "5" ]
then echo '"%rating5.png%Masterpiece"'
else echo "Unknown rating: $RATING"
fi
else echo "Xmms2 not active"
fi
#!/bin/sh
#xmms2np.sh
if ps axo uid,comm,user|grep xmms2d|grep $USER>/dev/null
then
NP=$(xmms2 current '${artist} - ${album} - ${title}, Plays: ${timesplayed}')
echo $NP
else echo "Xmms2 not active"
fi
#!/bin/sh
#xmms2np_extra.sh
if ps axo uid,comm,user|grep xmms2d|grep $USER>/dev/null
then
FORMAT=$(xmms2 current '${mime}'|sed -e 's/\//-/g')
LAST_BEFORE=$(xmms2 current '${laststarted}')
LAST=$(date --date=@$LAST_BEFORE)
GENRE=$(xmms2 current '${genre}')
NP="Format: "$FORMAT" - Last Played: "$LAST" - genre: "$GENRE""
echo $NP;exit 0
else echo "Xmms2 not active";exit 0
fi
#!/bin/sh
#xmms2_playlist_fvwm.sh
if ps axo uid,comm,user | grep xmms2d | grep $USER>/dev/null
then
xmms2 list|awk -F ']' '{print $1}'|awk -F'[' '{print $2}' |awk '$0!~/^$/ {print $0}'|awk -F '/' '{print $1,$2}'>/tmp/playlist.id
while read line;do echo "+ \"%audio22.png% $(xmms2 info $(echo $line|awk '{print $2}')|grep artist|awk -F'= ' '{print $2}') - $(xmms2 info $(echo $line|awk '{print $2}')|grep album|awk -F'= ' '{print $2}') - $(xmms2 info $(echo $line|awk '{print $2}')|grep title|awk -F'= ' '{print $2}')\" Exec exec xmms2 jump $(echo $line|awk '{print $1}')";done
#!/bin/sh
#xmms2_playlists.sh
if ps axo uid,comm,user | grep xmms2d | grep $USER>/dev/null
then
xmms2 playlist list>/tmp/playlist.lists
while read line; do echo "+ \"%audio22.png% $line\" Exec exec xmms2 playlist load $(echo $line|sed -e 's/->//g')";done
Additionally I've changed 'xmms2.sh' from univac to add songs to a queue playlist
#!/bin/bash
#Reading AUTHORS file: xmms2 playlist active :P
#11/11/2007 ashtophet
#Tweaked to add file(s) to a queue playlist,
#then change its jumplist attribute to go back to previous used playlist
#unless previous one is the queue playlist
#CUR_PL=$(xmms2 playlist list | awk -F'->' '{print $2}'|awk '$0!~/^$/ {print $0}')
CUR_PL=$(xmms2 playlist active)
if [ "$CUR_PL" != "fileira" ]
then xmms2 coll attr Playlists/fileira jumplist $CUR_PL
fi
xmms2 playlist load fileira
#echo $CUR_PL
if [ -d "$@" ]; then
xmms2 radd "$@"
else
xmms2 add "$@"
fi
Thanks for the fish!
February, MMX