This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
status=$(mpc status | grep play) | |
if [ -n "$status" ] | |
then | |
mpc pause >> /dev/null | |
else | |
mpc play >> /dev/null | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
check_file="/home/jjrh/scripts/rotation_status" | |
screen="HDMI1" | |
#if the rotation file doesn't exist create it and assume normal. | |
if [ ! -e $check_file ] | |
then | |
touch $check_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# tool for mpd that formats the output of mpc in a way I can remember it. | |
# If I like a song in my playlist dump its name and file location into $file_path | |
# | |
file_path="~/temp/good_songs" | |
echo "--------------------------------------------------------------------------------" >> $file_path # note this line is 80characters wide. | |
SONG_INFO=`mpc status -f "%artist% - %title% \n%file%" | head -1` | |
SONG_LOCATION=`mpc status -f "%artist% - %title% \n%file%" | head -2 | tail -n -1` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DISPLAY=:0 | |
export DISPLAY | |
prompt_dialog () | |
{ | |
text=$(zenity --text-info --title="what have you been working on?" --editable) | |
length=${#text} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# checks if a program is running, if not, it tries to start it. | |
# after 3 tries, if the program hasn't started we print out the error | |
# and return. | |
errors="" | |
check_prog () | |
{ | |
if [ $count -eq 3 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
from termcolor import colored, cprint | |
except Exception as e: | |
# if they don't have this library we define it here. | |
def colored(input_string,*args,**kwargs): | |
return input_string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2, re, time | |
from Tkinter import * | |
import datetime | |
import webbrowser | |
class App: | |
def __init__(self, master): | |
self.master = master | |
frame = Frame(master, bg="") | |
frame.pack() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import argparse | |
def create_line(str_in,length,decorate="-"): | |
line_length = len(str_in) | |
if(line_length > length): | |
print "error:" | |
print "line is %s characters too long. ( length=%s )" % (line_length - length, line_length) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import telnetlib | |
import json | |
import datetime | |
from termcolor import colored | |
print "" | |
print "opening telnet connection to api.bitcoincharts.com:27007" | |
print "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
weechat::register "sort_buffs" "FlashCode" "0.1" "GPL3" "sorts buffers" "" "" | |
proc sortbuffs {data signal signal_data} { | |
set bufflist [] | |
set infolist [weechat::infolist_get "buffer" "" ""] |
OlderNewer