Example #1
0
def get_offset():
    """Determines the offset
    of the pane (this process runs in)
    within it's tmux window.
    """
    result = subprocess.check_output([
        'tmux', 'display', '-p', '-F', '#{pane_top},#{pane_left},'
        '#{pane_bottom},#{pane_right},'
        '#{window_height},#{window_width}', '-t',
        get_pane()
    ]).decode()
    top, left, bottom, right, height, width = \
        (int(i) for i in result.split(','))
    return geometry.Distance(top, left, height - bottom, width - right)
Example #2
0
 def __init__(self):
     self.offset = geometry.Distance()
     self.media = {}
     self.screen_width = 0
     self.screen_height = 0
Example #3
0
 def __init__(self):
     self.offset = geometry.Distance()
     self.media = {}