Пример #1
0
def init_keys(mod):
    keys = [
        # Switch between windows in current stack pane
        Key([mod], "k", lazy.layout.down()),
        Key([mod], "j", lazy.layout.up()),

        # Move windows up or down in current stack
        Key([mod, "control"], "k", lazy.layout.shuffle_down()),
        Key([mod, "control"], "j", lazy.layout.shuffle_up()),

        # Move windows to other stack
        Key([mod, "shift"], "j", lazy.layout.client_to_next()),

        # Switch window focus to other pane(s) of stack
        Key(["mod1"], "Tab", lazy.layout.next()),

        # Swap panes of split stack
        Key(["mod5"], "Tab", lazy.screen.next()),

        # Toggle between split and unsplit sides of stack.
        # Split = all windows displayed
        # Unsplit = 1 window displayed, like Max layout, but still with
        # multiple stack panes
        Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
        Key([mod], "Return", lazy.spawn("xterm")),

        # Toggle between different layouts as defined below
        Key([mod], "Tab", lazy.next_layout()),
        Key([mod], "w", lazy.window.kill()),
        Key([mod, "control"], "r", lazy.restart()),
        Key([mod, "control"], "q", lazy.shutdown()),
        Key([mod], "r", lazy.spawncmd()),

        # Monitor orientation
        Key([mod], "v", lazy.function(screenlayout, 'vertical')),
        Key([mod], "h", lazy.function(screenlayout, 'horizontal')),

        # Keyboard layouts
        Key([mod], "s", lazy.function(kbd_layout, "es", option=" ")),
        Key([mod], "e",
            lazy.function(kbd_layout, "us", "altgr-intl",
                          "compose:menu,ctrl:nocaps")),

        # Lock screen
        Key([mod], "l", lazy.spawn("xscreensaver-command -lock")),

        # DropDown
        Key([], 'F11', lazy.group['scratchpad'].dropdown_toggle('term')),
        Key([], 'F12', lazy.group['scratchpad'].dropdown_toggle('org')),
    ]
    return keys
Пример #2
0
    def __init__(self,
                 modifiers,
                 key,
                 children,
                 *commands,
                 ishome=False,
                 **kwds):
        super().__init__(modifiers, key, *commands,
                         lazy.function(self.updateMap()))

        # if this key has commands
        if commands:
            self.iscommand = True
        else:
            self.iscommand = False

        # Set the group name
        if 'name' in kwds:
            self.desc = kwds.get('name')

        if ishome:
            self.home = self
            KeyNode.homenode = self
        self.key = key

        self.ishome = ishome
        self.children = children
Пример #3
0
def move_mouse(mov_x, mov_y):
    def move(qtile):
        subprocess.call(
            ["xdotool", "mousemove_relative", "--sync", "--", str(mov_x), str(mov_y)]
        )

    return lazy.function(move)
Пример #4
0
def layout_change(layout):
    layouts = {
        "monadtall": 0,
        "max": 1,
        "stack": 2,
        "tile": 3,
    }
    layout_num = layouts[layout]
    return lazy.function(lambda q: q.current_group.use_layout(layout_num))
Пример #5
0
def get_keyboard_hotkey(mod):
    return [
        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], "l",
            lazy.layout.grow()),
        Key([mod], "h",
            lazy.layout.shrink()),
        Key([mod], "n",
            lazy.layout.normalize()),
        Key([mod], "o",
            lazy.layout.maximize()),
        Key([mod], "space",
            lazy.nextlayout()),
        Key([mod], "r",
            lazy.function(lambda qtile: DMenu().run(True))),
        Key([mod, "shift"], "r",
            lazy.function(lambda qtile: DMenu().run(False))),
        Key([mod, "control"], "r",
            lazy.spawncmd()),
        Key([mod], "equal",
            lazy.function(inc_volume)),
        Key([mod], "minus",
            lazy.function(dec_volume)),
        Key([mod], "Return",
            lazy.spawn("urxvt")),
        Key([mod], "e",
            lazy.spawn("emacs")),
        Key([mod, "shift"], "q",
            lazy.window.kill()),
        Key([mod, "shift", "control"], "r",
            lazy.restart()),
        Key([mod, "shift", "control"], "q",
            lazy.shutdown()),
        Key([mod, "shift"], "d",
            lazy.hide_show_bar()),
    ]
Пример #6
0
def main(qtile):
    from dgroups import DGroups, Match, simple_key_binder
    import re

    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))

    key = Key([], "F12", lazy.function(TermHack(qtile, 'h4x')))
    qtile.mapKey(key)

    key = Key(['shift'], "F12", lazy.function(to_urgent))
    qtile.mapKey(key)
Пример #7
0
    def init_keys(self):
        """
        Initialize key bindings
        """

        def move_window_to_screen(screen_num):
            """
            Move the selected window to a different screen
            """
            def inner(qtile):
                if qtile.currentWindow is not None:
                    qtile.currentWindow.togroup(qtile.screens[
                        self.screen_layout[screen_num]].group.name)

            return inner

        return [
            Key('M-j', lazy.layout.down()),
            Key('M-k', lazy.layout.up()),
            Key('M-h', lazy.layout.left()),
            Key('M-l', lazy.layout.right()),
            Key('M-S-j', lazy.layout.shuffle_down()),
            Key('M-S-k', lazy.layout.shuffle_up()),
            Key('M-S-h', lazy.layout.swap_left()),
            Key('M-S-l', lazy.layout.swap_right()),
            Key('A-<Tab>', lazy.next_layout()),
            Key('M-q', lazy.window.kill()),
            Key(
                'A-S-r',
                lazy.spawn(
                    "termite --name ranger -e '/usr/bin/tmux new -A -s ranger ranger'"
                )),
            Key('M-v', projectm_toggle),
            Key('M-e', lazy.spawn("termite")),
            Key('M-S-r', lazy.restart()),
            Key('M-b', lazy.hide_show_bar("all")),
            Key('M-S-q', lazy.shutdown()),
            Key('M-r', dm_run),
            Key('M-a', decrease_master_volume),
            Key('M-f', increase_master_volume),
            Key('M-s', decrease_mpd_volume),
            Key('M-d', increase_mpd_volume),
            Key('M-x', mpd_prev_song),
            Key('M-c', mpd_next_song),
            Key('M-<space>', mpd_toggle_play),
        ] + [
            Key('M-%s' % str(index + 1), lazy.to_screen(screen))
            for index, screen in enumerate(self.screen_layout)
        ] + [
            Key('M-S-%s' % str(i + 1), lazy.function(move_window_to_screen(i)))
            for i in self.screen_layout
        ]
Пример #8
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)
Пример #9
0
	# Switch between windows in current stack pane
	Key([mod], 'Tab', lazy.layout.down()),
	Key([mod, 'shift'], 'Tab', lazy.layout.up()),
	# Move windows up or down in current stack
	Key([mod, 'mod1'], 'Tab', lazy.layout.shuffle_down()),
	Key([mod, 'mod1', 'shift'], 'Tab', lazy.layout.shuffle_up()),
	# Switch window focus to other pane(s) of stack
	Key([mod, 'control'], 'Tab', lazy.layout.next()),
	Key([mod, 'control', 'shift'], 'Tab', lazy.layout.prev()),
	# Swap panes of split stack
	#Key([mod, 'shift'], 'space', lazy.layout.rotate()),
	# Change ratios
	Key([mod], 'k', lazy.layout.increase_ratio()),
	Key([mod], 'j', lazy.layout.decrease_ratio()),
	# kick to next/prev screen
	Key([mod], "o", lazy.function(kick_to_next_screen)),
	Key([mod, "shift"], "o", lazy.function(kick_to_next_screen, -1)),
	# Toggle between split and unsplit sides of stack.
	# Split = all windows displayed
	# Unsplit = 1 window displayed, like Max layout, but still with
	# multiple stack panes
	#Key([mod, 'shift'], 'Return', lazy.layout.toggle_split()),
	Key([mod], 'Return', lazy.spawn('x-terminal-emulator')),
	Key([mod], 'v', lazy.spawn('gvim')),
	Key([mod], 'l', lazy.spawn('xlock')),
	Key([], 'XF86Launch1', lazy.spawn('xlock')),
	Key([], 'XF86AudioMute', lazy.spawn('amixer -D pulse set Master toggle')),
	#Key([], 'XF86AudioMicMute', lazy.spawn('amixer -D pulse set Master toggle')),
	Key([], 'XF86AudioRaiseVolume', lazy.spawn('amixer -c 0 -q set Master 2dB+')),
	Key([], 'XF86AudioLowerVolume', lazy.spawn('amixer -c 0 -q set Master 2dB-')),
	# Switch groups
