Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Artwork & Screenshots / Re: Community custom wallpapers..
« Last post by PackRat on May 14, 2017, 01:55:46 PM »
More Fvwm -



Featuring Anastasia Huppmann

and back to fluxbox -

12
Artwork & Screenshots / Re: Community custom wallpapers..
« Last post by PackRat on May 12, 2017, 09:56:24 PM »
some cwm & fvwm -





wallpaper from here -

been window manager hopping this week. All roads lead back to fluxbox.
13
Zenity & Yad / Re: PMRP UI yad
« Last post by zephyr on May 09, 2017, 11:41:02 PM »
Thanks to you both, hakerdefo and misko, great radio application. My "go to" now for radio music streams!



thanks again!

z

14
Artwork & Screenshots / Re: Community custom wallpapers..
« Last post by VastOne on May 09, 2017, 09:17:33 PM »
^ Wow, that's really cool!
15
Artwork & Screenshots / Re: Community custom wallpapers..
« Last post by misko_2083 on May 09, 2017, 03:30:36 PM »
Played a little. In the back is my hometown eary in the morning.

The original photo used here for the front. Made it in  the countryside.
16
Just so happened to have a brand new VSIDO uEFI build going (and loving it!) and have completed all the necessary steps to make it my official 'goto' and as usual, your script works beautifully!  Suddenly minus one conky on the desktop now.  hmmm.  Let's see what happens.  I'm pretty fond of conky...  (not that this can't be utilized fully inside a conky file,  ::) and probably somebody here has already done it!!!)

Beautiful scripting as usual hakerdefoe!  8)

EDIT: Scrot or it didn't happen!

17
Artwork & Screenshots / Re: May 2017 Screenshot Thread
« Last post by jedi on May 08, 2017, 11:30:26 PM »
@PackRat we've finally had a 'few' warm days!  Even a 'few' warm nights!  It'll be in the 30's (F) tonight...   :'(

Edit: 5/09/2017 09:22 am.  44F currently, and it got down to 33F in my garage over night...  And there's no leaves yet, and there are still piles of snow (though just barely) where it has been plowed and piled up.  No sunlight in days...  Maybe this Sat. or next Mon. according to the pmwf!

Back on topic...
18
Artwork & Screenshots / Re: May 2017 Screenshot Thread
« Last post by PackRat on May 08, 2017, 04:28:05 PM »
^ Nice to see your daytime temps going above freezing.

Conky mayhem!



Back to normal:

19
Zenity & Yad / Re: PMRP UI yad
« Last post by misko_2083 on May 08, 2017, 12:52:25 AM »
Between the couch cushions perhaps!?  ;D :D :D
Joke aside, I did take a quick look @docs/google, but didn't find anything. The "bad" here is that MPV has support for real remote controlers ( the hardware ones ), which is the main hit on Google, making the shell "remote" we need here hard to find... And the docs are longer then the Bible...  ;D
Whish it was between the couch cushions... That was a a big documentation to read.  :D
Found some usefull options on the way...
Mpv loads entire list file at once, and I had to do "playlist_remove current" to load a new list.
After sorting that out, the rest weas relatively easy.
Instead of saving the current song metadata, we call it with the internal print command 'print_text ${metadata}'.
That way it fills in the text column after returning from tray.
*Changes
1. Now uses mpv
2. Close to tray option added
*What doesn't work?
1. error status
2. category is lost when returning from tray
Code: [Select]
#!/bin/bash
command -v mpv >/dev/null 2>&1 || (yad --text="PMRP requires 'mpv' but it's not installed!\nInstall 'mpv' to enjoy PMRP."; exit 1)

TEXTDOMAIN=ydesk
TEXTDOMAINDIR=/usr/share/locale

export LANG=C.UTF-8

export pmrp='@bash -c "run_stations %2"'
export pmrp_stations="stations"

export fpipe=$(mktemp -u --tmpdir pmrp.XXXXXXXX)
export ppipe=$(mktemp -u --tmpdir ppmrp.XXXXXXXX)
export cpipe=$(mktemp -u --tmpdir cpmrp.XXXXXXXX)
export statuspipe=$(mktemp -u --tmpdir cpmrp.XXXXXXXX)
export PMRPLIST=$(mktemp -u --tmpdir PMRPLIST.XXXXXXXX)

# Pipe for setting values in the form tab
mkfifo "$fpipe"
# control pipe - send commands to mpv
mkfifo "$cpipe"
# status pipe - send text to left text pane
mkfifo "$statuspipe"

# Create the list file
> $PMRPLIST

trap "rm -f $fpipe $ppipe $cpipe $statuspipe $PMRPLIST" EXIT

pmkey=$(($RANDOM * $$))

# Categories are separated with "!" (without quotes)
# The last item in category is without trailing "!"
Categories="181.FM!
Blues!
Bollywood!
Classical!
Country!
Electronic!
Hits!
Jazz!
Medley!
Metal!
News_&_Views!
Oldies!
Reggae!
Rock!
Serbia!
SomaFM!
Urban"


function stations
{
   echo "Category: $1" >> "$ppipe"
   < "$pmrp_stations" sed -n -e 's/^.*'"$1: "'//p' \
   | sed -e $'s/\" \"/\\\n/g;s/\"//g' >> "$fpipe"
}
export -f stations

function run_stations
{
    echo "3:@disabled@"
    echo -e '\f' >> "$fpipe"

    case "$1" in
181.FM)
          stations "$1"
    ;;
Blues)
          stations "$1"
    ;;
Bollywood)
          stations "$1"
    ;;
