コード例 #1
0
ファイル: dgroups.py プロジェクト: srynot4sale/qtile
    def func(dgroup):
        # unbind all
        for key in dgroup.keys[:]:
            dgroup.qtile.unmapKey(key)
            dgroup.keys.remove(key)

        if keynames:
            keys = keynames
        else:
            # keys 1 to 9 and 0
            keys = map(str, range(1, 10) + [0])

        # bind all keys
        for keyname, group in zip(keys, dgroup.qtile.groups):
            name = group.name
            key = Key([mod], keyname, lazy.group[name].toscreen())
            key_s = Key([mod, "shift"], keyname, lazy.window.togroup(name))
            key_c = Key([mod, "control"], keyname,
                        lazy.group.switch_groups(name))
            dgroup.keys.append(key)
            dgroup.keys.append(key_s)
            dgroup.keys.append(key_c)
            dgroup.qtile.mapKey(key)
            dgroup.qtile.mapKey(key_s)
            dgroup.qtile.mapKey(key_c)
コード例 #2
0
    def func(dgroup):
        # unbind all
        for key in dgroup.keys[:]:
            dgroup.qtile.unmapKey(key)
            dgroup.keys.remove(key)

        # keys 1 to 9 and 0
        keynumbers = range(1, 10) + [0]

        # bind all keys
        for num, group in zip(keynumbers, dgroup.qtile.groups[:10]):
            name = group.name
            key = Key([mod], str(num), lazy.group[name].toscreen())
            key_s = Key([mod, "shift"], str(num), lazy.window.togroup(name))
            dgroup.keys.append(key)
            dgroup.keys.append(key_s)
            dgroup.qtile.mapKey(key)
            dgroup.qtile.mapKey(key_s)
コード例 #3
0
ファイル: config.py プロジェクト: silasdavis/dotfiles
from libqtile.manager import Key, Screen
from libqtile.command import lazy
from libqtile import layout, bar, widget

modkey = "mod4"


keys = [
    # First, a set of bindings to control the layouts
    Key([modkey], "k", lazy.layout.down()),
    Key([modkey], "j", lazy.layout.up()),
    Key([modkey, "shift"], "k", lazy.layout.shuffle_down()),
    Key([modkey, "shift"], "j", lazy.layout.shuffle_up()),
    Key([modkey], "space", lazy.layout.next()),
    Key([modkey, "shift"], "space", lazy.layout.rotate()),
    Key([modkey, "shift"], "Return", lazy.layout.toggle_split()),
    Key([modkey], "p", lazy.spawn("exe=`dmenu_path | dmenu` && eval \"exec $exe\"")),
    Key([modkey], "Return", lazy.spawn("urxvt")),
    Key([modkey], "Tab", lazy.nextlayout()),
    Key([modkey, "shift"], "c", lazy.window.kill())
]

groups = [str(i) for i in xrange(1, 10)]
for i in groups:
    keys.append(Key([modkey], i, lazy.group[i].toscreen()))

layouts = [
    layout.Stack(stacks=1, borderWidth=1),
    layout.Stack(stacks=2, borderWidth=1)
]
コード例 #4
0
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
try:
    from libqtile.manager import Key, Group, Click, Drag, Screen
except ImportError:
    from libqtile.config import Key, Group, Click, Drag, Screen

sup = "mod4"
alt = "mod1"

