Skip to content

Instantly share code, notes, and snippets.

View brunobraga's full-sized avatar

Bruno Braga brunobraga

  • Brisbane, Australia
View GitHub Profile
@brunobraga
brunobraga / dot.py
Created March 14, 2013 14:06
A minimalistic example of implementing a screen for termsaver.
###############################################################################
#
# file: dot.py
#
# Purpose: refer to python doc for documentation details.
#
# Note: This file is part of Termsaver application, and should not be used
# or executed separately.
#
###############################################################################
@brunobraga
brunobraga / i3lock.sh
Created June 11, 2013 00:22
Places pre/post hooks for application restarting while in lock mode. Designed for i3 window manager, but could be used for others as well.
#!/bin/bash
###############################################################################
#
# file: i3lock.sh
#
# Purpose: manages i3lock with pre/post application restart hooks.
# eg. kills skype/pidgin once locked is triggered, and opens them
# again once lock is released.
#
# Usage: set call to this script in i3 config file, eg:
@brunobraga
brunobraga / gmail-count
Last active June 15, 2023 11:49
A simple Gmail unread count script for i3status or conky bars, taking care of its own time frequency (avoid overhead in simplistic approaches such as i3status). See --help for documentation and usage details.
#!/usr/bin/python
###############################################################################
#
# file: gmail-count
#
# Purpose: generates a string value representing the Gmail unread email count.
#
# Usage: pipe the i3status with this script (see i3status manpage)
# or use conky.
#
@brunobraga
brunobraga / pingi
Created November 1, 2013 00:04
A simple script wrapping ping for better output on issues (host unreachable or timeout).
#!/bin/bash
#
# File: pingi
#
# Purpose: Ping Improved. Actually just handles better the timeout/unreachable.
#
# Author: BRAGA, Bruno <[email protected]>
#
# Copyright:
#