Classical)
          stations "$1"
    ;;
Country)
          stations "$1"
    ;;
Electronic)
          stations "$1"
    ;;
Hits)
          stations "$1"
    ;;
Jazz)
          stations "$1"
    ;;
Medley)
          stations "$1"
    ;;
Metal)
          stations "$1"
    ;;
"News_&_Views")
          stations "$1"
    ;;
Oldies)
          stations "$1"
    ;;
Reggae)
          stations "$1"
    ;;
Rock)
          stations "$1"
    ;;
Serbia)
          stations "$1"
    ;;
SomaFM)
          stations "$1"
    ;;
Urban)
          stations "$1"
    ;;
         *)
          echo "PMRP: Error! No such Category $1" >> "$ppipe"
            ;;
    esac
    echo "3:$pmrp"
}
export -f run_stations

function load_url
{
    echo "Station: $1   Url: $3" >> $ppipe   
    # Station to the list
    echo "$3" > $PMRPLIST
    # Unload current Playlist
    echo "playlist_remove current" > $cpipe
    # Load list
    echo "loadlist $PMRPLIST" > $cpipe
}
export -f load_url

function status_block
{
if [[ ! -z "$PMRP" ]]; then
   unset PMRP
else
  if [[ "$(echo "$1" | grep -c "^Name*")" = 1 ]]; then
      STATION="$1"
  elif [[ "$(echo "$1" | grep -c "^Title*")" = 1 ]];then
      TITLE="$1"
  elif [[ "$(echo "$1" | grep -c "^Bitrate")" = 1 ]];then
      BITRATE="$1 Kb/s"
  elif [[ "$(echo "$1" | grep -c "^PMRP:*")" = 1 ]];then
      PMRP="$1"
  fi
 
  if [[ -z "$PMRP" ]]; then
    echo "$STATION\n$BITRATE\n$TITLE" >> "$statuspipe"
  else
    echo "\n$PMRP\n" >> "$statuspipe"
  fi

   echo "$(for category in $Categories; do printf "%s" "$category"; done)" >> "$statuspipe"
   echo "$pmrp" >> "$statuspipe"
fi
}

exec 3<> $fpipe
exec 4<> $ppipe
exec 5<> $cpipe
exec 6<> $statuspipe

echo "PMRP: Ready to Play" >> "$ppipe"

killall mpv 2>/dev/null

  mpv --playlist=$PMRPLIST --input-file=$cpipe --cache 2048 --no-config --idle=yes 2>&1 \
     | awk '/[statusline]/{if ($0 ~ "icy-br:*") {gsub(/^.*icy-br:/,"");print "Bitrate  ", $0 ;}
                                 else {if ($0 ~ "icy-name:*") {gsub(/^.*icy-name:/,"");print "Name    ", $0;}
                                 else {if ($0 ~ "icy-genre:*") {gsub(/^.*icy-genre:/,"");print "Genre -", $0;}
                                 else {if ($0 ~ "icy-title:*") {gsub(/^.*icy-title:/,"");print "Title        ", $0;}}}}}
                                 {fflush(stdout)}'  | while read -r line; do status_block "$line"; echo "$line" >>"$ppipe"; done &
function main() {
  yad --plug="$pmkey" --tabnum=1 --form --cycle-read --field "":TXT --field "Category":CB  \
     --image-ontop --field="Load Stations!gtk-add:fbtn" <&6  &

  yad --plug="$pmkey" --tabnum=2 --list --no-markup --dclick-action='bash -c "load_url %s"' \
    --text "Double click to play" --text-align=center --column="Name" --column="Category" --column="Url" \
    --search-column=1 --expand-column=1 --print-column="3" <&3 &

  # Uncoment next line if you want to start with log
  # tail -f "$ppipe" | yad --text-info --title="PMRP-Log" --tail --window-icon=radio --width=600 --height=500 --button="gtk-close" &

  # loads fields on startup
  status_block "PMRP:   Poor Man's Radio Player"

  # Reprints metadata after returning from tray
  echo 'print_text ${metadata}' > $cpipe

  yad --paned --key="$pmkey" --button="Close to Tray!gtk-close":1 \
      --button="Show Log":'bash -c "tail -f -n +1 $ppipe | yad --text-info --tail --title=PMRP-Log --window-icon=radio --width=600 --height=500 --button=gtk-close" &' \
      --button="Pause/Continue":'bash -c "echo cycle pause >> $cpipe"' \
      --button="Stop":'bash -c "echo stop >> $cpipe"'  --text="Select a Category and click to Load Stations" --width=700 --height=500 \
      --title=$"PMRP" --splitter=300 --window-icon="radio" --orient=hor --image=radio --image-on-top --posx=10 --posy=100
RET="$?"

case $RET in
  252)
    echo "quit" >> $cpipe
    echo "PMRP: Preparing for radio silence" >> "$ppipe"
    echo "PMRP: Zzzzzzz" >> "$ppipe"
    ;;
   1)  yad --notification   \
          --image="radio"  \
          --text="PMRP"
        # Need to do this after returned from tray
        status_block ""
main
    ;;
   *) exit 1
    ;;
esac
}
main

exec 3>&-
exec 4>&-
exec 5>&-
exec 6>&-

@hakerdefo thanks. ;)
20
^ thanks.

Appears to be a issue with the computer. Just did a clean install the other day.

The new script works fine on my other computers - Void and VSIDO - so it's not a Void v. Debian under the hood issue.

Edit - did areconfiguration of locale, script works as is now
Pages: 1 [2] 3 4 ... 10