Fluxbox video/conky toggles

TOGGLES FOR VIDEOS/CONKYS,

Toggle Videos removes all but the bottom Conky and places a video, or series of videos on your root window using mplayer.
Mplayer does everything under the sun concerning video.

The current options I have enabled are mplayer -fs -rootwin -quiet -shuffle. This places a video running in your root window with a black screen and only the bottom Conky and taskbar remaining.

mplayer

This uses surprisingly little resources, and is just neat as hell. I have let video loop on my desktop before while working on other things with no discomfort whatsoever. You may open menus, internet, etc . . .without disrupting the video.

*NOTE: you will find All of the scripts in a tar.gz file here: http://www.fileden.com/getfile.php?file_path=http://www.fileden.com/files/2009/5/10/2437176/toggles.tar.gz

Use of this feature is dependent upon changing the path to your wallpaper in ~/.scripts/togglevid.sh, and ~/.scripts/toggleextras.sh, or to make ~/pictures/wallpapers/, and use it for wallpaper use.

Dark wallpapers seem to work best with these Conky settings. Also you may want to add the line:

session.screen0.rootCommand: fbsetbg -c -r ~/pictures/wallpapers

to your ~/.fluxbox/init file in order to tell Fluxbox to use that folder for your wallpaper. Random wallpapers are fun.

The ‘-r ‘ option does just that, placing your wallpaper at random from a folder. If random isn’t wanted, just complete the path like this:

session.screen0.rootCommand: fbsetbg -c ~/pictures/wallpapers/fancypictureofmystrangedog.jpg

This will only place the picture of your choosing (-c = centered).

Toggle Extras takes all Conkys off the root window, and also takes off the wallpaper and shuts down audacious. Don’t worry if you don’t have audacious. The script calls ‘killall audacious’ and doesn’t care if it’s not there, only if it is.
More items can easily be added or removed as necessary by editing the sh scripts in ~/.scripts. This feature is great when working with many open windows without distraction.

Toggle Conky just removes all of the Conkys. Helpful at times.

All of the Conkys and the toggle.sh’s are in one folder named .scripts, in the ‘toggle.tar.gz’ file. (First link in post).
Upon unpacking you will find a folder named .scripts to be placed in your ~/home folder.

To call these scripts from your fluxbox menu, just add the appropriate path to your current fluxbox menu, or replace with my menu, menu1 (see second guide) and then edit to suit your needs.

~/.fluxbox/menu1 includes the command to open all of the Debian menu items if you start feeling stuck, and will also help you to understand the ~/.fluxbox menu system better after exploring a bit. Again, you are always free to change whatever you like.

For all of this to work you will need a few packages. In a root terminal:

apt-get install conky curl xsltproc ffmpeg mplayer

This will pull in a few more packages as well that you will need.

To play videos:
I have the path for the videos set to ~/Videos. Just make a folder named ‘Videos’ in your ~/home directory. Place any .wmv or other files you may have into that directory.
Open up ~/.scripts/togglevid.sh, change the name of any of the existing video(s), save and close. Then ‘Toggle Video’ from the fluxbox menu. This assumes that you have edited the paths correctly, or are using menu1 from the second page/blog.

Please note that in order for the Conkys to work properly for the weather you will have to change the weather/zip code in ~/.scripts/weather.sh and ~/.scripts/bottomconky and ~/.scripts/weather_dictionary/conkyweather.

Use: http://xoap.weather.com/search/search?where=%5Byourcity%5D to find your code. U.S. users can just use their zip code.

All of this can of course be broken down further. Don’t want any Conkys? No problem. Want only one of them? No problem. Want to just be able to toggle your wallpaper? No problem. It’s all easy to change and edit in Fluxbox.

Here is just the script for putting a video on your root window and shutting it off again through your fluxbox menu.  If you have conkys and the like, just make sure you path them to ~/.scripts as shown below.  You will have to make all the adaptations if you do not download the tar file from the link above.
# Author:       sleekmason
# Latest change: Sun Nov30, 2008.
################################################################################

#!/bin/bash

if pidof mplayer | grep [0-9] > /dev/null
then
killall mplayer &
## Commands placed next include items to start upon
##completion of video.
##
#conky -c ~/.scripts/bottom-conky/bottomconky &
conky -c ~/.scripts/fortunes &
conky -c ~/.scripts/conkyclock &
conky -c ~/.scripts/dictionary/dictionary &
#conky -c ~/.scripts/boxweather/conkyweather &
fbsetbg -r ~/pictures/wallpapers &
audacious
else
##commands placed next include items to kill when video starts.
## using the ‘;’ symbol signifies restart of file
##
pkill conky; conky -c ~/.scripts/bottom-conky/bottomconky &
killall audacious &
/usr/bin/fbsetroot -solid black &
## Add below the list of videos you wish to use
## care must be taken to make sure you add videos
## by going to the previous ‘\’ of a filename and
## then pressing enter before adding new videofilename
## There can be no spaces between’\’ and hitting return
## or this will not work properly
## Thank you sidux irc!
mplayer -fs -rootwin -quiet -shuffle \
~/Videos/sexonfire.wmv \
~/Videos/video1.wmv \
~/Videos/video2.wmv \
~/Videos/video.wmv \
~/Videos/with-without.wmv \
~/Videos/symphony.wmv \
~/Videos/smells.wmv\
##
fi

Advertisements

2 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s