image showing MPD now playing in tmux status bar
Firstly grab this shell script, make it executable and drop it in ~/scripts/ directory or anywhere you choose
edit the script mpc current / mpc status -h flag with your own MPD servers hostname or I.P address
then simply add this to your ~/.tmux.conf
set -g status-left " MPD: #[fg=colour255]#(~/scripts/xarchmpdnp1)"
edit the path to wherever you saved script too
same only this script shows most recent archlinux news item
The news item requires python-feedparser as we are grabbing the item via RSS feed to show in tmux bar just follow above steps only replacing scripts
set -g status-left " News: #[fg=colour255]#(~/scripts/anews.py)"
Simple shell script for MPD now playing, using xcowsay to define image
(any image can be used)
xcowsay --at 800,20 --font=CaviarDreams --monitor=1 --image=/home/cirrus/djtux.png "MPD Now Playing" "$OSD"
Download xcowmpd.sh Script
edit the –at switch to define where on VDU image shows
and ofc edit the –monitor switch to define which VDU
see here for moar indepth configuration options
To have the script execute on MPD song change,
add this 1 line to ~/.ncmpcpp/config
execute_on_song_change = ~/path/to/xcowmpd.sh
Alternatively if not using ncmpcpp simply execute this script alongside mpd,mcp [edit to suit]
Here is some more of my simple shell scripts where xcowsay could be used opposed to notify-send
I came across this shell script & i thought it worth sharing, sadly it is only usable for those with a UK IP. It enables us to watch these UK TV channels in any external media player.
First off you will need to head over to tvcatchup and sign up for a free account ( it takes only a few minutes ) then we head here for the shell script
As you see in lines 4 & 5 of script is where you enter your recently created username and password from tvcatchup.com, save the script as tv.sh to your home directory, make it executable and in terminal type
~/tv.sh you will see …
Pick teh corresponding number to channel you want to view and “thats all folks”
*shell script would prolly work in OSX, id urge any OSX users to test and let me know.
** you can ofc edit script to replace default VLC with your media player of choice.
One of the great things about Linux is that there’s usually more than one way to do something. Chances are, the way you are doing a particular task right now isn’t necessarily the best way either. This collection of hacks is the result of a lot of effort: some are functional, some are fun, but they are all cool! So, start reading, and find out what you could be doing with Linux…
DISCLAIMER: Obviously, anything you do to your computer is your responsibility, and while we have made every effort to test these hacks, your mileage may vary. With most of them, it is highly unlikely that you can do any damage – but the expert tips carry a higher risk of something going wrong, especially if you don’t follow the instructions carefully. To reiterate, Linux Format and its authors take no responsibility for anything. Ever. At all. Except if it works, in which case you should pay us back in beer.
Fix a wonky terminal
- Difficulty: Easy
- Application: bash
We’ve all done it – accidentally used less or cat to list a file, and ended up viewing binary instead. This usually involves all sorts of control codes that can easily screw up your terminal display. There will be beeping. There will be funny characters. There will be odd colour combinations. At the end of it, your font will be replaced with hieroglyphics and you don’t know what to do. Well, bash is obviously still working, but you just can’t read what’s actually going on! Send the terminal an initialisation command:
and all will be well again.
python script will display the track you are currently listening to via audacious in xchat when u type /audacious command
Ethan Best wrote the script originally kudos to him
Script Was Modified By a good friend @corndogcomputer to show “HD Audio Output current track by current artist” opposed to the original script which showed “np current track”
get script here
I came across a now playing script for xchat/audacious (python) get it. Here
also here is a working perl xchat script for clementine (may work with other players) now playing+ Here # /np