コード例 #1
0
from libqtile.manager import Key, Screen, Group
from libqtile.command import lazy
from libqtile import layout, bar, widget
import os

##########################################################################################
# HELPER FUNCTIONS
##########################################################################################

groups = [
    Group("a"),
    Group("s"),
    Group("d"),
    Group("f"),
    Group("u"),
    Group("i"),
    Group("o"),
    Group("p"),
]


def getIndex(currentGroupName):
    for i in xrange(len(groups)):
        if groups[i].name == currentGroupName:
            return i


def toPrevGroup(qtile):
    currentGroup = qtile.currentGroup.name
    i = getIndex(currentGroup)
    qtile.currentWindow.togroup(groups[(i - 1) % len(groups)].name)
コード例 #2
0
ファイル: config.py プロジェクト: y3g0r/homedir
        # window_name = window.window.get_name()
        # if window_name in (
        #         'NVIDIA X Server Settings',
        #         'Really quit?',
        #         'Disable Display Device',
        # ) or window_name.startswith(
        #     (
        #         'Opening ',
        #     )
        # ):
            window.floating = True

    # Specify group names, and use the group name list to generate an appropriate
    # set of bindings for group switching.
    groups = [
        Group('1-main', layout='s404020'),
        Group('2-email', layout='s6040'),
        Group('3-vm', layout='s8020'),
        Group('4-misc', layout='s8020'),
    ]
    for i, group in enumerate(groups, start=1):
        keys.append(
            Key([mod], str(i), lazy.group[group.name].toscreen())
        )
        keys.append(
            Key([mod, "shift"], str(i), lazy.window.togroup(group.name))
        )

except Exception:
    logger.exception('config failed')
コード例 #3
0
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([mod],
         "Button3",
         lazy.window.set_size_floating(),
         start=lazy.window.get_size()),
    Click([mod], "Button2", lazy.window.bring_to_front())
]

# Next, we specify group names, and use the group name list to generate an appropriate
# set of bindings for group switching.
groups = []
for i in ["a", "s", "d", "f", "u", "i", "o", "p"]:
    groups.append(Group(i))
    # add some more key bindigns
    # go to a specific screen
    keys.append(Key([mod], i, lazy.group[i].toscreen()))
    # take the current window to a specific screen
    keys.append(Key(["control", "mod1"], i, lazy.window.togroup(i)))

# layout instances
# I've not included 'Tile' and 'RatioTile',
# they didn't appeal to me much.
layouts = [
    layout.Max(),
    layout.Stack(stacks=2, border_width=1),

    # splits screen into equal parts
    # ideal for four splitted windows
コード例 #4
0
ファイル: config.py プロジェクト: erayaydin/qtile
    Key([sup], "Return", lazy.spawn("terminator")),
    Key([sup], "c", lazy.spawn("chromium")),
    Key([sup], "p", lazy.spawn("phpstorm")),
    Key([sup], "s", lazy.spawn("subl3")),
]

defaultGroups = {
    'chromium': 'web',
    'firefox': 'web',
    'terminator': 'term',
    'subl3': 'development',
    'Welcome to PhpStorm': 'development',
}

groups = [
    Group("home"),
    Group("term"),
    Group("irc"),
    Group("web"),
    Group("development"),
]

for index, grp in enumerate(groups):
    keys.extend([
        Key([sup], grp.name[0], lazy.group[grp.name].toscreen()),
        Key([sup, "control"], grp.name[0], lazy.window.togroup(grp.name)),
    ])

layouts = [
    layout.Max(),
    layout.Stack(num_stacks=2),
コード例 #5
0
    }),
    ("email", {
        'layout': 'max'
    }),
    ("chat", {
        'layout': 'tile'
    }),
    ("music", {}),
    ("docs", {
        'layout': 'max'
    }),
    ("vbox", {}),
    ("gimp", {}),
]

groups = [Group(name, **kwargs) for name, kwargs in group_names]

for i, (name, kwargs) in enumerate(group_names, 1):
    keys.append(Key([mod], str(i), lazy.group[name].toscreen()))
    keys.append(Key([mod, "shift"], str(i), lazy.window.togroup(name)))

layouts = [
    layout.Stack(stacks=2, border_normal="#222222"),
    layout.MonadTall(border_normal="#222222"),
    layout.Tile(),
    layout.Max()
]

font = 'DejaVu Sans Mono'
foreground = '#BBBBBB'
alert = "#FFFF00"
コード例 #6
0
    Key([alt], "t", lazy.window.toggle_floating()),
]

mouse = [
    Drag([alt], "Button1", lazy.window.set_position_floating(),
        start=lazy.window.get_position()),
    Drag([alt], "Button3", lazy.window.set_size_floating(),
        start=lazy.window.get_size()),
    Click([alt], "Button2", lazy.window.bring_to_front())
]

# Next, we specify group names, and use the group position to generate
# a key binding for it.

groups = [
     Group('home'),
     Group('emacs'),
     Group('mail'),
     Group('stats'),
     Group('terminal'),
     Group('weechat'),
     Group('music'),
     Group('skype'),
     Group('etc')
]

for index, grp in enumerate(groups):

     # index is the position in the group list grp is the group object.
     # We assign each group object a set of keys based on it's
     # position in the list.
コード例 #7
0
    Key([sup, "control"], "r", lazy.restart()),
    # cycle to previous group
    Key([sup], "Left", lazy.group.prevgroup()),
    # cycle to next group
    Key([sup], "Right", lazy.group.nextgroup()),

    # windows style alt-tab/alt-shift-tab
    Key([sup], "Tab", lazy.nextlayout()),
    Key([sup, "shift"], "Tab", lazy.previouslayout()),
    # PRINT SCREEN
    Key([sup], "F10", lazy.spawn("import -window root ~/screenshot.png")),
    Key([alt], "t", lazy.window.toggle_floating()),
]

