All pastes #516232 Raw Edit

Miscellany

public text v1 · immutable
#516232 ·published 2007-05-28 16:33 UTC
rendered paste body
#!/bin/bash
################################################################################
# Copyright (c) 2007 Harald Sitter <sitter.harald@gmail.com>                   #
#                                                                              #
# http://aplg.kollide.net                                                      #
#                                                                              #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to     #
# deal in the Software without restriction, including without limitation the   #
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or  #
# sell copies of the Software, and to permit persons to whom the Software is   #
# furnished to do so, subject to the following conditions:                     #
#                                                                              #
# The above copyright notice and this permission notice shall be included in   #
# all copies of the Software and its documentation and acknowledgment shall be #
# given in the documentation and software packages that this Software was      #
# used.                                                                        #
#                                                                              #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR   #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,     #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL      # 
# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER     #
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN      #
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.   #
################################################################################

volumeLoves() {
carry=0
while [ "${carry}" != "${maxcarry}" ]; do
  dcop amarok player volume$tmp
    sleep 2
    let carry=carry+1
done
}

myOSD() {
    sleep 3
  dcop amarok player showOSD
    sleep 5
}

tellWhy() {
dcop amarok playlist popupMessage "$tell"
dcop amarok playlist shortStatusMessage "$tell"
sleep 8
}


dcop amarok player setVolume 50
dcop amarok contextbrowser showCurrentTrack
# sleep 5
  tell="Ein herzliches Willkommen zu Amarok<br />
       wünscht das Amarok Team :-)"
tellWhy

  tell="Hmm... funktioniert die Lautstärke?"
  maxcarry=4
  tmp=Up
tellWhy
volumeLoves
myOSD
  tell="Auch leiser?"
  tmp=Down
tellWhy
volumeLoves
# myOSD

  tell="Weiter Immer Weiter!"
tellWhy
dcop amarok player next
  sleep 10
  volume=`dcop amarok player getVolume`
  volume=$(( volume / 4 ))
  tell="Also ich weiß nicht, ist doch etwas laut, nicht?"
  tellWhy
  dcop amarok player mute
    sleep 10
    tell="Und was sagt Wiki zu diesem Künstler?"
    tellWhy
    dcop amarok contextbrowser showWiki
    maxcarry="$volume"
    tmp=Up
    volumeLoves

  tell="Die Dinger da oben sehen interessant aus..."
tellWhy
dcop amarok contextbrowser showCurrentTrack
  sleep 10
dcop amarok contextbrowser showLyrics
  sleep 10
dcop amarok contextbrowser showWiki
  sleep 20
dcop amarok contextbrowser showCurrentTrack

  tell="Equalizer gibts übrigens auch."
tellWhy
dcop amarok player setEqualizerPresent Techno
dcop amarok player setEqualizerEnabled true
sleep 10
  tell="Naja, wer's braucht..."
tellWhy
dcop amarok player setEqualizerEnabled false


  tell="...ich geh jetzt jedenfalls schlafen!"
tellWhy
dcop amarok player stop

  tell="Auf Wiedersehen :-)"
tellWhy

dcop amarok playlist clearPlaylist



# dcop amarok playlist saveM3u backup.m3u true

# dcop amarok contextbrowser showCurrentTrack
# dcop amarok contextbrowser showLyrics
# dcop amarok contextbrowser showWiki

# dcop amarok playlistbrowser loadPlaylist
# dcop amarok playlistbrowser addPlaylist
# dcop amarok playlistbrowser addPodcast
# dcop amarok playlistbrowser scanPodcast

# dcop amarok playlist getTotalTrackCount
# dcop amarok playlist popupMessage brain
# dcop amarok playlist shortStatusMessage brain
# dcop amarok playlist clearPlaylist

# dcop amarok mediabrowser queue

# dcop amarok player volumeUp
# dcop amarok player volumeDown
# dcop amarok player showOSD
# dcop amarok player mute
# dcop amarok player next
# dcop amarok player pause
# dcop amarok player play
# dcop amarok player prev
# dcop amarok player setEqualizerPresent
# dcop amarok player setEqualizerEnabled true/false