Skip to content

Commit

Permalink
Tiny hackity hack to change the terminal title to the current song
Browse files Browse the repository at this point in the history
  • Loading branch information
danopia committed Mar 4, 2010
1 parent 36e9e82 commit faab341
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mplayer.rb
Expand Up @@ -144,6 +144,7 @@ def stream_from_http http, req

@client.display.panes[:np].controls[:cue].value = @stream_buffer.size
@client.display.panes[:np].controls[:position].text = "#{time_to_s @position} / #{time_to_s @client.now_playing.duration} (#{@stream_buffer.size / 1024} / #{@total_size / 1024} KiB)"
print "\e]2;#{@client.now_playing.to_s}\007" # kick xterm into the alt screen

last_report += chunk.size
if last_report > 102400
Expand Down

0 comments on commit faab341

Please sign in to comment.