keys = [
# SWAP MASTER WINDOWS AROUND
    Key([alt], "n", lazy.layout.down()),
    Key([alt], "m", lazy.layout.up()),
# LAYOUT CHANGERS
    # move to next layout in the stack
    Key([alt], "space", lazy.nextlayout()),
    # switch master windows
    Key([alt, "shift"], "space", lazy.layout.rotate()),

# MOVEMENT KEYS
    # windows style alt-tab/alt-shift-tab
    Key([alt], "Tab", lazy.layout.next()),
    Key([alt, "shift"], "Tab", lazy.layout.previous()),

    # kill current window
    Key([alt, "shift"], "c", lazy.window.kill()),

    # dec ratio of current window
    Key([alt], "q", lazy.layout.decrease_ratio()),
コード例 #5
0
import os

from libqtile import layout, widget, bar, manager, hook
from libqtile.widget import base
from libqtile.manager import Screen, Drag  # , Click
from libqtile.command import lazy
try:
    from libqtile.manager import Key, Group
except ImportError:
    from libqtile.config import Key, Group

mod = 'mod4'

keys = [
    Key([mod], "k", lazy.layout.down()),
    Key([mod], "j", lazy.layout.up()),
    Key([mod, "shift"], "k", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_up()),
    Key([mod], "Tab", lazy.layout.next()),
    Key([mod, "shift"], "Tab", lazy.layout.client_to_next()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    Key([mod], "space", lazy.nextlayout()),
    Key([mod], "t", lazy.window.toggle_floating()),

    # for MonadTall layout
    Key([mod], "l", lazy.layout.grow()),
    Key([mod], "h", lazy.layout.shrink()),
    Key([mod], "n", lazy.layout.normalize()),
    Key([mod], "m", lazy.layout.maximize()),
コード例 #6
0
    running. """
    def f(qtile):
        try:
            qtile.groupMap[group].cmd_toscreen()
        except KeyError:
            qtile.cmd_spawn(app)

    return f


keys = [
    # Log out; note that this doesn't use mod3: that's intentional in case mod3
    # gets hosed (which happens if you unplug and replug your usb keyboard
    # sometimes, or on ubuntu upgrades). This way you can still log back out
    # and in gracefully.
    Key(["shift", "mod1"], "q", lazy.shutdown()),
    Key([mod], "k", lazy.layout.down()),
    Key([mod], "j", lazy.layout.up()),
    Key([mod], "h", lazy.layout.previous()),
    Key([mod], "l", lazy.layout.previous()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    Key(["mod1"], "Tab", lazy.nextlayout()),
    Key([mod, "mod1"], "h", lazy.to_screen(0)),
    Key([mod, "mod1"], "l", lazy.to_screen(1)),
    Key([mod], "x", lazy.window.kill()),

    # interact with prompts
    Key([mod], "r", lazy.spawncmd()),
    Key([mod], "g", lazy.switchgroup()),
コード例 #7
0
ファイル: config.py プロジェクト: MisterRios/qtileconfig
    from libqtile.config import Key, Group

from libqtile import bar, hook, layout, widget

from libqtile.manager import Screen
from libqtile.command import lazy
# from libqtile.widget.wlan import Wlan
# from libqtile.widget.battery import Battery
import os


sup = "mod4"
alt = "mod1"

keys = [
    Key([alt], "Tab", lazy.layout.down()),
    Key([alt, "shift"], "Tab", lazy.layout.down()),
    Key([sup, "control"], "k", lazy.shuffle_down()),
    Key([sup, "control"], "j", lazy.shuffle_up()),
    Key([sup], "space", lazy.layout.next()),
    Key([sup, "shift"], "space", lazy.layout.previous()),
    Key([sup, "shift"], "Return", lazy.layout.rotate()),

    Key([sup], "Return", lazy.spawn("terminator")),
    Key([sup, alt], "f", lazy.spawn("firefox")),


    Key([sup, "control"], "r", lazy.restart()),
    # cycle to previous group
    Key([sup], "Left", lazy.group.prevgroup()),
    # cycle to next group
コード例 #8
0
    i = getIndex(currentGroup)
    qtile.currentWindow.togroup(groups[(i - 1) % len(groups)].name)


def toNextGroup(qtile):
    currentGroup = qtile.currentGroup.name
    i = getIndex(currentGroup)
    qtile.currentWindow.togroup(groups[(i + 1) % len(groups)].name)


##########################################################################################
# KEYBINDINGS
##########################################################################################

keys = [
    Key(["mod1"], "k", lazy.layout.down()),
    Key(["mod1"], "j", lazy.layout.up()),
    Key(["mod1", "control"], "k", lazy.layout.shuffle_down()),
    Key(["mod1", "control"], "j", lazy.layout.shuffle_up()),
    Key(["mod1"], "space", lazy.layout.next()),
    Key(["mod1", "shift"], "space", lazy.layout.rotate()),
    Key(["mod1", "shift"], "Return", lazy.layout.toggle_split()),
    Key(["mod1"], "Return", lazy.spawn("urxvt -tr +sb -fg white -sh 30")),
    Key(["mod1"], "Tab", lazy.nextlayout()),
    Key(["mod1"], "w", lazy.window.kill()),
    Key(["mod1", "control"], "r", lazy.restart()),
    Key(["mod4"], "f", lazy.spawn("firefox")),
    Key(["mod4"], "d", lazy.spawn("deluge")),
]

for i in groups:
コード例 #9
0
        22,
        opacity=0.1))  # our bar is 22px high
]

# Super_L (the Windows key) is typically bound to mod4 by default, so we use
# that here.
mod = "mod4"

# The keys variable contains a list of all of the keybindings that qtile will
# look through each time there is a key pressed.
keys = [
    # Log out; note that this doesn't use mod4: that's intentional in case mod4
    # gets hosed (which happens if you unplug and replug your usb keyboard
    # sometimes, or on system upgrades). This way you can still log back out
    # and in gracefully.
    Key(["shift", "mod1"], "q", lazy.shutdown()),

    # toggle between windows just like in unity with 'alt+tab'
    Key(["mod1", "shift"], "Tab", lazy.layout.down()),
    Key(["mod1"], "Tab", lazy.layout.up()),
    Key([mod], "h", lazy.layout.previous()),
    Key([mod], "l", lazy.layout.previous()),

    # swap tile positions,(works only on tiles)
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),

    # change the layout
    Key([mod], "j", lazy.nextlayout()),

    # quit the program "qtile way"
コード例 #10
0
from libqtile.manager import Key, Screen, Group
from libqtile.command import lazy
from libqtile import layout, bar, widget

keys = [
    Key(["mod1"], "k", lazy.layout.down()),
    Key(["mod1"], "j", lazy.layout.up()),
    Key(["mod1", "control"], "k", lazy.layout.shuffle_down()),
    Key(["mod1", "control"], "j", lazy.layout.shuffle_up()),
    Key(["mod1"], "space", lazy.layout.next()),
    Key(["mod1", "shift"], "space", lazy.layout.rotate()),
    Key(["mod1", "shift"], "Return", lazy.layout.toggle_split()),
    Key(["mod1"], "h", lazy.to_screen(1)),
    Key(["mod1"], "l", lazy.to_screen(0)),
    Key(["mod1"], "Return", lazy.spawn("xterm")),
    Key(["mod1"], "Tab", lazy.nextlayout()),
    Key(["mod1"], "w", lazy.window.kill()),
    Key(["mod1", "control"], "r", lazy.restart()),
]

groups = [
    Group("a"),
    Group("s"),
    Group("d"),
    Group("f"),
    Group("u"),
    Group("i"),
    Group("o"),
    Group("p"),
]
for i in groups:
コード例 #11
0
ファイル: config.py プロジェクト: thelannor/qtile-myconfig
    "setxkbmap -layout 'us,ru' -option 'grp:alt_shift_toggle' 2>/dev/null",
    "feh --bg-scale {0!r}".format(qtile_default_feh_bg),
    "dropbox start",
]

_fp_distr = _popen('lsb_release -d').stdout
if _fp_distr.read().find('Ubuntu'):
    _applications.insert(0, "pacmd set-sink-mute 0 true")
_fp_distr.close()
del _fp_distr

autostart(check_proc=True, apps=_applications)
del _applications, qtile_default_feh_bg

keys = [
    Key([mod], "Return", lazy.spawn('gmrun')),
    Key([mod], "F1", lazy.spawn(getFileManager(''))),

    Key([mod], "F2", lazy.spawn('lxterminal')),
    Key([mod, "shift"], "F2", lazy.spawn(getTerminal(''))),

    Key([mod], "F3", lazy.spawn(getWebBrowser(''))),

    Key([mod, "shift"], "F4", lazy.restart()),

    Key([mod], "F9", lazy.spawn("mpg123 http://pub2.di.fm:80/di_techhouse 2>~/.mpg123.log")),
    Key([mod, "shift"], "F9", lazy.spawn("killall mpg123")),

    Key([mod], "k", lazy.layout.down()),
    Key([mod, "shift"], "k", lazy.layout.shuffle_down()),
コード例 #12
0
    sep = {
        'background': bar['background'],
        'foreground': '444444',
        'height_percent': 75
    }
    systray = dict(widget)
    systray.update({'icon_size': 16, 'padding': 3})


ALT = 'mod1'
MOD = 'mod4'
SHIFT = 'shift'

keys = [
    # Applications
    Key([MOD], 'b', lazy.spawn(Commands.browser)),
    Key([MOD], 'm', lazy.spawn(Commands.menu)),
    Key([MOD], 'l', lazy.spawn(Commands.lock)),
    Key([MOD], 'Return', lazy.spawn(Commands.terminal)),

    # Simple Window Management
    Key([MOD], 'Tab', lazy.layout.up()),
    Key([MOD, SHIFT], 'Tab', lazy.layout.shuffle_up()),
    Key([MOD], 'c', lazy.window.kill()),

    # Advanced Window Management
    Key([MOD, ALT], 'Right', lazy.layout.up()),
    Key([MOD, ALT], 'Left', lazy.layout.down()),
    Key([MOD, ALT], 'Up', lazy.layout.shuffle_up()),
    Key([MOD, ALT], 'Down', lazy.layout.shuffle_down()),
    Key([MOD, SHIFT], 'Up', lazy.layout.grow()),
コード例 #13
0
# I have configured the key bindings to be optimal on my 10" EeePC, so some may
# not be appropriate on regular keyboards.
# some of the widgets and layouts are not from the core Qtile distribution.

from libqtile.manager import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
from she_widget import She

follow_mouse_focus = False

mod = "mod4"
alt = "mod1"

keys = [
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod], "w", lazy.window.kill()),
    Key([alt], "Tab", lazy.group.next_window()),
    # this is usefull when floating windows get buried
    Key([alt], "grave", lazy.window.bring_to_front()),
    Key([mod, alt], "Tab", lazy.window.to_next_screen()),
    Key([mod, alt], "1", lazy.to_screen(0), lazy.group.toscreen(0)),
    Key([mod, alt], "2", lazy.to_screen(1), lazy.group.toscreen(1)),
    Key([mod], "Left", lazy.group.prevgroup()),
    Key([mod], "Right", lazy.group.nextgroup()),
    Key([mod], "m", lazy.group.setlayout('max')),
    Key([mod], "s", lazy.group.setlayout('stack')),
    Key([mod], "t", lazy.group.setlayout('tile')),
    Key([mod], "r", lazy.group.setlayout('ratiotile')),
    Key([mod], "x", lazy.group.setlayout('xmonad-tall')),
    # Bindings to control the layouts
コード例 #14
0
def main(qtile):
    groups = {
        'h4x': {
            'init': True,
            'persist': True,
            'exclusive': True
        },
        'design': {},
        'www': {
            'exclusive': True
        },
        # master set the master window/windows of layout
        'emesene': {
            'layout': 'tile',
            'master': Match(role=['main'])
        },
        'gajim': {
            'layout': 'tile',
            'master': Match(role=['roster']),
            'exclusive': True
        },
    }

    apps = [
        {
            'match': Match(wm_class=['Gimp']),
            'group': 'design',
            'float': True
        },
        {
            'match': Match(wm_class=['Terminator', 'Qterminal']),
            'group': 'h4x'
        },
        {
            'match': Match(wm_class=['emesene']),
            'group': 'emesene'
        },
        {
            'match':
            Match(wm_class=['Chromium-browser', 'Minefield'],
                  role=['browser']),
            'group':
            'www'
        },
        {
            'match': Match(wm_class=['Gajim.py']),
            'group': 'gajim'
        },
        {
            'match': Match(wm_class=['Wine']),
            'float': True,
            'group': 'wine'
        },
        {
            'match': Match(wm_class=['Xephyr']),
            'float': True
        },
        # Everything i want to be float, but don't want to change group
        {
            'match':
            Match(title=['nested', 'gscreenshot'],
                  wm_class=[
                      'Guake.py', 'MPlayer', 'Exe',
                      re.compile('Gnome-keyring-prompt.*?'), 'Terminal'
                  ],
                  wm_type=['dialog', 'utility', 'splash']),
            'float':
            True,
            'intrusive':
            True
        },
    ]
    dgroups = DGroups(qtile, groups, apps, simple_key_binder(mod))

    # fast switching from/to terminal
    key = Key([], "F12", lazy.function(TermHack(qtile, 'h4x')))
    qtile.mapKey(key)

    # fast switching to urgent
    key = Key(['shift'], "F12", lazy.function(to_urgent))
    qtile.mapKey(key)
コード例 #15
0
import re

from libqtile.command import lazy
from libqtile.manager import Key, Click, Drag, Screen

from libqtile import layout, bar, widget

from libqtile.dgroups import DGroups, Match, simple_key_binder

mod = 'mod4'
keys = [
    # vim like movement
    Key(
        [mod], "h", lazy.group.prevgroup(),
    ),
    Key(
        [mod], "l", lazy.group.nextgroup(),
    ),
    Key(
        [mod], "k",
        lazy.layout.down()
    ),
    Key(
        [mod], "j",
        lazy.layout.up()
    ),
    Key(
        [mod], "f",
        lazy.window.toggle_floating()
    ),
コード例 #16
0
try:
    from libqtile.manager import Key, Group
except ImportError:
    from libqtile.config import Key, Group

from libqtile.manager import Click, Drag, Screen
from libqtile.command import lazy
from libqtile import layout, bar, widget

# The bindings below are for use with a Kinesis keyboard, and may not make
# sense for standard keyboards.
keys = [
    # First, a set of bindings to control the layouts
    Key(
        ["mod1"], "k",
        lazy.layout.down()
    ),
    Key(
        ["mod1"], "j",
        lazy.layout.up()
    ),
    Key(
        ["mod1", "control"], "k",
        lazy.layout.shuffle_down()
    ),
    Key(
        ["mod1", "control"], "j",
        lazy.layout.shuffle_up()
    ),
    Key(
        ["mod1"], "space",
コード例 #17
0
ファイル: roger-config.py プロジェクト: mikkeloscar/qtile
from libqtile.manager import Key, Click, Drag, Screen, Group
from libqtile.command import lazy
from libqtile import layout, bar, widget

mod = 'mod4'
keys = [
    Key(
        [mod], "k",
        lazy.layout.down()
    ),
    Key(
        [mod], "j",
        lazy.layout.up()
    ),
    Key(
        [mod], "f",
        lazy.window.toggle_floating()
    ),
    Key(
        [mod], "space",
        lazy.nextlayout()
    ),
    Key([mod], "Tab",
        lazy.layout.next()
    ),
    Key([mod, "shift"], "Tab",
        lazy.layout.previous()
    ),
    Key(
        [mod, "shift"], "space",
        lazy.layout.rotate()
コード例 #18
0
from libqtile.manager import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
import os

sup = "mod4"
alt = "mod1"

keys = [
    Key([alt], "Tab", lazy.layout.down()),
    Key([alt, "shift"], "Tab", lazy.layout.up()),
    Key([sup, "control"], "k", lazy.layout.shuffle_down()),
    Key([sup, "control"], "j", lazy.layout.shuffle_up()),
    Key([sup], "space", lazy.layout.next()),
    Key([sup, "shift"], "space", lazy.layout.rotate()),
    Key([sup, "shift"], "Return", lazy.layout.toggle_split()),
    Key([sup], "Return", lazy.spawn("terminator")),
    Key([sup], "i", lazy.spawn("icedove")),
    Key([sup], "x", lazy.spawn("xchat")),
    Key([sup], "f", lazy.spawn("iceweasel")),
    Key([sup], "a", lazy.spawn("gajim")),
    Key([sup], "p", lazy.spawn("pidgin")),
    Key([sup], "d", lazy.spawn("setxkbmap -layout es -variant dvorak")),
    Key([sup], "q", lazy.spawn("setxkbmap -layout latan")),
    Key([sup], "w", lazy.window.kill()),
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 0 -q set Master 2dB+")),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c 0 -q set Master 2dB-")),
    Key([sup, "control"], "r", lazy.restart()),
    # cycle to previous group
コード例 #19
0
ファイル: config.py プロジェクト: erayaydin/qtile
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
try:
    from libqtile.manager import Key, Group
except ImportError:
    from libqtile.config import Key, Group
from libqtile.manager import Click, Drag, Screen

sup = "mod4"
alt = "mod1"

keys = [
    # General Keybindings
    Key([sup, "shift"], "q", lazy.shutdown()),
    Key([sup], "k", lazy.layout.down()),
    Key([sup], "j", lazy.layout.up()),
    Key([sup, "control"], "k", lazy.layout.shuffle_down()),
    Key([sup, "control"], "j", lazy.layout.shuffle_up()),
    Key([sup], "space", lazy.layout.next()),
    Key([sup, "shift"], "space", lazy.layout.rotate()),
    Key([sup, "shift"], "Return", lazy.layout.toggle_split()),
    Key([sup], "Tab", lazy.next_layout()),
    Key([sup], "w", lazy.window.kill()),
    Key([sup, "control"], "r", lazy.restart()),
    Key([sup, "control"], "q", lazy.shutdown()),
    Key([sup], "r", lazy.spawncmd()),
    Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c 0 sset Master 1- unmute")),
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 0 sset Master 1+ unmute")),
コード例 #20
0
        ('SquirrelMail', 'E-mail'),
        ('zeromq', 'Docs'),
        ('PyYAML', 'Docs'),
        ('documentation', 'Docs'),
        ('-ietf-', 'Docs'),
        ('GNOME Live!', 'Docs'),
        ('Guide', 'Docs'),
    )
    for k, v in patterns:
        if k in win.name:
            return v


mod = "mod4"
keys = [
    Key([mod], "j", lazy.layout.down()),
    Key([mod], "k", lazy.layout.up()),
    Key([mod, "shift"], "j", lazy.layout.move_down()),
    Key([mod, "shift"], "k", lazy.layout.move_up()),
    Key([mod, "control"], "j", lazy.layout.section_down()),
    Key([mod, "control"], "k", lazy.layout.section_up()),
    Key([mod], "h", lazy.layout.collapse_branch()),  # for tree layout
    Key([mod], "l", lazy.layout.expand_branch()),  # for tree layout
    Key([mod], "r",
        lazy.layout.sort_windows(window_sorter)),  # for tree layout
    Key([mod, "shift"], "h", lazy.layout.move_left()),
    Key([mod, "shift"], "l", lazy.layout.move_right()),
    Key([mod, "control"], "l", lazy.layout.increase_ratio()),
    Key([mod, "control"], "h", lazy.layout.decrease_ratio()),
    Key([mod], "comma", lazy.layout.increase_nmaster()),
    Key([mod], "period", lazy.layout.decrease_nmaster()),
コード例 #21
0
ファイル: config.py プロジェクト: y3g0r/homedir
                    widget.Clock('%Y-%m-%d %a %I:%M %p', **font_options),
                    widget.WindowName(**font_options),
                    ],
                30)
            )
        ]

    # Super_L (the Windows key) is typically bound to mod4 by default, so we use
    # that here.
    mod = "mod4"

    # The keys variable contains a list of all of the keybindings that qtile will
    # look through each time there is a key pressed.
    keys = [
        # Admin commands
        Key([mod, "control"], "q",     lazy.shutdown()),
        Key([mod, "control"], "r",     lazy.restart()),
        Key([mod], "Return",           lazy.spawn("urxvt")),
        Key([mod], "F2", lazy.spawn("dmenu_run -fn 'Monospace:size=10' -nb '#000000' -nf '#fefefe'")),
        Key([mod], "F4", lazy.spawn("slock")),
        # Key([mod], "F4", lazy.spawn("gnome-screensaver-command -l")),
        Key([mod, "shift"], "c",       lazy.window.kill()),

        # Layout commands
        Key([mod], "k",                lazy.layout.down()),
        Key([mod], "j",                lazy.layout.up()),
        Key([mod], "h",                lazy.layout.previous()),
        Key([mod], "l",                lazy.layout.next()),
        Key([mod, "control"], "k",     lazy.layout.shuffle_up()),
        Key([mod, "control"], "j",     lazy.layout.shuffle_down()),
        # move_up() and move_down() are only supported by tree layout
コード例 #22
0
        widget.Clock('%Y-%m-%d %a %I:%M %p'),
    ], 30)) # our bar is 30px high
]

# Super_L (the Windows key) is typically bound to mod4 by default, so we use
# that here.
mod = "mod4"

# The keys variable contains a list of all of the keybindings that qtile will
# look through each time there is a key pressed.
keys = [
    # Log out; note that this doesn't use mod4: that's intentional in case mod4
    # gets hosed (which happens if you unplug and replug your usb keyboard
    # sometimes, or on system upgrades). This way you can still log back out
    # and in gracefully.
    Key(["shift", "mod1"], "q",  lazy.shutdown()),

    Key([mod], "k",              lazy.layout.down()),
    Key([mod], "j",              lazy.layout.up()),
    Key([mod], "h",              lazy.layout.previous()),
    Key([mod], "l",              lazy.layout.previous()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return",lazy.layout.toggle_split()),
    Key(["mod1"], "Tab",         lazy.nextlayout()),
    Key([mod], "x",              lazy.window.kill()),

    # interact with prompts
    Key([mod], "r",              lazy.spawncmd()),
    Key([mod], "g",              lazy.switchgroup()),

    # start specific apps