groups = [
    Group("1"),
    Group("2"),
    Group("3"),
    Group("4"),
    Group("5"),
    Group("6"),
    Group("7"),
    Group("8"),
]
for i in groups:
    keys.append(Key([sup], i.name, lazy.group[i.name].toscreen()))
    keys.append(Key([sup, "shift"], i.name, lazy.window.togroup(i.name)))

# This allows you to drag windows around with the mouse if you want.
mouse = [
    Drag([sup],
コード例 #8
0
                 fallback=layout.Slice('right',
                                       320,
                                       role='roster',
                                       fallback=layout.Stack(1, **border))),
    layout.Slice('left',
                 192,
                 role='gimp-toolbox',
                 fallback=layout.Slice('right',
                                       256,
                                       role='gimp-dock',
                                       fallback=layout.Stack(1, **border))),
]
floating_layout = layout.Floating(**border)

groups = [
    Group('1'),
    Group('2', layout='max'),
    Group('3'),
    Group('4', layout='treetab'),
    Group('5'),
    Group('6'),
    Group('7'),
    Group('8'),
    Group('9'),
]

for i in groups:
    keys.append(Key([mod], i.name, lazy.group[i.name].toscreen()))
    keys.append(Key([mod, "shift"], i.name, lazy.window.togroup(i.name)))

screens = [
コード例 #9
0
    Drag([alt],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([alt],
         "Button3",
         lazy.window.set_size_floating(),
         start=lazy.window.get_size()),
    Click([alt], "Button2", lazy.window.bring_to_front())
]

# Next, we specify group names, and use the group position to generate
# a key binding for it.

groups = [
    Group(''),
    Group(''),
    Group(''),
    Group(''),
    Group(''),
    Group(''),
    Group(''),
    Group(''),
    Group('')
]

for index, grp in enumerate(groups):

    # index is the position in the group list grp is the group object.
    # We assign each group object a set of keys based on it's
    # position in the list.
コード例 #10
0
ファイル: config.py プロジェクト: thelannor/qtile-myconfig
mouse = [
    Drag([mod], "Button1", lazy.window.set_position_floating(),
        start=lazy.window.get_position()),
    Drag([mod], "Button3", lazy.window.set_size_floating(),
        start=lazy.window.get_size()),
]

_groups = [
    ("Terminal", {}),
    ("Local", {}),
    ("Web", {'layout': 'max'}),
    ("Debug", {}),
]

groups = [ Group(name, **kwargs) for name, kwargs in _groups ]

for i, (name, kwargs) in enumerate(_groups, 1):
    keys.append(Key([mod], str(i), lazy.group[name].toscreen()))
    keys.append(Key([mod, "shift"], str(i), lazy.window.togroup(name)))

layouts = [
    layout.Max(),
    layout.Stack(stacks=2, border_normal="#222222"),
    layout.MonadTall(border_normal="#222222"),
    layout.Tile()
]

font = 'DejaVu Sans Mono'
fg = '#BBBBBB'
alert = "#FFFF00"
コード例 #11
0
        'apps': {
            'wm_class': ()
        }
    }),
    # Skype
    ('skype', {
        'apps': {
            'wm_class': ('Skype', )
        },
        'layout': 'skype'
    }),
)

groups = []
for index, (name, config) in enumerate(group_setup, 1):
    groups.append(Group(name, layout=config.get('layout', 'xmonad')))
    keys.extend([
        Key([MOD], str(index), lazy.group[name].toscreen()),
        Key([MOD, SHIFT], str(index), lazy.window.togroup(name))
    ])

mouse = [
    Drag([MOD],
         'Button1',
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([MOD],
         'Button3',
         lazy.window.set_size_floating(),
         start=lazy.window.get_size()),
    Click([MOD], 'Button2', lazy.window.bring_to_front())
コード例 #12
0
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([mod],
         "Button3",
         lazy.window.set_size_floating(),
         start=lazy.window.get_size()),
    Click([mod], "Button2", lazy.window.bring_to_front()),
]

# Next, we specify group names, and use the group name list to generate an
# appropriate set of bindings for group switching.
groups = [Group(str(i)) for i in (1, 2, 3, 4, 5, 6, 7, 8, 9, 0)]
for i in groups:
    keys.append(Key([mod], i.name, lazy.group[i.name].toscreen()))
    keys.append(
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
            lazy.group[i.name].toscreen()))

border = dict(
    border_normal='#808080',
    border_width=0,
)

# Layout instances:
layouts = [
    layout.Max(),
    layout.Stack(stacks=2, **border),
コード例 #13
0
ファイル: config.py プロジェクト: MisterRios/qtileconfig
    # cycle to previous group
    Key([sup], "Left", lazy.group.prevgroup()),
    # cycle to next group
    Key([sup], "Right", lazy.group.nextgroup()),

    # windows style alt-tab/alt-shift-tab
    Key([sup], "Tab", lazy.nextlayout()),
    Key([sup, "shift"], "Tab", lazy.previouslayout()),

    
    Key([sup, "shift"], "Tab", lazy.previouslayout()),

]

groups = [
    Group("h"),
    Group("n"),
    Group("e"),
    Group("i"),
    Group("o"),
]

for i in groups:
    keys.append(Key([sup], i.name, lazy.group[i.name].toscreen()))
    keys.append(Key([sup, "shift"], i.name, lazy.window.togroup(i.name)))


screens = [
    Screen(
        bottom=bar.Bar(
            [