Пример #10
0
    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()),

    # start specific apps
    Key([mod], "n", lazy.function(app_or_group("www", "firefox"))),
    Key([mod], "m", lazy.function(app_or_group("music", "clementine"))),
    Key([mod], "c", lazy.function(app_or_group("io", "pidgin"))),
    Key([mod], "Return", lazy.spawn("xterm")),

    # Change the volume if our keyboard has keys
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 0 -q set Master 2dB+")),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c 0 -q set Master 2dB-")),
    Key([], "XF86AudioMute", lazy.spawn("amixer -c 0 -q set Master toggle")),
    Key([], "XF86AudioPlay", lazy.spawn("clementine --play-pause")),
    Key([], "XF86AudioNext", lazy.spawn("clementine --next")),
    Key([], "XF86AudioPrev", lazy.spawn("clementine --prev")),

    # also allow changing volume the old fashioned way
Пример #11
0
    'foreground': foreground,
}

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()),
    Key([mod], "w", lazy.to_screen(0)),
    Key([mod, "shift"], "w", lazy.function(move_window_to_screen(0))),
    Key([mod], "e", lazy.to_screen(1)),
    Key([mod, "shift"], "e", lazy.function(move_window_to_screen(1))),
    Key([mod], "Return", lazy.spawn("urxvt")),
    Key([mod], "p",
        lazy.spawn("dmenu_run -fn '%s:pixelsize=%d'" % (font, fontsize))),
    Key([mod, "shift"], "c", lazy.window.kill()),
    Key([mod], "q", lazy.restart()),
    Key([mod, "shift"], "q", lazy.shutdown()),
]

mouse = [
    Click([mod], "Button1", lazy.window.bring_to_front()),
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
Пример #12
0
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()),

    Key([mod], "w", lazy.to_screen(0)),
    Key([mod, "shift"], "w", lazy.function(move_window_to_screen(0))),
    Key([mod], "e", lazy.to_screen(1)),
    Key([mod, "shift"], "e", lazy.function(move_window_to_screen(1))),

    Key([mod], "Return", lazy.spawn("urxvt")),
    Key([mod], "p", lazy.spawn("dmenu_run -fn '%s:pixelsize=%d'" % (font, fontsize))),

    Key([mod, "shift"], "c", lazy.window.kill()),

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


mouse = [
    Click([mod], "Button1", lazy.window.bring_to_front()),
Пример #13
0
    Key([mod], "h",              lazy.layout.previous()),
    Key([mod], "l",              lazy.layout.next()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return",lazy.layout.toggle_split()),
    Key(["mod1"], "Tab",         lazy.next_layout()),
    Key([mod, "mod1"], "h",      lazy.to_screen(0)),
    Key([mod, "mod1"], "l",      lazy.to_screen(1)),
    Key([mod], "x",              lazy.window.kill()),
    Key([mod, "shift"], "l",          lazy.layout.swap_left()),

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

    # start specific apps
    Key([mod], "n",              lazy.function(app_or_group("www", "google-chrome"))),
    Key([mod], "m",              lazy.function(app_or_group("music", "clementine"))),
    Key([mod], "c",              lazy.function(app_or_group("io", "pidgin"))),
    Key([mod], "Return",         lazy.spawn("urxvt")),

    # Change the volume if our keyboard has keys
    Key(
        [], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c %d -q set Master 2dB+" % sound_card)
    ),
    Key(
        [], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c %d -q set Master 2dB-" % sound_card)
    ),
    Key(
        [], "XF86AudioMute",
Пример #14
0
        [mod, "shift"], "Return",
        lazy.layout.toggle_split()
    ),
    Key([mod], "Return", lazy.spawn("st")),
    Key([mod, "control"], "Return", lazy.spawn("vimprobable2")),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),

    Key([mod, "shift"], "c", lazy.window.kill()),

    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
    Key([mod], "p", lazy.spawncmd()),
    Key([mod], "i", lazy.function(winstash)),
    Key([mod, "shift"], "i", lazy.function(winunstash)),
]

groups = [Group(i) for i in "1234567890"]

for i in groups:
    # mod1 + letter of group = switch to group
    keys.append(
        Key([mod], i.name, lazy.group[i.name].toscreen())
    )

    # mod1 + shift + letter of group = switch to & move focused window to group
    keys.append(
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name))
    )
Пример #15
0
    Key([mod], "f", lazy.window.toggle_floating()),
    Key([mod, "shift"], "r", lazy.restart()),
    Key([mod, "shift"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),

    # Applications
    Key([mod], "c", lazy.spawn("firefox")),
    Key([mod], "l", lazy.spawn("clementine")),
    Key([mod], "Return", lazy.spawn("alacritty")),
    # Key([mod], "i", lazy.spawn("ipython qtconsole --profile labwork")),
    Key([mod], "i", lazy.spawn("jupyter qtconsole")),
    Key([mod, "shift"], "l", lazy.spawn("xscreensaver-command -lock")),
    Key([], "Print", lazy.spawn("scrot")),

    # Multimedia keys
    Key([], "XF86Display", lazy.function(lambda q: resize(toggle=True))),
    Key([mod], "s", lazy.function(lambda q: resize())),
    Key([mod, "shift"], "s", lazy.function(lambda q: resize(clone=True))),
    Key([], "XF86AudioPlay", lazy.spawn("clementine --play-pause")),
    Key([], "XF86AudioNext", lazy.spawn("clementine --next")),
    Key([], "XF86AudioPrev", lazy.spawn("clementine --prev")),
    Key([], "XF86AudioMute", lazy.widget["volume"].toggle()),
    Key([], "XF86AudioLowerVolume", lazy.widget["volume"].volume_down()),
    Key([], "XF86AudioRaiseVolume", lazy.widget["volume"].volume_up()),
    # Key([], "XF86MicMute", lazy.spawn("/home/sean/.qtile/volume.sh mic")),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
Пример #16
0
    # No mute key @notebook
    # Key(["shift"], "XF86AudioMute",
    Key(
        [mod],
        "p",
        # lazy.function(lambda q: fipc_jango("pause"))),
        lazy.spawn("mpc toggle")),

    # replace qtile with awesome, only to test stuff
    Key([mod, "control"], "a", lazy.execute("/usr/bin/awesome",
                                            ("awesome", ))),
    # restart qtile
    Key([mod, "control"], "r", lazy.restart()),

    # fast switches
    Key([mod], "t", lazy.function(switch_to("Gajim"))),
    Key([], "F12", lazy.function(SwapGroup('h4x'))),
    Key(['shift'], "F12", lazy.function(to_urgent)),
]

#   Floating Drag
# ------------------

mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([mod],
         "Button3",
         lazy.window.set_size_floating(),
Пример #17
0
        qtile.current_window.togroup(group)


def switch_screens(qtile):
    i = qtile.screens.index(qtile.current_screen)
    group = qtile.screens[i - 1].group
    qtile.current_screen.set_group(group)


# Define keybinds
keys = [
    EzKey(k[0], *k[1:]) for k in [

        # ------ Movement ------ #
        # Navigate between windows
        ("M-h", lazy.function(left)),
        ("M-j", lazy.function(down)),
        ("M-k", lazy.function(up)),
        ("M-l", lazy.function(right)),
        # Switch windows
        ("M-S-<space>", lazy.function(switch_screens)),
        # Switch focus between two screens
        ("M-<period>", lazy.next_screen()),
        ("M-<comma>", lazy.prev_screen()),
        ("M-S-<period>", lazy.function(window_to_next_screen)),
        ("M-S-<comma>", lazy.function(window_to_previous_screen)),
        # Move windows around
        ("M-S-h", lazy.layout.shuffle_left(), lazy.layout.swap_left()),
        ("M-S-j", lazy.layout.shuffle_down()),
        ("M-S-k", lazy.layout.shuffle_up()),
        ("M-S-l", lazy.layout.shuffle_right(), lazy.layout.swap_right()),
Пример #18
0
    Key(["mod1", "control"], "r", lazy.restart()),
    Key(["mod4"], "f", lazy.spawn("firefox")),
    Key(["mod4"], "d", lazy.spawn("deluge")),
]

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

keys.append(Key(["mod1"], "Left", lazy.group.prevgroup()))
keys.append(Key(["mod1"], "Right", lazy.group.nextgroup()))
keys.append(Key(["mod1", "shift"], "Left", lazy.function(toPrevGroup)))
keys.append(Key(["mod1", "shift"], "Right", lazy.function(toNextGroup)))



##########################################################################################

layouts = [
    layout.Max(),
    layout.Stack(stacks=2)
]

screens = [
    Screen(
        bottom = bar.Bar(
                    [
Пример #19
0

def app_or_group(group, app):
    """ Go to specified group if it exists. Otherwise, run the specified app.
    When used in conjunction with dgroups to auto-assign apps to specific
    groups, this can be used as a way to go to an app if it is already
    running. """
    def f(qtile):
        try:
            qtile.groupMap[group].cmd_toscreen()
        except KeyError:
            qtile.cmd_spawn(app)
    return f

keys = [
    Key([mod], "i", lazy.function(winstash)),
    Key([mod, "shift"], "i", lazy.function(winunstash)),
    # 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()),

    # I don't ever use floating, but sometimes it is handy to toggle to
    # floating for debugging, so I use the "out of band" mnemonic for this as
    # well.
    Key(["shift", "mod1"], "f",  lazy.window.toggle_floating()),

    Key([mod], "k",              lazy.layout.up()),
    Key([mod], "j",              lazy.layout.down()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
Пример #20
0
        debug("ERROR: %s" % e)

def fromExt(qtile):
    w = qtile.groupMap['ext'].currentWindow
    groupName = qtile.currentGroup.name
    w.cmd_togroup(groupName)

def toExt(qtile):
    w = qtile.currentGroup.currentWindow
    w.cmd_togroup('ext')

keys = [
    # Switch between windows in current stack pane
    Key(
        [mod], "k",
        lazy.function(fromExt)
    ),
    Key(
        [mod], "j",
        lazy.function(toExt)
    ),

    # Switch window focus to other pane(s) of stack
    Key(["mod1"], "Tab",lazy.layout.next()),
    Key([mod], "Right",lazy.layout.next()),
    Key([mod], "Left",lazy.layout.previous()),

    # Swap panes of split stack
    Key(
        [mod, "shift"], "space",
        lazy.layout.rotate()
Пример #21
0
                                    --hide-menubar \
                                    --hide-borders \
                                    --hide-toolbars")),

    # Toggle between different layouts as defined below
    Key([mod], "Tab",    lazy.nextlayout()),
    Key([mod], "w",      lazy.window.kill()),

    Key([mod, "control"], "r", lazy.restart()),
    Key([mod], "r", lazy.spawn("dmenu_run -fn 'DejaVu Sans Mono Book-14' -nb '#000000' -nf '#87FF03' -sb '#87FF03' -sf '#000000'")),

    # start specific apps
    Key(["mod4"], "o", lazy.spawn("opera")),
    Key(["mod4"], "f", lazy.spawn("firefox")),
    Key(["mod4"], "l", lazy.spawn("liferea")),
    Key([mod], "n", lazy.function(app_or_group("web", "firefox"))),
    Key([mod], "g", lazy.function(app_or_group("music", "gmusicbrowser"))),
    Key([mod], "c", lazy.function(app_or_group("chat", "pidgin"))),
    Key([mod], "m", lazy.function(app_or_group("mail", "thunderbird"))),
]

groups = [
    Group("a"),
    Group("s"),
    Group("d"),
    Group("i"),
    Group("o"),
    Group("p"),
]
for i in groups:
    # mod1 + letter of group = switch to group
Пример #22
0
    Key([mod, 'shift'], 'Return', lazy.layout.toggle_split()),

    Key([mod], '1',     lazy.to_screen(1)),
    Key([mod], '2',     lazy.to_screen(2)),


    Key([mod], 'Tab',   lazy.next_layout()),
    Key([mod], 'x',     lazy.window.kill()),
    Key([mod], 'r',     lazy.spawncmd()),

    Key([mod, 'control'], 'r', lazy.restart()),
    Key([mod, 'control'], 'q', lazy.shutdown()),

    # Screen
    Key([], 'F7', lazy.spawn('xset dpms force off')),
    Key([], 'XF86MonBrightnessUp',   lazy.function(backlight('inc'))),
    Key([], 'XF86MonBrightnessDown', lazy.function(backlight('dec'))),

    # Audio
    Key([], 'XF86AudioMute', lazy.spawn('ponymix toggle')),
    Key([], 'XF86AudioRaiseVolume', lazy.spawn('ponymix increase 5')),
    Key([], 'XF86AudioLowerVolume', lazy.spawn('ponymix decrease 5')),
    Key([], 'XF86AudioPlay', lazy.spawn(music_cmd + 'PlayPause')),
    Key([], 'XF86AudioNext', lazy.function(next_prev('Next'))),
    Key([], 'XF86AudioPrev', lazy.function(next_prev('Previous'))),

    # Apps
    Key([mod], 'Return', lazy.spawn(TERM_EMULATOR)),
    Key([mod],  'b',     lazy.spawn(BROWSER)),
    Key([mod],  'g',     lazy.spawn('steam')),
    Key([mod],  'n',     lazy.spawn('discord')),
Пример #23
0
 # Switch between windows in current stack pane
 Key([mod], 'Tab', lazy.layout.down()),
 Key([mod, 'shift'], 'Tab', lazy.layout.up()),
 # Move windows up or down in current stack
 Key([mod, 'mod1'], 'Tab', lazy.layout.shuffle_down()),
 Key([mod, 'mod1', 'shift'], 'Tab', lazy.layout.shuffle_up()),
 # Switch window focus to other pane(s) of stack
 Key([mod, 'control'], 'Tab', lazy.layout.next()),
 Key([mod, 'control', 'shift'], 'Tab', lazy.layout.prev()),
 # Swap panes of split stack
 #Key([mod, 'shift'], 'space', lazy.layout.rotate()),
 # Change ratios
 Key([mod], 'k', lazy.layout.increase_ratio()),
 Key([mod], 'j', lazy.layout.decrease_ratio()),
 # kick to next/prev screen
 Key([mod], "o", lazy.function(kick_to_next_screen)),
 Key([mod, "shift"], "o", lazy.function(kick_to_next_screen, -1)),
 # Toggle between split and unsplit sides of stack.
 # Split = all windows displayed
 # Unsplit = 1 window displayed, like Max layout, but still with
 # multiple stack panes
 #Key([mod, 'shift'], 'Return', lazy.layout.toggle_split()),
 Key([mod], 'Return', lazy.spawn('x-terminal-emulator')),
 Key([mod], 'v', lazy.spawn('gvim')),
 Key([mod], 'l', lazy.spawn('xlock')),
 Key([], 'XF86Launch1', lazy.spawn('xlock')),
 Key([], 'XF86AudioMute', lazy.spawn('amixer -D pulse set Master toggle')),
 #Key([], 'XF86AudioMicMute', lazy.spawn('amixer -D pulse set Master toggle')),
 Key([], 'XF86AudioRaiseVolume',
     lazy.spawn('amixer -c 0 -q set Master 2dB+')),
 Key([], 'XF86AudioLowerVolume',
Пример #24
0
    # Toggle between different layouts as defined below
    KeyNode([mod4], "space", [], lazy.next_layout()),

    # Restart or quit qtile
    KeyNode([mod4, "control"], "r", [], lazy.restart()),
    KeyNode([mod4, "control"], "q", [], lazy.shutdown()),

    # Launch a command
    KeyNode([mod4], "r", [], lazy.spawncmd()),

    # toggle visibiliy of above defined DropDown named "term"
    KeyNode([mod4], 'z', [], lazy.group['scratchpad'].dropdown_toggle('term')),

    # Lock the screensaver (password)
    KeyNode([mod4], "F12", [], lazy.function(lock)),

    # Change the volume if our keyboard has keys
    KeyNode([], "XF86AudioRaiseVolume", [],
            lazy.spawn("amixer -c 0 -q set Master 2dB+")),
    KeyNode([], "XF86AudioLowerVolume", [],
            lazy.spawn("amixer -c 0 -q set Master 2dB-")),
    KeyNode([], "XF86AudioMute", [],
            lazy.spawn("amixer -c 0 -q set Master toggle")),
)

# Set the home of the extra node
extra.sethome(home)
# set the main qtile keys variable to the children of the home node.
keys = home.children
Пример #25
0
    Key([mod], "space", lazy.layout.next()),

    # Swap panes of split stack
    Key([mod, "shift"], "space", lazy.layout.rotate()),

    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
    # Unsplit = 1 window displayed, like Max layout, but still with
    # multiple stack panes
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod, "shift"], "q", lazy.window.kill()),
    Key([mod, "shift"], "r", lazy.restart()),
    Key([mod, "shift"], "x", lazy.function(hide_show_bar))
]

groups = [Group(i) for i in "12345678"]

for i in groups:
    keys.extend([
        # mod1 + letter of group = switch to group
        Key([mod], i.name, lazy.group[i.name].toscreen()),

        # mod1 + shift + letter of group = switch to & move focused window to group
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name)),
    ])

layouts = [layout.Max(), layout.Stack(num_stacks=2)]
Пример #26
0
    ('M-w', lazy.window.kill()),
    ('M-C-q', lazy.shutdown()),
    ('M-C-h', lazy.layout.grow_left(), lazy.layout.decrease_ratio(),
     lazy.layout.grow_width(-30)),  # dvorak h
    ('M-C-t', lazy.layout.grow_down(), lazy.layout.decrease_nmaster(),
     lazy.layout.grow_height(-30)),  # dvorak j
    ('M-C-n', lazy.layout.grow_up(), lazy.layout.increase_nmaster(),
     lazy.layout.grow_height(30)),  # dvorak k
    ('M-C-s', lazy.layout.grow_right(), lazy.layout.increase_ratio(),
     lazy.layout.grow_width(30)),  # dvorak l

    # ('M-h', lazy.layout.left(), lazy.layout.previous()),  # h
    # ('M-t', lazy.layout.down()),  # j
    # ('M-n', lazy.layout.up()),  # k
    # ('M-s', lazy.layout.right(), lazy.layout.next()),  # l
    ('M-h', lazy.function(qtools.focus.left)),  # h
    ('M-t', lazy.function(qtools.focus.down)),  # j
    ('M-n', lazy.function(qtools.focus.up)),  # k
    ('M-s', lazy.function(qtools.focus.right)),  # l
    ('M-S-h', lazy.layout.move_left(), lazy.layout.shuffle_left()),  # h
    ('M-S-t', lazy.layout.move_down(), lazy.layout.shuffle_down()),  # j
    ('M-S-n', lazy.layout.move_up(), lazy.layout.shuffle_up()),  # k
    ('M-S-s', lazy.layout.move_right(), lazy.layout.shuffle_right()),  # l
    ('M-A-h', lazy.layout.integrate_left(), lazy.layout.flip_left()),  # h
    ('M-A-t', lazy.layout.integrate_down(), lazy.layout.flip_down()),  # j
    ('M-A-n', lazy.layout.integrate_up(), lazy.layout.flip_up()),  # k
    ('M-A-s', lazy.layout.integrate_right(), lazy.layout.flip_right()),  # l
    ('M-y', lazy.layout.mode_horizontal()),
    ('M-p', lazy.layout.mode_vertical()),
    ('M-C-y', lazy.layout.mode_horizontal_split()),
    ('M-C-p', lazy.layout.mode_vertical_split()),
Пример #27
0
    Key([mod, 'control'], 'j', lazy.layout.shuffle_up()),
    Key([mod, 'shift'], 'h', lazy.layout.client_to_previous()),
    Key([mod, 'shift'], 'l', lazy.layout.client_to_next()),
    Key([mod, 'shift'], 'space', lazy.layout.rotate()),
    Key([mod, 'shift'], 'Return', lazy.layout.toggle_split()),
    Key([mod], '1', lazy.to_screen(1)),
    Key([mod], '2', lazy.to_screen(2)),
    Key([mod], 'Tab', lazy.next_layout()),
    Key([mod], 'x', lazy.window.kill()),
    Key([mod], 'r', lazy.spawncmd()),
    Key([mod, 'control'], 'r', lazy.restart()),
    Key([mod, 'control'], 'q', lazy.shutdown()),

    # Screen
    Key([], 'F7', lazy.spawn('xset dpms force off')),
    Key([], 'XF86MonBrightnessUp', lazy.function(backlight('inc'))),
    Key([], 'XF86MonBrightnessDown', lazy.function(backlight('dec'))),

    # Audio
    Key([], 'XF86AudioMute', lazy.spawn('ponymix toggle')),
    Key([], 'XF86AudioRaiseVolume', lazy.spawn('ponymix increase 5')),
    Key([], 'XF86AudioLowerVolume', lazy.spawn('ponymix decrease 5')),
    Key([], 'XF86AudioPlay', lazy.spawn(music_cmd + 'PlayPause')),
    Key([], 'XF86AudioNext', lazy.function(next_prev('Next'))),
    Key([], 'XF86AudioPrev', lazy.function(next_prev('Previous'))),

    # Apps
    Key([mod], 'Return', lazy.spawn(TERM_EMULATOR)),
    Key([mod], 'b', lazy.spawn(BROWSER)),
    Key([mod], 'g', lazy.spawn('steam')),
    Key([mod], 'n', lazy.spawn('discord')),
Пример #28
0

def command_tab(qtile):
    groups = itertools.chain.from_iterable(itertools.repeat(qtile.groups, 3))

    for group in groups:
        if group != qtile.currentGroup:
            continue
        else:
            group = next(group for group in groups if group.windows)
            qtile.currentScreen.setGroup(group)
            return


keys = [
    Key(["control"], "Tab", lazy.function(command_tab)),
    Key([SUPER], "Left", lazy.group.prevgroup()),
    Key([SUPER], "Right", lazy.group.nextgroup()),

    Key([], "XF86Launch5", lazy.spawn("urxvt")),
    Key([], "XF86Launch6", lazy.spawn(os.getenv("BROWSER"))),
    Key([], "XF86Launch7", lazy.spawn("gimp")),
    Key([], "XF86Launch8", lazy.spawn("vlc")),
    Key([], "XF86Launch9", lazy.spawn("vlc")),

    Key([], "XF86AudioLowerVolume", lazy.spawn("amixer sset Master 5%-")),
    Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer sset Master 5%+")),
    Key([], "XF86AudioMute", lazy.spawn("amixer sset Master toggle")),
    Key([], "XF86AudioPlay", lazy.spawn("ncmpcpp play")),

    Key([ALT, "shift"], "q", lazy.spawn("sudo shutdown -h 0")),
Пример #29
0
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod], "q", lazy.window.kill()),

    Key([mod, ctrl], "r", lazy.restart()),
    Key([mod, ctrl], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),

    # Screens
    Key([mod, ctrl], "1", lazy.to_screen(0)),
    Key([mod, ctrl], "2", lazy.to_screen(1))
]

system = [
    # Key([mod, shift], "x", lazy.function(lock_screen())),
    Key([mod, shift], "x", lazy.spawn("./.script/wm/lock")),
    Key([], 'XF86MonBrightnessUp', lazy.function(change_backlight('up'))),
    Key([], 'XF86MonBrightnessDown', lazy.function(change_backlight('down'))),
    Key([], 'XF86AudioRaiseVolume', lazy.spawn('pactl set-sink-volume 0 +5%')),
    Key([], 'XF86AudioLowerVolume', lazy.spawn('pactl set-sink-volume 0 -5%')),
    Key([], 'XF86AudioMute', lazy.spawn('pactl set-sink-mute 0 toggle'))
]

rofi = [
    Key([mod], "d", lazy.spawn("rofi -show drun")),
    Key([mod], "e", lazy.spawn("./.script/rofi/edit-config.sh"))
]

mpc = [
    Key([], 'XF86AudioPlay', lazy.spawn("mpc toggle")),
    Key([], 'XF86AudioNext', lazy.spawn("mpc next")),
    Key([], 'XF86AudioPrev', lazy.spawn("mpc prev"))
Пример #30
0
    Key([sup], "Down",           lazy.layout.shuffle_down()),
    Key([sup], "Up",             lazy.layout.shuffle_up()),

    Key([alt], "space",          lazy.nextlayout()),
    Key([alt, shift], "space",   lazy.layout.rotate()),
    Key([alt, shift], "Return",  lazy.layout.toggle_split()),
    Key([alt, "shift"], "k",     lazy.window.kill()),

    Key([alt], "x",              lazy.window.kill()),

    # interact with prompts
    Key([sup], "space",          lazy.spawn(Commands.dmenu)),
    Key([sup], "r",              lazy.spawncmd()),

    # start specific apps
    Key([sup], "e",      	 lazy.function(app_or_group("vm", "virtualbox"))),
    Key([sup], "j",      	 lazy.function(app_or_group("sns", "jd"))),
    Key([sup], "n",              lazy.function(app_or_group("www", "chromium"))),
    Key([sup], "s",              lazy.spawn(Commands.screenshot)),
    Key([sup], "v",              lazy.function(app_or_group("media", "vlc"))),
    Key([sup], "BackSpace",      lazy.function(app_or_group("editor", "emacs"))),
    Key([sup, 'control'], 'l',   lazy.spawn(Commands.lock_screen)),
    Key([alt], "Return",         lazy.spawn("urxvt")),

    # Change the volume if our keyboard has keys
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 0 -q set Master 2dB+")),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c 0 -q set Master 2dB-")),
    Key([], "XF86AudioMute",
        lazy.spawn("amixer -c 0 -q set Master toggle")),
Пример #31
0
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),

    Key([mod], "r", lazy.spawncmd()),

    # Short Key
    ## volume control
    Key([alt, "shift"], "k", lazy.spawn("amixer -c 0 -q set Master 2dB+")),
    Key([alt, "shift"], "j", lazy.spawn("amixer -c 0 -q set Master 2dB-")),
    Key([alt, "shift"], "h", lazy.spawn("amixer -c 0 -q set Master 100")),
    Key([alt, "shift"], "l", lazy.spawn("amixer -c 0 -q set Master 0")),
    ## lock screen
    Key([alt], "l", lazy.spawn("i3lock -i /home/arch/.archcfg/lock.png")),
    ## apps
    Key([alt], "b", lazy.spawn("google-chrome-stable")),
    Key([alt], "n", lazy.function(app_or_group("www", "google-chrome-stable"))),
    Key([alt], "f", lazy.spawn("xterm ranger")),
    Key([alt], "p", lazy.function(screenshot())),
    Key([alt, "shift"], "p", lazy.function(screenshot(selection=True))),
]

