ashtophet.org | screenshots

Main| Scripts | Patches | Screenshots | Misc | Euskara

Documentation when available from this website (either in its HTML format or in its Org format) is licensed under the GNU Free Documentation License version 1.3 or later. The scripts and config files are licensed under the GNU General Public License v3 or later, unless otherwise noted.

If you find something useful here, please take your time to give some feedback (comments on code, functionality, annonyances, etc.): ashtophet (AT) ashtophet (DOT) org.

fvwm2, second place on Gentoo's 10th anniversary screenshot contest (2009).

Screenshot

Config

WIP (it's being rewritten). While it's done, here you are some tweaks:

$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 Scripts/xmms2. xmms2rate 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
RatingPopup is just a copy of ScreenshotPopup with xmms2 official logo.

$HOME/.fvwm/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 xmms2rating is a script at Scripts/xmms2 and ratingi.sh, xmms2np.sh, xmms2npextra.sh, xmms2playlistfvwm.sh and xmms2playlists.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's config 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

Credits

The config I'm using is based on univac's, so all credits go for him and the great people he credits (just read his config). Icons for xmms2 menu and weather fetched at deviantart (contributors forgotten). Other icons at deviantart, wikipedia, lyricwiki and xmms2. chinho is credited for his work with The GIMP (wallpaper). He's on the dark side now, BTW (just owns a MacBook :P).

Author: ashtophet

Date: 2010-12-10 06:04:18 CET

HTML generated by org-mode 7.3 in emacs 23