Skip to content

Instantly share code, notes, and snippets.

@JamesTheBard
JamesTheBard / i3lock_pixelate
Created June 8, 2013 00:04
The cool pixelated i3lock script provided by Steffan Honig.
#!/bin/bash
#
# This is an easier-to-tweak version of Steffen Honig's i3lock
# script. If it doesn't work, it's his fault ;)
#
TEMP_FILE=/tmp/lock.png
TEMP_FILE_POST=/tmp/lock.modified.png
BAR_BG_COLOR="orange"
BAR_FONT_COLOR="white"
BAR_FONT="Source-Code-Pro-Black"
@JamesTheBard
JamesTheBard / get_song_mpd
Last active December 18, 2015 03:38
Perl script to grab mpd status and information.
#!/usr/bin/env perl
use Switch;
# Grab the first line from 'mpc' and throw it into
@song = split("\n", `mpc 2>&1`);
switch ($song[0]) {
case /Connection refused/ { print "MPD not running\n" }
case /^volume/ { print "Music playback stopped\n"}
@JamesTheBard
JamesTheBard / bindings
Last active December 18, 2015 02:28
Quick keybinds for increasing/decreasing volume using i3.
# Brightness bindings
bindsym XF86MonBrightnessUp exec "xbacklight -inc 10"
bindsym XF86MonBrightnessDown exec "xbacklight -dec 10"
# Audio bindings
bindsym XF86AudioPlay exec "mpc toggle"
bindsym XF86AudioStop exec "mpc stop"
bindsym XF86AudioNext exec "mpc next"
bindsym XF86AudioPrev exec "mpc prev"
@JamesTheBard
JamesTheBard / gist:5659942
Last active December 17, 2015 19:19
The first issue that I see...
' This is what you have Arlen...
do while MoreSold = "yes"
' Notice that you have 'FoodType'
FoodType = Inputbox("What type of food sold? (hamburger, hotdog, corndog, or nacho)")
NumSold = Inputbox("How many were sold?")
' ...and you have 'foodtype' here...
Select Case foodtype
Case "hamburger"
NumSold = NumHamburgers
@JamesTheBard
JamesTheBard / gist:5527817
Created May 6, 2013 20:15
Quick output for the "free" command.
jweatherly@rog ~ % last -h
last: invalid option -- 'h'
Usage: last [-num | -n num] [-f file] [-t YYYYMMDDHHMMSS] [-R] [-adioxFw] [username..] [tty..]
1 jweatherly@rog ~ % last -R -F reboot :(
wtmp begins Sun May 5 13:27:59 2013
jweatherly@rog ~ %