about summary refs log tree commit diff stats
path: root/ranger/gui/widgets/__init__.py
blob: 7fa796f603093a7e189e9da6f922cc7d0add46fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# -*- coding: utf-8 -*-

from __future__ import (absolute_import, print_function)

from ranger.gui.displayable import Displayable


class Widget(Displayable):
    """A class for classification of widgets."""

    vcsstatus_symb = {
        'conflict': (
            'X', ['vcsconflict']),
        'untracked': (
            '+', ['vcschanged']),
        'deleted': (
            '-', ['vcschanged']),
        'changed': (
            '*', ['vcschanged']),
        'staged': (
            '*', ['vcsstaged']),
        'ignored': (
            '·', ['vcsignored']),
        'sync': (
            '√', ['vcssync']),
        'none': (
            ' ', []),
        'unknown': (
            '?', ['vcsunknown']),
    }

    vcsremotestatus_symb = {
        'diverged': (
            'Y', ['vcsdiverged']),
        'ahead': (
            '>', ['vcsahead']),
        'behind': (
            '<', ['vcsbehind']),
        'sync': (
            '=', ['vcssync']),
        'none': (
            '⌂', ['vcsnone']),
        'unknown': (
            '?', ['vcsunknown']),
    }

    ellipsis = {False: '~', True: '…'}