myMonadTall = layout.MonadTall(
    border_focus=l_gray,
    border_width=1
)

myColumns = layout.Columns(
    name="C",
    autosplit=False,
    border_focus=l_gray,
    border_width=1,
Пример #32
0
    Key([mod], "h",              lazy.layout.previous()),
    Key([mod], "l",              lazy.layout.next()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return",lazy.layout.toggle_split()),
    Key(["mod1"], "Tab",         lazy.next_layout()),
    Key([mod, "mod1"], "h",      lazy.to_screen(0)),
    Key([mod, "mod1"], "l",      lazy.to_screen(1)),
    Key([mod], "x",              lazy.window.kill()),
    Key([mod, "shift"], "l",          lazy.layout.swap_left()),

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

    # start specific apps
    Key([mod], "n",              lazy.function(app_or_group("www", "google-chrome"))),
    Key([mod], "m",              lazy.function(app_or_group("music", "clementine"))),
    Key([mod], "c",              lazy.function(app_or_group("io", "pidgin"))),
    Key([mod], "Return",         lazy.spawn("urxvt")),

    # Change the volume if our keyboard has keys
    Key(
        [], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c %d -q set Master 2dB+" % sound_card)
    ),
    Key(
        [], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c %d -q set Master 2dB-" % sound_card)
    ),
    Key(
        [], "XF86AudioMute",
Пример #33
0
    Key([], "XF86AudioPrev",
        # lazy.function(lambda q: fipc_jango("prev"))),
        lazy.spawn("mpc prev")),
    # No mute key @notebook
    # Key(["shift"], "XF86AudioMute",
    Key([mod], "p",
        # lazy.function(lambda q: fipc_jango("pause"))),
        lazy.spawn("mpc toggle")),

    # replace qtile with awesome, only to test stuff
    Key([mod, "control"], "a", lazy.execute("/usr/bin/awesome", ("awesome",))),
    # restart qtile
    Key([mod, "control"], "r", lazy.restart()),

    # fast switches
    Key([mod], "t", lazy.function(switch_to("Gajim"))),

    Key([], "F12", lazy.function(SwapGroup('h4x'))),
    Key(['shift'], "F12", lazy.function(to_urgent)),
]

#   Floating Drag
# ------------------

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())
]
Пример #34
0
    Key([mod], "h", lazy.layout.previous()),
    Key([mod], "l", lazy.layout.next()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    Key(["mod1"], "Tab", lazy.next_layout()),
    Key([mod, "mod1"], "h", lazy.to_screen(0)),
    Key([mod, "mod1"], "l", lazy.to_screen(1)),
    Key([mod], "x", lazy.window.kill()),
    Key([mod, "shift"], "l", lazy.layout.swap_left()),

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

    # start specific apps
    Key([mod], "n", lazy.function(app_or_group("www", "google-chrome"))),
    Key([mod], "m", lazy.function(app_or_group("music", "clementine"))),
    Key([mod], "c", lazy.function(app_or_group("io", "pidgin"))),
    Key([mod], "Return", lazy.spawn("urxvt")),

    # Change the volume if our keyboard has keys
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c %d -q set Master 2dB+" % sound_card)),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c %d -q set Master 2dB-" % sound_card)),
    Key([], "XF86AudioMute", lazy.spawn("amixer -D pulse set Master toggle")),
    Key([], "XF86AudioPlay", lazy.spawn("clementine --play-pause")),
    Key([], "XF86AudioNext", lazy.spawn("clementine --next")),
    Key([], "XF86AudioPrev", lazy.spawn("clementine --prev")),

    # also allow changing volume, tracks the old fashioned way
