Skip to content

Instantly share code, notes, and snippets.

pboesch

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
jonyamo / i3-exit
Last active Jul 12, 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 <http://crunchbanglinux.org/>
import pygtk
pygtk.require('2.0')
import gtk
import os
import getpass
@vrdhn
vrdhn / launcher
Created Dec 18, 2014
a dmenu+xdotool launcher which can paste to terminal and show often used commands at top
View launcher
#!/usr/bin/python3
# launcher (C) vrdhn0@gmail.com
# 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
@pvik
pvik / hibernate-on-low-battery.sh
Last active Sep 14, 2018
Hibernate on Low Battery, when acpi does not report proper battery status
View hibernate-on-low-battery.sh
#!/bin/sh
# Battery threshold below which, script will hibernate if discharging
batt_threshold=20
# temporary file to store the previous battery charge value, to determine if battery is being discharged
batt_charge_file="/tmp/batt_charge"
# 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
You can’t perform that action at this time.