Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block pboesch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jonyamo / i3-exit
Last active Aug 27, 2019
Exit script for the i3 window manager based off of exit script from CrunchBang Linux.
View i3-exit
#!/usr/bin/env python
# based on cb-exit used in CrunchBang Linux <>
import pygtk
import gtk
import os
import getpass
pvik /
Last active Sep 14, 2018
Hibernate on Low Battery, when acpi does not report proper battery status
# Battery threshold below which, script will hibernate if discharging
# temporary file to store the previous battery charge value, to determine if battery is being discharged
# read in batt charge from acpi
echo "`acpi -b`, `cat /tmp/batt_charge`%" | awk -F'[:,%]' '{print $2, $3, $5, ($5 - $3), ($3-$5)<0?"discharging":"powered"}' | {
read -r acpi_status capacity old_capacity capacity_diff status
vrdhn / launcher
Created Dec 18, 2014
a dmenu+xdotool launcher which can paste to terminal and show often used commands at top
View launcher
# launcher (C)
# A dmenu & xdotool based launcher
# Features
# * Select from previously entered commands, or enter new one
# * Listing sorted by usage frequency
# * pasted to application using xdotool
# * terminate by '&' to launch as X application
# * manipulate ~/.config/launcher.db to add/remove/bump usage count
You can’t perform that action at this time.