Пример #35
0
    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()),

    # start specific apps
    Key([mod], "n",              lazy.function(app_or_group("www", "firefox"))),
    Key([mod], "m",              lazy.function(app_or_group("music", "clementine"))),
    Key([mod], "c",              lazy.function(app_or_group("io", "pidgin"))),
    Key([mod], "Return",         lazy.spawn("xterm")),

    # Change the volume if our keyboard has keys
    Key(
        [], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 0 -q set Master 2dB+")
    ),
    Key(
        [], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c 0 -q set Master 2dB-")
    ),
    Key(
        [], "XF86AudioMute",
Пример #36
0
    Key([mod, "shift"], "p", lazy.spawn(tmux_session("pomodoro"))),

    # Run an application
    Key([mod], "d", lazy.spawn(App.launcher)),

    # Close application
    Key([mod, "shift"], "q", lazy.window.kill()),

    # Lock screen
    Key([mod], "9", lazy.spawn(lock_screen)),

    # Exit qtile
    Key([mod], "Escape", lazy.spawn(["powermenu", resolve("powermenu.conf")])),

    # Toggle bar
    Key([mod], "b", lazy.function(hide_bar)),

    # Move between groups
    Key([mod], "Tab", lazy.screen.toggle_group()),
    Key([mod], "n", lazy.screen.next_group()),
    Key([mod, "shift"], "n", lazy.screen.prev_group()),

    # Manage floating windows
    Key([mod], "f", lazy.window.toggle_floating()),
    Key([mod, "shift"], "f", lazy.window.bring_to_front()),
    Key([mod, ctrl], "f", lazy.function(float_to_stacked)),

    # Toggle between different layouts
    Key([mod], "t", set_layout(0)),  # set monadtall
    Key([mod], "u", set_layout(1)),  # set monadwide
    Key([mod], "m", set_layout(2)),  # set max
Пример #37
0
    Key([mod, "shift"], "r", lazy.restart()),
    Key([mod, "shift"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),

    # Applications
    Key([mod], "c", lazy.spawn("firefox")),
    Key([mod], "l", lazy.spawn("clementine")),
    Key([mod], "Return", lazy.spawn("urxvt")),
    # Key([mod], "i", lazy.spawn("ipython qtconsole --profile labwork")),
    Key([mod], "i", lazy.spawn("jupyter qtconsole")),
    Key([mod, "shift"], "l", lazy.spawn("xscreensaver-command -lock")),
    Key([], "Print", lazy.spawn("scrot")),

    # Multimedia keys
    Key([], "XF86Display", lazy.function(lambda q: resize(toggle=True))),
    Key([mod], "s", lazy.function(lambda q: resize())),
    Key([mod, "shift"], "s", lazy.function(lambda q: resize(clone=True))),
    Key([], "XF86AudioPlay", lazy.spawn("clementine --play-pause")),
    Key([], "XF86AudioNext", lazy.spawn("clementine --next")),
    Key([], "XF86AudioPrev", lazy.spawn("clementine --prev")),
    Key([], "XF86AudioMute", lazy.spawn("/home/sean/.config/qtile/volume.sh mute")),
    Key([], "XF86AudioLowerVolume", lazy.spawn("/home/sean/.config/qtile/volume.sh down")),
    Key([], "XF86AudioRaiseVolume", lazy.spawn("/home/sean/.config/qtile/volume.sh up"))
    # Key([], "XF86MicMute", lazy.spawn("/home/sean/.qtile/volume.sh mic")),
]

# Drag floating layouts.
mouse = [
    Drag([mod], "Button1", lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
Пример #38
0
    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:
    keys.append(Key(["mod1"], i.name, lazy.group[i.name].toscreen()))
    keys.append(Key(["mod1", "shift"], i.name, lazy.window.togroup(i.name)))

keys.append(Key(["mod1"], "Left", lazy.group.prevgroup()))
keys.append(Key(["mod1"], "Right", lazy.group.nextgroup()))
keys.append(Key(["mod1", "shift"], "Left", lazy.function(toPrevGroup)))
keys.append(Key(["mod1", "shift"], "Right", lazy.function(toNextGroup)))

##########################################################################################

layouts = [layout.Max(), layout.Stack(stacks=2)]

screens = [
    Screen(bottom=bar.Bar(
        [
            widget.GroupBox(),
            widget.WindowName(fontsize=12),
            widget.Systray(),
            widget.Clock('%I:%M %p', fontsize=12, padding=6),
        ],
        30,
Пример #39
0
    add_group(q)
    if win:
        win.togroup(q.currentGroup.name)


def stop_move(q):
    """ @type q: Qtile """
    window = q.currentWindow
    assert isinstance(window, Window)
    if window.in_move:
        window.disablefloating()
        del window.in_move
    q.unmapKey(stop_move_key)


stop_move_key = Key([], "space", lazy.function(stop_move))


def move_to_side_group(q, toLeft):
    """
        @rtype : None
        @type q: Qtile
        @type toLeft: bool
    """
    win = q.currentWindow
    if win is None:
        return
    screen = q.currentScreen
    assert isinstance(win, Window)
    assert isinstance(screen, Screen)
    # Add stop move functionality
Пример #40
0
alt = 'mod1'
terminal = 'kitty --single-instance'
browser = 'firefox'

keys = [
    # Switch between windows in current stack pane
    Key([mod], 'k', lazy.layout.down()),
    Key([mod], 'j', lazy.layout.up()),

    # Move windows up or down in current stack
    Key([mod, ctrl], 'k', lazy.layout.shuffle_down()),
    Key([mod, ctrl], 'j', lazy.layout.shuffle_up()),

    # Switch window focus to other pane(s) of stack
    Key([mod], 'space', lazy.next_layout()),
    Key([alt], 'Tab', lazy.function(user.PrevFocus())),
    Key([mod], 'u', lazy.function(user.to_urgent)),
    Key([mod, ctrl], 'q', lazy.window.kill()),
    Key([mod, ctrl], 'f', lazy.window.toggle_floating()),
    Key([mod], 'n', lazy.window.toggle_minimize()),
    Key([mod], 'f', lazy.window.toggle_fullscreen()),

    # Rofi keys
    Key([mod], 'a', lazy.spawn('''bash -c '~/.local/bin/addTask' ''')),
    Key([mod], 'd', lazy.spawn('rofi -show window')),
    Key([mod], 's', lazy.spawn('''bash -c '~/.local/bin/songChooser' ''')),
    Key([mod], 'g', lazy.spawn('rofi -show run')),
    Key([mod], 'r',
        lazy.spawn(
            'rofi -modi combi -show-icons -show combi -combi-modi drun,run')),
Пример #41
0
            return

        cur_win = qtile.currentWindow
        cur_layout = qtile.currentLayout
        cur_group = qtile.currentGroup

        cur_layout.remove(cur_win)
        cur_group.remove(cur_win)
        target_layout.group.add(cur_win)
        if isinstance(target_layout, layout.Stack):
            target_layout.cmd_client_to_stack(stack_idx)

    return callback

for i in range(1, 9):
    keys.append(Key([mod], str(i), lazy.function(switch_to_global_stack(i))))
    keys.append(Key([mod, "control"], str(i), lazy.function(send_to_global_stack(i))))

groups = [Group(i) for i in "asdf"]

for i in groups:
    # mod1 + letter of group = switch to group
    keys.append(
        Key([mod], i.name, lazy.group[i.name].toscreen())
    )

    # mod1 + control + letter of group = switch to & move focused window to group
    keys.append(
        Key([mod, "control"], i.name, lazy.window.togroup(i.name))
    )
Пример #42
0
    # scroll in any window with the same shortcut !
    Key([mod], "b", lazy.spawn("xdotool click 4")),
    Key([mod], "m", lazy.spawn("xdotool click 5")),

    # Toggle between different layouts as defined below
    Key([mod], "space", lazy.next_layout()),
    Key([mod], "Tab", lazy.screen.togglegroup()),
    Key([mod, "shift"], "c", lazy.window.kill()),

    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "p", lazy.spawncmd()),
]

for key, group, cmd in dynamic_tags:
    keys.append(Key([mod], key, lazy.function(app_or_group(group.name, cmd))))
    keys.append(Key([mod, "shift"], key, lazy.window.togroup(group.name)))

for key, i in tag_keys:
    # mod1 + letter of group = switch to group
    keys.append(
        Key([mod], key, lazy.group[i.name].toscreen())
    )

    # mod1 + shift + letter of group = switch to & move focused window to group
    keys.append(
        Key([mod, "shift"], key, lazy.window.togroup(i.name))
    )

class MyTile(layout.Tile):
    def cmd_zoom(self):
Пример #43
0
    # Layout hotkeys
    Key([mod, "control"], "h", lazy.layout.shrink_main()),
    Key([mod, "control"], "l", lazy.layout.grow_main()),
    Key([mod, "control"], "j", lazy.layout.down()),
    Key([mod, "control"], "k", lazy.layout.up()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
    #Key([mod], "grave", lazy.screen.next_group(skip_empty=True)),
    #Key([mod], "Tab", lazy.screen.prev_group(skip_empty=True)),

    # Toggle between different layouts as defined below
    Key([mod], "m", lazy.prev_layout()),
    Key([mod, "shift"], "m", lazy.next_layout()),
    Key([mod], "w", lazy.window.kill()),
    Key([mod], "space",
        lazy.function(lambda qtile: qtile.cmd_hide_show_bar())),
    Key([mod, 'control'], "m",
        lazy.function(change_abstract_window_state, state=5)),
    Key([mod, 'control'], "n", lazy.window.resize_floating(0, 69)),
    Key([mod, 'shift'], "n", lazy.window.move_floating(-1, -69)),
    # Lazy functions do not capture variables so passing lambda instead.
    Key([mod, 'control'], "w",
        lazy.function(lambda qtile: toggle_work_hours_widget(
            work_start_time, work_hours_widget))),

    #    Key([mod, "control"], "r", lazy.restart()),
    #Key([mod, "control"], "q", lazy.function(shutdown)),
    #Key([], 'F11', lazy.group['scratchpad'].dropdown_toggle('term')),
    #Key([], 'F12', lazy.group['scratchpad'].dropdown_toggle('qshell')),
]
Пример #44
0
    # Programs
    Key([mod], "w", lazy.spawn(browser)),
    Key([mod], "e", lazy.spawn(filemgr)),
    Key([alt, control], "c", lazy.spawn(editor_gui)),
    Key([mod], "t", lazy.spawn(terminal)),

    # Brightness
    Key([], "XF86MonBrightnessUp", lazy.spawn(Commands.brightness_up)),
    Key([], "XF86MonBrightnessDown", lazy.spawn(Commands.brightness_down)),

    # Media
    Key([], "XF86AudioRaiseVolume", lazy.spawn(Commands.volume_up)),
    Key([], "XF86AudioLowerVolume", lazy.spawn(Commands.volume_down)),
    Key([], "XF86AudioMute", lazy.spawn(Commands.volume_toggle)),
    Key([], "XF86AudioMicMute", lazy.spawn(Commands.mic_toggle)),
    Key([], 'Print', lazy.function(screenshot())),
    Key(['control'], 'Print', lazy.spawn('xfce4-screenshooter'))
]

# groups = [Group(i) for i in "asdfuiop"]
groups = [Group(i) for i in ''.join(map(str, [*range(1, 10)]))]

for i in groups:
    if num_screens == 1:
        switch = lazy.group[i.name].toscreen()
    else:
        switch = None

    keys.extend([
        # mod1 + letter of group = switch to group
        Key([mod], i.name, lazy.group[i.name].toscreen()),
Пример #45
0
def set_layout(index):
    return lazy.function(lambda qtile: qtile.cmd_to_layout_index(index))
Пример #46
0
def gen_keys():
    return expand_placeholders([
        #  Change window focus
        MultiKey([mod], MultiKey.left, lazy.function(focus_left)),
        MultiKey([mod], MultiKey.right, lazy.function(focus_right)),
        MultiKey([mod], MultiKey.down, lazy.function(focus_down)),
        MultiKey([mod], MultiKey.up, lazy.function(focus_up)),

        # Swap windows
        MultiKey([mod, shift], MultiKey.left, lazy.layout.swap_left()),
        MultiKey([mod, shift], MultiKey.right, lazy.layout.swap_right()),
        MultiKey([mod, shift], MultiKey.down, lazy.layout.shuffle_down()),
        MultiKey([mod, shift], MultiKey.up, lazy.layout.shuffle_up()),

        # Layout sizes
        Key([mod], "i", lazy.function(shrink_main)),
        Key([mod], "o", lazy.function(grow_main)),
        Key([mod, shift], "i", lazy.layout.grow()),
        Key([mod, shift], "o", lazy.layout.shrink()),

        # win + tab
        Key([alt], "Tab", lazy.group.next_window()),
        Key([alt, shift], "Tab", lazy.group.prev_window()),

        #  Move window to group
        MultiKey([mod, ctrl, shift], MultiKey.left, lazy.function(move_to_left_group)),
        MultiKey([mod, ctrl, shift], MultiKey.right, lazy.function(move_to_right_group)),

        #  Change group
        MultiKey([mod, ctrl], MultiKey.left, lazy.function(to_left_group)),
        MultiKey([mod, ctrl], MultiKey.right, lazy.function(to_right_group)),
        Key([mod], 'BackSpace', lazy.function(to_prev_group)),

        #  Add/delete group
        Key([mod], space, lazy.function(add_group)),
        Key([mod, shift], space, lazy.function(move_to_new_group)),
        Key([mod, ctrl], 'w', lazy.function(close_group)),
        Key([mod], 'p', lazy.function(close_group)),            #duplicate

        #  Run program
        Key([mod], ret, lazy.spawn("mlterm")),
        Key([mod], "b", lazy.spawn("chromium")),
        Key([mod], "t", lazy.spawn("dolphin")),

        #  Window management
        Key([mod], "e", lazy.window.disable_floating()),
        Key([mod], "w", lazy.window.kill()),
        Key([alt], "F4", lazy.window.kill()),
        Key([mod], "m", lazy.window.toggle_maximize()),
        Key([mod], "f", lazy.window.toggle_maximize()),     #duplicate
        Key([mod], "n", lazy.window.toggle_minimize()),
        Key([mod], "u", lazy.function(unminimize)),

        #  Set layout
        # Key([mod], 's', lazy.group.setlayout('stack')),
        # Key([mod], 'a', lazy.group.setlayout('max')),
        # Key([mod], 'r', lazy.group.setlayout('monadtall')),

        #  Qtile
        Key([mod, shift], ret, lazy.spawncmd()),
        Key([mod, ctrl], "r", lazy.restart()),
    ])
Пример #47
0
            qtile.groups[len(qtile.groups) - 1].cmd_toscreen()

    return __inner


# TODO use mod+control+j(next screen) and k(prev screen) with shift to move the current window to screen
# TODO would be nice to have a display of the shortcuts like mod+s in awesomewm

keys = [
    # Switch to screen
    # Key([mod], "1", lazy.to_screen(0)),
    # Key([mod], "2", lazy.to_screen(1)),
    Key([mod, "control"], "j", lazy.next_screen()),
    Key([mod, "control"], "k", lazy.prev_screen()),
    Key([mod, "control", "shift"], "1",
        lazy.function(utils.move_window_to_screen(0))),
    Key([mod, "control", "shift"], "2",
        lazy.function(utils.move_window_to_screen(1))),

    # Switch between windows in current stack pane
    Key([mod], "h", lazy.layout.left()),
    Key([mod], "l", lazy.layout.right()),
    Key([mod], "j", lazy.layout.down()),
    Key([mod], "k", lazy.layout.up()),
    Key([mod, "shift"], "h", lazy.layout.swap_left()),
    Key([mod, "shift"], "l", lazy.layout.swap_right()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
    Key([mod], "space", lazy.layout.next()),
    Key([mod, "shift"], "space", lazy.layout.flip()),
Пример #48
0
def app_or_group(group, app):
    """ Go to specified group if it exists. Otherwise, run the specified app.
    When used in conjunction with dgroups to auto-assign apps to specific
    groups, this can be used as a way to go to an app if it is already
    running. """
    def f(qtile):
        try:
            qtile.groupMap[group].cmd_toscreen()
        except KeyError:
            qtile.cmd_spawn(app)

    return f


keys = [
    Key([mod], "i", lazy.function(winstash)),
    Key([mod, "shift"], "i", lazy.function(winunstash)),
    # 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()),

    # I don't ever use floating, but sometimes it is handy to toggle to
    # floating for debugging, so I use the "out of band" mnemonic for this as
    # well.
    Key(["shift", "mod1"], "f", lazy.window.toggle_floating()),
    Key([mod], "k", lazy.layout.up()),
    Key([mod], "j", lazy.layout.down()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
Пример #49
0

def focus_transset(w):
    #  os.system("transset -i " + str(get_win_id(w)) + ' 1')
    global last_window_id
    if last_window_id is not get_win_id(w):
        if last_window_id is not 0 and last_window_id not in no_transset_window_ids:
            #  os.system("transset -i " + str(last_window_id) + ' 0.75')
            pass
    last_window_id = get_win_id(w)
    print(no_transset_window_ids)


keys = [
    Key([mod], "h", lazy.layout.left(),
        lazy.function(lambda x: focus_transset(x.currentWindow))),
    Key([mod], "l", lazy.layout.right(),
        lazy.function(lambda x: focus_transset(x.currentWindow))),
    Key([mod], "j", lazy.group.next_window(),
        lazy.function(lambda x: focus_transset(x.currentWindow))),
    Key([mod], "k", lazy.group.prev_window(),
        lazy.function(lambda x: focus_transset(x.currentWindow))),
    Key([mod, shift], 't',
        lazy.function(
            lambda x: toggle_need_transset(get_win_id(x.currentWindow)))),
    Key([mod, shift], "h", lazy.layout.swap_left(),
        lazy.layout.shuffle_left()),
    Key([mod, shift], "l", lazy.layout.swap_right(),
        lazy.layout.shuffle_right()),
    Key([mod, shift], "j", lazy.layout.shuffle_down()),
    Key([mod, shift], "k", lazy.layout.shuffle_up()),
Пример #50
0
  # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod, "shift"], "q", lazy.window.kill()),

    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),

    # Screens?!?jedi=0, ?!?                                           (*args, *_***kwargs*_*) ?!?jedi?!?
    Key([mod, "control"], "1", lazy.to_screen(0)),
    Key([mod, "control"], "2", lazy.to_screen(1))
]

system = [
    Key([mod, "shift"], "x", lazy.function(lock_screen())),
    Key([], 'XF86MonBrightnessUp', lazy.function(change_backlight('up'))),
    Key([], 'XF86MonBrightnessDown', lazy.function(change_backlight('down'))),
    Key([], 'XF86AudioRaiseVolume', lazy.spawn('pactl set-sink-volume 0 +5%')),
    Key([], 'XF86AudioLowerVolume', lazy.spawn('pactl set-sink-volume 0 -5%')),
    Key([], 'XF86AudioMute', lazy.spawn('pactl set-sink-mute 0 toggle'))
]

rofi = [
    Key([mod], "d", lazy.spawn("rofi -show drun")),
]

mpc = [
    Key([], 'XF86AudioPlay', lazy.spawn("mpc toggle")),
    Key([], 'XF86AudioNext', lazy.spawn("mpc next")),
    Key([], 'XF86AudioPrev', lazy.spawn("mpc prev"))
Пример #51
0
        "org.freedesktop.PowerManagement.Suspend")),

    # move to
    Key([mod], "g", lazy.togroup()),

    Key([mod], "q", lazy.findwindow()),

    # Sound and Mpd
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer sset Master 5%+")),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer sset Master 5%-")),
    Key([], "XF86AudioMute",
        lazy.spawn("amixer sset Master toggle")),
    Key(["shift"], "XF86AudioRaiseVolume",
        lazy.function(lambda q: fipc_jango("next"))),
    Key(["shift"], "XF86AudioLowerVolume",
        lazy.spawn("mpc prev")),
    # No mute key @notebook
    #Key(["shift"], "XF86AudioMute",
    Key([mod], "p",
        lazy.function(lambda q: fipc_jango("pause"))),

    # replace qtile with awesome, only to test stuff
    Key([mod, "control"], "a", lazy.execute("/usr/bin/awesome", ("awesome",))),
    # restart qtile
    Key([mod, "control"], "r", lazy.restart()),

    # fast switches
    Key([mod], "t", lazy.function(switch_to("Gajim"))),
Пример #52
0
        )),

    # Media hotkeys
    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')),

    #dmenu
    Key([mod], 'm', lazy.spawn('xfce4-appfinder')),
    #Key([mod], 'm', lazy.spawn('dmenu_run -i -b -p ">>>" -fn "Open Sans-10" -nb "#000" -nf "#fff" -sb "#00BF32" -sf "#fff"')),
    #Key([mod], 'm', lazy.run_extension(extension.J4DmenuDesktop()))

    # screenshots
    Key([], 'Print', lazy.function(screenshot())),
    Key([mod], 'Print', lazy.spawn('deepin-screenshot'))
]

# ----------------------------
# --- Workspaces and Rooms ---
# ----------------------------

# The basic idea behind Workspaces and Rooms is to control
# DIFFERENT subsets of groups with the SAME hotkeys.
# So we can have multiple 'qwerasdf' rooms in a different workspaces.
#
# Qtile Groups are used behind the scenes, but their visibility
# is set dynamically.

Пример #53
0
def get_keys():
    keys = []

    ########################################################################
    index = 1
    for current_group in groups.get_groups():
        keys.append(Key([mod], str(index), lazy.function(go_to_group, current_group.name))) # Switch to another group
        keys.append(Key([mod, "shift"], str(index), lazy.window.togroup(current_group.name))) # Send current window to another group
        index += 1
    ########################################################################

    ########################################################################
    keys.append(Key([mod], "h", lazy.layout.left()))
    keys.append(Key([mod], "l", lazy.layout.right()))
    keys.append(Key([mod], "j", lazy.layout.down()))
    keys.append(Key([mod], "k", lazy.layout.up()))

    keys.append(Key([mod, "shift"], "h", lazy.layout.swap_left()))
    keys.append(Key([mod, "shift"], "l", lazy.layout.swap_right()))
    keys.append(Key([mod, "shift"], "j", lazy.layout.shuffle_down()))
    keys.append(Key([mod, "shift"], "k", lazy.layout.shuffle_up()))

    keys.append(Key([mod], "i", lazy.layout.grow()))
    keys.append(Key([mod], "m", lazy.layout.shrink()))
    #keys.append(Key([mod], "m", lazy.layout.maximize())) # Toggle a window between minimum and maximum sizes
    keys.append(Key([mod], "n", lazy.layout.normalize()))
    keys.append(Key([mod], "o", lazy.layout.maximize()))
    #keys.append(Key([mod, "shift"], "space", lazy.layout.flip()))
    keys.append(Key([mod, "shift"], "space", lazy.layout.flip()))
    keys.append(Key([mod1], "Tab", lazy.layout.next(), desc="Move window focus to other window"))

    #keys.append(Key([mod, "shift"], "space", lazy.function(switch_screens)))

   # # Switch between windows
   # keys.append(Key([mod], "h", lazy.layout.left(), desc="Move focus to left"))
   # keys.append(Key([mod], "l", lazy.layout.right(), desc="Move focus to right"))
   # keys.append(Key([mod], "j", lazy.layout.down(), desc="Move focus down"))
   # keys.append(Key([mod], "k", lazy.layout.up(), desc="Move focus up"))
   # keys.append(Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window"))

   # # Move windows between left/right columns or move up/down in current stack.
   # # Moving out of range in Columns layout will create new column.
   # keys.append(Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left"))
   # keys.append(Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window to the right"))
   # keys.append(Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"))
   # keys.append(Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"))

   # # Grow windows. If current window is on the edge of screen and direction
   # # will be to screen edge - window would shrink.

   # keys.append(Key([mod, "control"], "h", lazy.function(grow("WWW")), desc="Grow window to the left"))
   # #keys.append(Key([mod, "control"], "h", lazy.layout.grow(), desc="Grow window to the left"))
   # #keys.append(Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"))
   # #keys.append(Key([mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"))
   # #keys.append(Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"))
   # #keys.append(Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"))

   # keys.append(Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"))
    # keys.append(Key([mod], "n", lazy.layout.normalize())) # Restore all windows to default size ratios 

    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
    # Unsplit = 1 window displayed, like Max layout, but still with
    # multiple stack panes
    keys.append(Key([mod, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack"))
    keys.append(Key([mod], "Return", lazy.spawn(myTerm), desc="Launch terminal"))

    # Toggle between different layouts as defined below
    keys.append(Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"))
    keys.append(Key([mod], "w", lazy.window.kill(), desc="Kill focused window"))

    keys.append(Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"))
    keys.append(Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"))
    keys.append(Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"))
    ########################################################################


    keys.append(Key(["control", "mod1"], "l", lazy.spawn("light-locker-command -l")))
    ########################################################################

    # Increase number in master pane (Tile)), # Grow size of current window (XmonadTall)
    # keys.append(Key([mod, "shift"], "l", lazy.layout.grow(), lazy.layout.increase_nmaster()))

    # Shrink size of current window (XmonadTall), # Decrease number in master pane (Tile)
    #keys.append(Key([mod, "shift"], "h", lazy.layout.shrink(), lazy.layout.decrease_nmaster()))

    #keys.append(Key([mod, "shift"], "Left", window_to_prev_group)) # Move window to workspace to the left
    #keys.append(Key([mod, "shift"], "Right", window_to_next_group)) # Move window to workspace to the right
    #keys.append(Key([mod, "shift"], "KP_Enter", lazy.window.toggle_floating())) # Toggle floating

    # Swap panes of split stack (Stack), # Switch which side main pane occupies (XmonadTall)
    #keys.append(Key([mod, "shift"], "space", lazy.layout.rotate(), lazy.layout.flip()))
    ########################################################################
    # Stack controls
    #keys.append(Key([mod], "space", lazy.layout.next())) # Switch window focus to other pane(s) of stack
    #keys.append(Key([mod, "control"], "Return", lazy.layout.toggle_split())) # Toggle between split and unsplit sides of stack
    #keys.append(Key([mod], "Tab", lazy.next_layout())) # Toggle through layouts
    #keys.append(Key([mod, "shift"], "c", lazy.window.kill())) # Kill active window
    # keys.append(Key([mod], "w", lazy.to_screen(2))) # Keyboard focus screen(0)
    # keys.append(Key([mod], "e", lazy.to_screen(0))) # Keyboard focus screen(1)
    # keys.append(Key([mod], "r", lazy.to_screen(1))) # Keyboard focus screen(2)
    #keys.append(Key([mod, "control"], "k", lazy.layout.section_up())) # Move up a section in treetab
    #keys.append(Key([mod, "control"], "j", lazy.layout.section_down())) # Move down a section in treetab
    ########################################################################
    # GUI Apps
    #keys.append(Key([mod], "b", lazy.function(app_or_group, "WWW", "firefox")))
    keys.append(Key([mod], "b", lazy.function(app_or_group, "SYS", "firefox")))
    #keys.append(Key([mod], "b", lazy.function(app_or_group("WWW", "firefox"))))
    #keys.append(Key([mod], "f", lazy.spawn("pcmanfm")))
    #keys.append(Key([mod], "g", lazy.spawn("geany")))
    ################################################################################
    return keys
Пример #54
0
    # multiple stack panes
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    Key([mod, "control"], "x", lazy.spawn("xkill")),
    # probably the -B option will need i3lock-color package

    # Key([mod, "control"], "z", lazy.spawn("killall vmg; sudo optirun vmg")),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod, "shift"], "Tab", lazy.prev_layout()),
    Key([mod], "q", lazy.window.kill()),
    Key([mod, 'shift'], "q", kill_all_windows()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
    Key([mod], "F12", lazy.function(to_urgent)),
]

layouts = [
    layout.Max(),
    layout.Columns(fair=True,
                   margin=4 * scale_factor,
                   border_width=4 * scale_factor,
                   border_normal='d79921',
                   border_focus='d65d0e'),
    layout.Stack(num_stacks=2),
    layout.Matrix(),
    layout.xmonad.MonadTall()
]

groups = [
Пример #55
0
mod = 'mod4'
alt = 'mod1'

keys = [
    Key([mod], 'Return', lazy.spawn('gnome-terminal --hide-menubar')),
    Key([mod], 'b', lazy.spawn('google-chrome')),
    # Toggle between different layouts as defined below
    # Key([mod], "Tab", lazy.next_layout()),
    Key([mod], "w", lazy.window.kill()),

    # Switch between windows in current stack pane
    Key([alt], 'Tab', lazy.layout.down()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
    Key([], 'Caps_Lock', lazy.function(change_keyboard_layout())),
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 1 -q set Master 2dB+")),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c 1 -q set Master 2dB-")),
]

screens = [
    Screen(top=bar.Bar([
        widget.GroupBox(),
        widget.WindowName(),
        widget.TextBox('🔋'),
        widget.Battery(battery_name='BAT1'),
        widget.TextBox('🔈'),
        widget.Volume(cardid=1, device=None, update_interval=0.2),
        widget.Systray(icon_size=14),
Пример #56
0
    Key([mod], "space",
        lazy.nextlayout()),
    Key([mod, "shift"], "space",
        lazy.prevlayout()),
    Key([mod], "y",
        lazy.window.kill()),
    Key([mod], "t",
        lazy.window.disable_floating()),
    Key([mod, "shift"], "t",
        lazy.window.enable_floating()),
    Key([mod], "Left",
        lazy.screen.prevgroup()),
    Key([mod], "Right",
        lazy.screen.nextgroup()),
    Key(["control","shift"], "q", lazy.restart()),
    Key([mod], "m", lazy.function(focus_master)),
    Key([mod], "x", lazy.function(minimize)),
    Key([mod], "a", lazy.function(unminimise_all)),
    Key([mod], "Return", lazy.spawn(terminal_command))
]

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.disable_floating()),
    Click([mod], "Button4", lazy.layout.down()),
    Click([mod], "Button5", lazy.layout.up())
]