Skip to content

Instantly share code, notes, and snippets.

View Justaus3r's full-sized avatar
💭
still busy with (irl) stuff...

Justaus3r Justaus3r

💭
still busy with (irl) stuff...
View GitHub Profile
@fnky
fnky / ANSI.md
Last active May 8, 2024 10:16
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@ssokolow
ssokolow / x11_watch_active_window.py
Last active February 6, 2024 22:50
python-xlib example which reacts to changing the active window
#!/usr/bin/env python
"""python-xlib example which reacts to changing the active window/title.
Requires:
- Python
- python-xlib
Tested with Python 2.x because my Kubuntu 14.04 doesn't come with python-xlib
for Python 3.x.

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@adewes
adewes / get_active_window.py
Last active February 28, 2024 23:26
Get the active window in Gtk using the wnck library.
import wnck
import gtk
import time
if __name__ == '__main__':
screen = wnck.screen_get_default()
screen.force_update()
while True:
while gtk.events_pending():
gtk.main_iteration()
@iamatypeofwalrus
iamatypeofwalrus / tabCompleter.py
Created May 23, 2013 17:38
A simple Python Tab Completer for either system paths OR lists.
import os
import sys
import readline
import glob
class tabCompleter(object):
"""
A tab completer that can either complete from
the filesystem or from a list.