Skip to content

Instantly share code, notes, and snippets.

@jersey99
jersey99 / life_in_seconds.py
Last active February 15, 2019 02:19
Get your age in seconds. And find out when you hit that integer exponent in your favorite base
#!/usr/bin/env python3
import argparse
import math
from datetime import datetime, timezone, timedelta
def get_tob_from_str(tob_str):
# Time of birth
try:
tob = datetime.strptime(tob_str, "%Y-%m-%dT%H:%M:%S%z")
# Swaps the workspace (ws) being displayed with it's adjacent ws
# DEPENDS: https://github.com/ziberna/i3-py
# ADD the following lines to i3 config file: ~/.i3/config
# bindsym $mod+less exec python /path/to/i3_move_ws.py left
# bindsym $mod+greater exec python /path/to/i3_move_ws.py right
import i3
def move_ws(direction):
d = 1 if direction == 'right' else -1