示例#1
0
def init_keys():
    keys = [
        Key([mod], "Left", lazy.screen.prevgroup()),
        Key([mod], "Right", lazy.screen.nextgroup()),
        Key([mod, "shift"], "Left", window_to_prev_group),
        Key([mod, "shift"], "Right", window_to_next_group),
        Key([mod], "Tab", lazy.group.next_window()),
        Key([mod, "shift"], "Tab", lazy.group.prev_window()),
        Key([mod], "space", lazy.nextlayout()),
        Key([mod, "shift"], "space", lazy.prevlayout()),
        Key([mod], "j", lazy.layout.up()),
        Key([mod], "k", lazy.layout.down()),
        Key([mod], "f", lazy.window.toggle_floating()),
        Key([mod], "r", lazy.spawncmd()),
        Key([mod], "Return", lazy.spawn(term)),
        Key([mod], "l", lazy.spawn(lock)),
        Key([mod, "shift"], "c", lazy.window.kill()),
        Key([mod, "shift"], "r", lazy.restart()),
        Key([mod, "shift"], "q", lazy.shutdown())
    ]
    if DEBUG:
        keys += [
            Key(["mod1"], "Tab", lazy.layout.next()),
            Key(["mod1", "shift"], "Tab", lazy.layout.previous())
        ]
    return keys
示例#2
0
def init_keys():
    keys = [Key([mod], "Left", lazy.screen.prevgroup()),
            Key([mod], "Right", lazy.screen.nextgroup()),

            Key([mod, "shift"], "Left", window_to_prev_group),
            Key([mod, "shift"], "Right", window_to_next_group),

            Key([mod], "Tab", lazy.group.next_window()),
            Key([mod, "shift"], "Tab", lazy.group.prev_window()),

            Key([mod], "space", lazy.nextlayout()),
            Key([mod, "shift"], "space", lazy.prevlayout()),

            Key([mod], "j", lazy.layout.up()),
            Key([mod], "k", lazy.layout.down()),
            Key([mod], "f", lazy.window.toggle_floating()),

            Key([mod], "r", lazy.spawncmd()),
            Key([mod], "Return", lazy.spawn(term)),
            Key([mod], "l", lazy.spawn(lock)),

            Key([mod, "shift"], "c", lazy.window.kill()),
            Key([mod, "shift"], "r", lazy.restart()),
            Key([mod, "shift"], "q", lazy.shutdown())]
    if DEBUG:
        keys += [Key(["mod1"], "Tab", lazy.layout.next()),
                 Key(["mod1", "shift"], "Tab", lazy.layout.previous())]
    return keys
示例#3
0
def init_keys():
    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()),

        # Switch window focus to other pane(s) of stack
        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()),
        Key([mod], "Return", lazy.spawn("termite")),

        # 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], "l", lazy.spawn("/usr/bin/light-locker-command -l")),
        Key([mod], "r", lazy.spawncmd()),
    ]
    return keys
示例#4
0
def restart_on_randr(qtile, ev):
    lazy.spawn(["autorandr", "--change"])
    subprocess.call(["autorandr", "--change"])
    subprocess.call(["setxkbmap", "us", "-variant", "colemak"])
    subprocess.call(["setxkbmap", "-option", "terminate:ctrl_alt_bksp"])
    subprocess.call(["setxkbmap", "-option", "ctrl:nocaps"])
    subprocess.call(["setxkbmap", "-option", "altwin:swap_lalt_win"])

    qtile.cmd_restart()
示例#5
0
def validate_and_restart(qtile):
    try:
        validate_config()
    except ConfigError as error:
        # adapt to fit your needs: here I pop a system notification with the error
        lazy.spawn(MY_TERM)
        subprocess.call(["notify-send", "-t", "10000", str(error)])
    else:
        qtile.cmd_restart()
示例#6
0
def is_jetbrains_welcome_window(window):
    wm_name = window.window.get_wm_name()

    lazy.spawn('chromium {}'.format(wm_name))

    if wm_name == 'Welcome to PyCharm':
        return True

    return False
示例#7
0
def init_keys():
    keys = [
        Key([mod], "Left", lazy.screen.prev_group(skip_managed=True)),
        Key([mod], "Right", lazy.screen.next_group(skip_managed=True)),

        Key([mod, "shift"], "Left", window_to_previous_column_or_group()),
        Key([mod, "shift"], "Right", window_to_next_column_or_group()),

        Key([mod, "control"], "Up", lazy.layout.grow_up()),
        Key([mod, "control"], "Down", lazy.layout.grow_down()),
        Key([mod, "control"], "Left", lazy.layout.grow_left()),
        Key([mod, "control"], "Right", lazy.layout.grow_right()),

        Key([mod, "mod1"], "Left", lazy.previous_screen()),
        Key([mod, "mod1"], "Right", lazy.next_screen()),

        Key([mod, "shift", "mod1"], "Left", window_to_previous_screen()),
        Key([mod, "shift", "mod1"], "Right", window_to_next_screen()),

        Key([mod], "t", switch_screens()),

        Key([mod], "Up", lazy.group.prev_window()),
        Key([mod], "Down", lazy.group.next_window()),

        Key([mod, "shift"], "Up", lazy.layout.shuffle_up()),
        Key([mod, "shift"], "Down", lazy.layout.shuffle_down()),

        Key([mod], "space", lazy.next_layout()),

        Key([mod], "f", lazy.window.toggle_floating()),

        Key([mod], "r", lazy.spawncmd()),
        Key([mod], "u", lazy.spawn(browser)),
        Key([mod], "Return", lazy.spawn(terminal)),
        Key([mod], "BackSpace", lazy.window.kill()),

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

        Key([], "Print", lazy.spawn("gnome-screenshot -i")),
        Key([], "Scroll_Lock", lazy.spawn(screenlocker)),
        Key([mod], "Delete", lazy.spawn("amixer set Master toggle")),
        Key([mod], "Prior", lazy.spawn("amixer set Master 5+")),
        Key([mod], "Next", lazy.spawn("amixer set Master 5-")),
        Key([mod], "Insert", lazy.spawn(HOME + ".local/bin/spotify-dbus playpause")),
        Key([mod], "End", lazy.spawn(HOME + ".local/bin/spotify-dbus next")),
        Key([mod], "Home", lazy.spawn(HOME + ".local/bin/spotify-dbus previous")),
    ]
    if DEBUG:
        keys += [
            Key([mod], "Tab", lazy.layout.next()),
            Key([mod, "shift"], "Tab", lazy.layout.previous()),
            Key([mod], "f", lazy.layout.flip()),
            Key([mod], "s", lazy.group["scratch"].dropdown_toggle("term"))
        ]
    return keys
示例#8
0
 def test_expand_placeholders(self):
     key = Key(['mod4'], 'c', lazy.spawn('chromium'))
     key2 = MultiKey(['mod4'], MultiKey.left, lazy.spawn('chromium'))
     keys_before = [key, key2]
     print keys_before
     keys = expand_placeholders(keys_before)
     print keys
     if len(keys) != 3:
         self.fail("lenght != 3")
     self.assertEqual(keys[1].commands, keys_before[1].commands)
示例#9
0
文件: config.py 项目: Jdaco/dotfiles
    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
        ]
示例#10
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
示例#11
0
def init_keys():
    keys = [
        Key([mod], "Left", lazy.screen.prevgroup()),
        Key([mod], "Right", lazy.screen.nextgroup()),
        Key([mod, "shift"], "Left", window_to_prev_group),
        Key([mod, "shift"], "Right", window_to_next_group),
        Key([mod], "Tab", lazy.group.next_window()),
        Key([mod, "shift"], "Tab", lazy.group.prev_window()),
        Key([mod], "space", lazy.nextlayout()),
        Key([mod, "shift"], "space", lazy.prevlayout()),
        Key([mod], "j", lazy.layout.up()),
        Key([mod], "k", lazy.layout.down()),
        Key([mod], "f", lazy.window.toggle_floating()),
        Key([mod], "r", lazy.spawncmd()),
        Key([mod], "Return", lazy.spawn(term)),
        Key([mod], "l", lazy.spawn(lock)),
        Key([mod, "shift"], "c", lazy.window.kill()),
        Key([mod, "shift"], "r", lazy.restart()),
        Key([mod, "shift"], "q", lazy.shutdown()),

        # My Own Shortcuts!
        Key([alt, "shift"], "e", lazy.spawn("nautilus")),
        Key([alt, "shift"], "w", lazy.spawn("firefox")),
        Key([alt, "shift"], "f", lazy.spawn("firefox")),
        Key([alt, "shift"], "s", lazy.spawn("subl")),
        Key([alt, "shift"], "l", lazy.spawn("wakeonlan 00:15:17:30:24:08")),
        Key([alt, "shift"], "t", lazy.spawn("terminology"))
    ]
    if DEBUG:
        keys += [
            Key(["mod1"], "Tab", lazy.layout.next()),
            Key(["mod1", "shift"], "Tab", lazy.layout.previous())
        ]
    return keys
示例#12
0
def init_keys(config):
    # Key bindings
    mod = config['mod']
    keys = [
        # WM control
        Key([mod, 'control'], 'r', lazy.restart()),
        Key([mod, 'control'], 'q', lazy.shutdown()),
        Key([mod], 'r', lazy.spawncmd()),
        Key([mod, 'shift'], 'c', lazy.window.kill()),

        # Applications
        Key([mod], 'Return', lazy.spawn(config['terminal'])),
        Key([mod], 'r', lazy.spawn(config['launcher'])),
        Key([mod], 'f', lazy.spawn(config['file_manager'])),
        Key([mod, 'shift'], 'l', lazy.spawn(config['lock'])),

        # Scratchpad
        Key([mod], 'g', lazy.group['scratchpad'].dropdown_toggle("terminal")),
        Key([mod], 'q', lazy.group['scratchpad'].dropdown_toggle("qshell")),
        Key([mod], 'Left', lazy.screen.prev_group()),
        Key([mod], 'Right', lazy.screen.next_group()),

        # Layout control
        Key([mod, 'control'], 'space', lazy.window.toggle_floating()),
        Key([mod], 'k', lazy.layout.up()),
        Key([mod], 'j', lazy.layout.down()),
        Key([mod, 'shift'], 'k', lazy.layout.shuffle_up()),
        Key([mod, 'shift'], 'j', lazy.layout.shuffle_down()),
        Key([mod, 'shift'], 'space', lazy.layout.flip()),
        Key([mod], 'space', lazy.next_layout()),
        Key([mod], 'n', lazy.layout.normalize()),
        Key([mod], 'm', lazy.layout.maximize()),
        Key([mod], 'l', lazy.layout.grow()),
        Key([mod], 'h', lazy.layout.shrink()),

        # Screen control
        Key([mod, 'control'], 'j', lazy.next_screen()),
        Key([mod, 'control'], 'k', lazy.prev_screen()),
    ]

    for i in range(1, 10):
        # mod + letter of group
        keys.append(Key([mod], str(i), lazy.group[str(i)].toscreen()))

        # mod + shift + leter of group = move window to group
        #keys.append(Key([mod, 'shift'], i.name, lazy.window.togroup(i.name)))
        keys.append(Key([mod, 'shift'], str(i), lazy.window.togroup(str(i))))

    return keys
示例#13
0
def make_spawners(base_mods, *entries):
    keys = []
    for entry in entries:
        key, command = entry[-2:]
        modifiers = base_mods + list(entry[:-2] if len(entry) > 2 else [])
        keys.append(Key(modifiers, key, lazy.spawn(command)))
    return keys
示例#14
0
def init_keys():
    keys = [
        Key([mod], "Left", lazy.screen.prev_group(skip_managed=True)),
        Key([mod], "Right", lazy.screen.next_group(skip_managed=True)),

        Key([mod, "shift"], "Left", window_to_prev_group()),
        Key([mod, "shift"], "Right", window_to_next_group()),

        Key([mod, "mod1"], "Left", lazy.prev_screen()),
        Key([mod, "mod1"], "Right", lazy.next_screen()),

        Key([mod, "shift", "mod1"], "Left", window_to_prev_screen()),
        Key([mod, "shift", "mod1"], "Right", window_to_next_screen()),

        Key([mod], "t", switch_screens()),

        Key([mod], "Up", lazy.group.next_window()),
        Key([mod], "Down", lazy.group.prev_window()),

        Key([mod], "space", lazy.next_layout()),

        Key([mod], "j", lazy.layout.up()),
        Key([mod], "k", lazy.layout.down()),

        Key([mod], "f", lazy.window.toggle_floating()),

        Key([mod], "r", lazy.spawncmd()),
        Key([mod], "u", lazy.spawn(browser)),
        Key([mod], "Return", lazy.spawn(terminal)),
        Key([mod], "BackSpace", lazy.window.kill()),

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

        Key([], "Print", lazy.spawn("scrot")),
        Key([], "Scroll_Lock", lazy.spawn(HOME + ".local/bin/i3lock -d")),
        Key([mod], "Delete", lazy.spawn("amixer set Master toggle")),
        Key([mod], "Prior", lazy.spawn("amixer set Master 5+")),
        Key([mod], "Next", lazy.spawn("amixer set Master 5-")),
        Key([mod], "Insert", lazy.spawn(HOME + ".local/bin/spotify-dbus playpause")),
        Key([mod], "End", lazy.spawn(HOME + ".local/bin/spotify-dbus next")),
        Key([mod], "Home", lazy.spawn(HOME + ".local/bin/spotify-dbus previous")),
    ]
    if DEBUG:
        keys += [Key(["mod1"], "Tab", lazy.layout.next()),
                 Key(["mod1", "shift"], "Tab", lazy.layout.previous())]
    return keys
示例#15
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()),
    ]
示例#16
0
class Commands:
    """Just a namespace for commands"""
    launch_console = lazy.spawn("dbus-launch gnome-terminal")
    volume_up = lazy.spawn(
        'sh -c "pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +2%"')
    volume_down = lazy.spawn(
        'sh -c "pactl set-sink-mute 0 false ; pactl set-sink-volume 0 -2%"')
    mute_toggle = lazy.spawn('pactl set-sink-mute 0 toggle')
    mic_toggle = lazy.spawn('pactl set-source-mute 1 toggle')
    monitor_brightness_up = lazy.spawn('light -A 10')
    monitor_brightness_down = lazy.spawn('light -U 10')
    lock_screen = lazy.spawn('slock')
示例#17
0
def init_keys():
    return [Key([mod], "Left", lazy.screen.prevgroup()),
            Key([mod], "Right", lazy.screen.nextgroup()),

            Key([mod, "shift"], "Left", window_to_prev_group),
            Key([mod, "shift"], "Right", window_to_next_group),

            Key([mod], "Tab", lazy.layout.previous()),
            Key([mod, "shift"], "Tab", lazy.layout.next()),

            Key([mod], "space", lazy.nextlayout()),
            Key([mod, "shift"], "space", lazy.prevlayout()),

            Key([mod], "j", lazy.layout.up()),
            Key([mod], "k", lazy.layout.down()),

            Key([mod], "r", lazy.spawncmd()),
            Key([mod, "shift"], "c", lazy.window.kill()),
            Key([mod], "Return", lazy.spawn(term)),
            Key([mod], "l", lazy.spawn(lock)),
            Key([mod, "control"], "r", lazy.restart())]
示例#18
0
 def set_keys(self):
     self._add_key('j', lazy.layout.up())
     self._add_key('k', lazy.layout.down())
     self._add_key('Tab', lazy.layout.next())
     self._add_key('space', lazy.layout.rotate(), extra_mod='shift')
     self._add_key('space', lazy.next_layout())
     self._add_key('f', lazy.window.toggle_floating())
     self._add_key('Right', lazy.screen.next_group())
     self._add_key('Left', lazy.screen.prev_group())
     self._add_key('w', lazy.window.kill())
     self._add_key('Return',  lazy.spawn(self.term))
     self._add_key('l', lazy.spawn('xscreensaver-command --lock'))
     self._add_key(
         'Print',
         lazy.spawn("scrot -e 'mv $f ~/pictures/ 2>/dev/null'"),
         no_mod=True
     )
     self._add_key('r', lazy.spawncmd())
     self._add_key('r', lazy.restart(), extra_mod='control')
     self._add_key('q', lazy.shutdown(), extra_mod='control')
     return self.keys
示例#19
0
def init_keys():
    keys = [
        Key([mod], "Left", lazy.screen.prev_group(skip_managed=True)),
        Key([mod], "Right", lazy.screen.next_group(skip_managed=True)),
        Key([mod, "shift"], "Left", window_to_prev_group()),
        Key([mod, "shift"], "Right", window_to_next_group()),
        Key([mod, "mod1"], "Left", lazy.prev_screen()),
        Key([mod, "mod1"], "Right", lazy.next_screen()),
        Key([mod, "shift", "mod1"], "Left", window_to_prev_screen()),
        Key([mod, "shift", "mod1"], "Right", window_to_next_screen()),
        Key([mod], "t", switch_screens()),
        Key([mod], "Up", lazy.group.next_window()),
        Key([mod], "Down", lazy.group.prev_window()),
        Key([mod], "space", lazy.next_layout()),
        Key([mod], "j", lazy.layout.up()),
        Key([mod], "k", lazy.layout.down()),
        Key([mod], "f", lazy.window.toggle_floating()),
        Key([mod], "r", lazy.spawncmd()),
        Key([mod], "u", lazy.spawn(browser)),
        Key([mod], "Return", lazy.spawn(terminal)),
        Key([mod], "BackSpace", lazy.window.kill()),
        Key([mod, "shift"], "r", lazy.restart()),
        Key([mod, "shift"], "q", lazy.shutdown()),
        Key([], "Print", lazy.spawn("scrot")),
        Key([], "Scroll_Lock", lazy.spawn(HOME + ".local/bin/i3lock -d")),
        Key([mod], "Delete", lazy.spawn("amixer set Master toggle")),
        Key([mod], "Prior", lazy.spawn("amixer set Master 5+")),
        Key([mod], "Next", lazy.spawn("amixer set Master 5-")),
        Key([mod], "Insert",
            lazy.spawn(HOME + ".local/bin/spotify-dbus playpause")),
        Key([mod], "End", lazy.spawn(HOME + ".local/bin/spotify-dbus next")),
        Key([mod], "Home",
            lazy.spawn(HOME + ".local/bin/spotify-dbus previous")),
    ]
    if DEBUG:
        keys += [
            Key(["mod1"], "Tab", lazy.layout.next()),
            Key(["mod1", "shift"], "Tab", lazy.layout.previous())
        ]
    return keys
示例#20
0
def show_shortcuts(qtile):
    qtile.widgets_map['info'].update('Hallo?')
    key_map = {"mod1": "alt", "mod4": "super"}
    shortcuts_path = "{0}/{1}".format(os.environ["HOME"], "qtile_shortcuts")
    shortcuts = open("{0}".format(shortcuts_path), "w")
    shortcuts.write("{0:30}| {1:50}\n".format("KEYS COMBINATION", "COMMAND"))
    shortcuts.write("{0:80}\n".format("=" * 80))
    for key in keys:
        key_comb = ""
        for modifier in key.modifiers:
            key_comb += key_map.get(modifier, modifier) + "+"
        key_comb += key.key
        shortcuts.write("{0:30}| ".format(key_comb))
        cmd_str = ""
        for command in key.commands:
            cmd_str += command.name + " "
            for arg in command.args:
                cmd_str += "{0} ".format(repr(arg))
        shortcuts.write("{0:50}\n".format(cmd_str))
        shortcuts.write("{0:80}\n".format("-" * 80))
    shortcuts.close()
    lazy.spawn("xterm -wf -e less {0}".format(shortcuts_path))
示例#21
0
def init_keys():
    keys = [
        # I only use bsp
        Key([mod], "h", lazy.layout.left()),
        Key([mod], "j", lazy.layout.down()),
        Key([mod], "k", lazy.layout.up()),
        Key([mod], "l", lazy.layout.right()),
        Key([mod, "shift"], "h", lazy.layout.shuffle_left()),
        Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
        Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
        Key([mod, "shift"], "l", lazy.layout.shuffle_right()),
        Key([mod, "mod1"], "h", lazy.layout.flip_left()),
        Key([mod, "mod1"], "j", lazy.layout.flip_down()),
        Key([mod, "mod1"], "k", lazy.layout.flip_up()),
        Key([mod, "mod1"], "l", lazy.layout.flip_right()),
        Key([mod, "control"], "h", lazy.layout.grow_left()),
        Key([mod, "control"], "j", lazy.layout.grow_down()),
        Key([mod, "control"], "k", lazy.layout.grow_up()),
        Key([mod, "control"], "l", lazy.layout.grow_right()),
        Key([mod, "shift"], "n", lazy.layout.normalize()),

        # utility commands
        Key([mod], "w", lazy.window.kill()),
        Key([mod, "control"], "r", lazy.restart()),
        Key([mod, "control"], "q", lazy.shutdown()),
        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")),

        # spawn commands
        Key([mod], "r", lazy.spawncmd()),
        Key([mod], "Return", lazy.spawn("st")),
        Key([mod], "b", lazy.spawn("brave")),
    ]
    return keys
示例#22
0
def xf86_keys(): return [
    Key([], 'XF86AudioMute', lazy.spawn('mute')),
    Key([], 'XF86AudioRaiseVolume',
        lazy.spawn('amixer -c 0 -q set Master 2dB+')),
    Key([], 'XF86AudioLowerVolume',
        lazy.spawn('amixer -c 0 -q set Master 2dB-')),
    Key([], 'XF86AudioPlay',
        lazy.spawn(util.spotify('play-pause'))),
    Key([], 'XF86AudioPrev',
        lazy.spawn(util.spotify('previous'))),
    Key([], 'XF86AudioNext',
        lazy.spawn(util.spotify('next'))),

    # backlight controls
    Key([], "XF86MonBrightnessUp", lazy.spawn("light -A 10")),
    Key([], "XF86MonBrightnessDown", lazy.spawn("light -U 10")),
]


def make_keys(base_mods, *entries):
示例#23
0
def init_keys():
    keys = [
        # Switch between windows in current stack pane
        Key([mod], "j", lazy.layout.down()),
        Key([mod], "k", lazy.layout.up()),
        # Move windows in current stack
        Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
        Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
        # Switch through the different layouts
        Key([mod, "control"], "j", lazy.next_layout()),
        Key([mod, "control"], "k", lazy.prev_layout()),

        # Maximize / minimize current window
        Key([mod], "m", lazy.window.toggle_maximize()),
        # Normalize all windows by restoring the default size ratios
        Key([mod], "n", lazy.layout.normalize()),
        # Toggle floating
        Key([mod, "shift"], "t", lazy.window.toggle_floating()),
        Key([mod, "shift"], "s", show_shortcuts),

        # Move current window between different groups
        Key([mod, "shift"], "h", window_to_previous_group()),
        Key([mod, "shift"], "l", window_to_next_group()),
        # Grow size of current window (XmonadTall)
        Key([mod, "control"], "h", lazy.layout.shrink(),
            lazy.layout.decrease_nmaster()),
        # Shrink size of current window (XmonadTall)
        Key([mod, "control"], "l", lazy.layout.grow(),
            lazy.layout.increase_nmaster()),

        # Start the configured terminal
        Key([mod], "Return", lazy.spawn(myterm)),
        # Kill active window
        Key([mod], "w", lazy.window.kill()),
        # Restart qtile / reload configuration
        Key([mod, "control"], "r", lazy.restart()),
        # Quit qtile
        Key([mod, "control"], "q", lazy.shutdown()),
        # Run a command; will open an input-field
        Key([mod], "r", lazy.spawncmd()),
    ]
    return keys
示例#24
0
def init_keys():
    keys = [Key([mod], "Left", lazy.screen.prevgroup()),
            Key([mod], "Right", lazy.screen.nextgroup()),

            Key([mod, "shift"], "Left", window_to_prev_group),
            Key([mod, "shift"], "Right", window_to_next_group),

            Key([mod], "Tab", lazy.group.next_window()),
            Key([mod, "shift"], "Tab", lazy.group.prev_window()),

            Key([mod], "space", lazy.nextlayout()),
            Key([mod, "shift"], "space", lazy.prevlayout()),

            Key([mod], "j", lazy.layout.up()),
            Key([mod], "k", lazy.layout.down()),
            Key([mod], "f", lazy.window.toggle_floating()),

            Key([mod], "r", lazy.spawncmd()),
            Key([mod], "Return", lazy.spawn(term)),
            Key([mod], "l", lazy.spawn(lock)),

            Key([mod, "shift"], "c", lazy.window.kill()),
            Key([mod, "shift"], "r", lazy.restart()),
            Key([mod, "shift"], "q", lazy.shutdown()),

            # My Own Shortcuts!
            Key([alt, "shift"], "e", lazy.spawn("nautilus")),
            Key([alt, "shift"], "w", lazy.spawn("firefox")),
            Key([alt, "shift"], "f", lazy.spawn("firefox")),
            Key([alt, "shift"], "s", lazy.spawn("subl")),

            Key([alt, "shift"], "l", lazy.spawn("wakeonlan 00:15:17:30:24:08")),

            Key([alt, "shift"], "t", lazy.spawn("terminology"))]
    if DEBUG:
        keys += [Key(["mod1"], "Tab", lazy.layout.next()),
                 Key(["mod1", "shift"], "Tab", lazy.layout.previous())]
    return keys
示例#25
0
文件: config.py 项目: imiric/dotfiles
def show_shortcuts():
    key_map = {"mod1": "alt", "mod4": "super"}
    shortcuts_path = "{0}/{1}".format(os.environ["HOME"], "qtile_shortcuts")
    shortcuts = open("{0}".format(shortcuts_path), 'w')
    shortcuts.write("{0:30}| {1:50}\n".format("KEYS COMBINATION", "COMMAND"))
    shortcuts.write("{0:80}\n".format("=" * 80))
    for key in keys:
        key_comb = ""
        for modifier in key.modifiers:
            key_comb += key_map.get(modifier, modifier) + "+"
        key_comb += key.key
        shortcuts.write("{0:30}| ".format(key_comb))
        cmd_str = ""
        for command in key.commands:
            cmd_str += command.name + " "
            for arg in command.args:
                cmd_str += "{0} ".format(repr(arg))
        shortcuts.write("{0:50}\n".format(cmd_str))
        shortcuts.write("{0:80}\n".format("-" * 80))
    shortcuts.close()
    return lazy.spawn("xterm -wf -e less {0}".format(shortcuts_path))
示例#26
0
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 = [
 # Window manager controls
     Key([alt, 'control'], 'r', lazy.restart()),
     Key([alt, 'control'], 'q', lazy.shutdown()),
     Key([alt], 'r', lazy.spawn('dmenu_run')),
     Key([alt], 'Return', lazy.spawn('urxvt')),
     Key([alt], 'w', lazy.window.kill()),
     Key([alt], 'Tab', lazy.layout.next()),
     Key([alt], 'Left', lazy.screen.prevgroup()),
     Key([alt], 'Right', lazy.screen.nextgroup()),
# Layout modification
     Key([alt, 'control'], 'space', lazy.window.toggle_floating()),
# Switch between windows in current stack pane
     Key([alt], "k", lazy.layout.down()),
     Key([alt], "j", lazy.layout.up()),
     Key([alt, "shift"], "k", lazy.layout.shuffle_down()),
     Key([alt, "shift"], "j", lazy.layout.shuffle_up()),
     Key([alt], "i", lazy.layout.grow()),
     Key([alt], "m", lazy.layout.shrink()),
     Key([alt], "n", lazy.layout.normalize()),  
示例#27
0
    Key([mod, "shift"], "f", lazy.window.toggle_fullscreen()),

    Key([mod], "space", lazy.nextlayout()),

    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),

    # add/remove layout parts
    Key([mod, "shift"], "v", lazy.layout.add()),
    Key([mod, "control"], "v", lazy.layout.remove()),

    # size
    Key([mod, "shift"], "Right", lazy.layout.increase_ratio()),
    Key([mod, "shift"], "Left", lazy.layout.decrease_ratio()),

    Key([mod], "w", lazy.window.kill()),
    Key([mod], "F2", lazy.spawn(
        "dmenu_run -p run -fn 'terminous-13' -nb '#202020' -nf '#ffffff'")),
    Key([mod], "r", lazy.spawncmd("Run:")),


    # imgbin/pastebin
    Key([mod], "s", lazy.spawn("imgurscropt all edit")),
    Key([mod, 'shift'], "s", lazy.spawn("imgurscropt window edit")),
    Key([mod], "p", lazy.spawn("paste_clipboard")),
    Key([mod, 'shift'], "p", lazy.spawn("paste_clipboard bash")),
    Key([mod], "z", lazy.spawn("scroting")),
    #Key([mod, 'shift'], "z", lazy.spawn("scroting window")),

    # suspend
    Key([mod, 'shift'], "z", lazy.spawn(
        "dbus-send --dest=org.freedesktop.PowerManagement "\
        "/org/freedesktop/PowerManagement "\
示例#28
0
文件: config.py 项目: yanganto/qtile
    # Switch window focus to other pane(s) of stack
    Key(['mod1'], "Tab", lazy.layout.next()),

    # Swap panes of split stack
    Key([mod], "Tab", 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()),

    # Utils
    # Key(['control'], "Escape", lazy.spawn('xterm -rv')),
    Key([mod], "Escape", lazy.spawn('terminology')),
    Key(['control'], "Escape", lazy.spawn('yakuake')),

    # Toggle between different layouts as defined below
    Key([mod], "space", lazy.next_layout()),
    Key(['mod1'], "q", lazy.window.kill()),
    Key(['control'], "q", lazy.window.kill()),

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

    # Function keys
    Key([], 'XF86MonBrightnessUp', lazy.spawn("xbacklight -inc 5")),
    Key([], 'XF86MonBrightnessDown', lazy.spawn("xbacklight -dec 5")),
    Key([], 'XF86AudioRaiseVolume', lazy.spawn("pamixer -i 5")),
示例#29
0
        lazy.layout.shuffle_up()
    ),
    # Key(
    #     [MOD], "space",
    #     lazy.layout.next()
    # ),
    # Key(
    #     [MOD, "shift"], "space",
    #     lazy.layout.rotate()
    # ),
    Key(
        [MOD, "shift"], "Return",
        lazy.layout.toggle_split()
    ),

    Key([MOD], "n",      lazy.spawn("firefox")),
    Key([MOD], "h",      lazy.to_screen(1)),
    Key([MOD], "l",      lazy.to_screen(0)),
    # ~/bin/x starts a terminal program
    #Key([MOD], "Return", lazy.spawn("~/bin/x")),
    Key([MOD], "Return", lazy.spawn("terminator -p tango")),
    #Key([MOD], "Tab",    lazy.nextlayout()),
    Key([MOD], "space",    lazy.nextlayout()),
    Key([MOD, 'shift'], "space",    lazy.prevlayout()),
    Key([MOD], "Tab",    lazy.group.next_window()),
    Key([MOD, 'shift'], "Tab",    lazy.group.prev_window()),
    Key([MOD, 'shift'], "c",      lazy.window.kill()),
    Key([MOD], "f",      lazy.window.toggle_floating()),
    Key([MOD], "m",      lazy.window.toggle_minimize()),
    Key([MOD], "x",      lazy.window.toggle_maximize()),
    Key([MOD], "u",      lazy.window.toggle_fullscreen()),
示例#30
0
    # Switch window focus to other pane(s) of stack
    Key(
        [mod], "space",
        lazy.layout.next()
    ),

    Key(
        [mod], "Return",
        lazy.layout.zoom()
    ),

    Key([mod], "apostrophe", lazy.to_screen(0)),
    Key([mod], "comma", lazy.to_screen(1)),
    Key([mod], "period", lazy.to_screen(2)),

    Key([mod], "t", lazy.spawn("termite")),
    Key([mod], "q", lazy.spawn('slock')),

    # click with the keyboard ... perfect with a trackpoint
    Key([mod], "g", lazy.spawn("xdotool click 1")),
    Key([mod], "c", lazy.spawn("xdotool click 2")),
    Key([mod], "r", lazy.spawn("xdotool click 3")),

    # 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()),
示例#31
0
    # Commands for MonadTall
    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],          "h",        lazy.layout.grow()),
    Key([mod],          "l",        lazy.layout.shrink()),
    Key([mod],          "n",        lazy.layout.normalize()),
    Key([mod],          "o",        lazy.layout.maximize()),
    Key([mod, shift],   "space",    lazy.layout.flip()),

    # Commands for Matrix
    Key([mod, shift],   "h",        lazy.layout.add()),
    Key([mod, shift],   "l",        lazy.layout.delete()),

    Key([mod],          "Return",   lazy.spawn(terminal)),
    Key([mod],          "y",        lazy.spawn("ydcv-notify.sh")),
    Key([mod],          "w",        lazy.spawn(wallpaper_cmd)),

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

    Key([mod, ctrl],    "r",        lazy.restart()),
    # Key([mod],          "r",        lazy.spawncmd()),
    Key([mod],          "r",        lazy.spawn("dmenu_run")),
    Key([mod, shift],   "q",        lazy.shutdown()),
    Key([mod],          "f",        lazy.window.toggle_fullscreen()),
    Key([mod, shift],   "f",        lazy.window.toggle_floating()),
    Key([mod],          "comma",    lazy.window.down_opacity()),
    Key([mod],          "period",   lazy.window.up_opacity()),
示例#32
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
示例#33
0
    # multiple stack panes
    Key([sup, "shift"], "Return",
        lazy.layout.toggle_split()
    ),

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

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

    #Key([alt], "F2", lazy.spawncmd("")),
    Key([alt], "F4", lazy.window.kill()),

	Key([sup],"t",lazy.spawn("urxvt")),
	Key([sup],"f",lazy.spawn("chromium")),
	Key([sup],"e",lazy.spawn("emacs")),
	Key([sup],"m",lazy.spawn("urxvt -name mocp -background black -foreground white -e mocp")),

	Key([],"F2",lazy.spawn("xbacklight -dec 10")),
	Key([],"F3",lazy.spawn("xbacklight -inc 10")),
	Key([],"F6",lazy.spawn("amixer -q set Master toggle")),
	Key([],"F7",lazy.spawn("amixer set Master 5%- unmute")),
	Key([],"F8",lazy.spawn("amixer set Master 5%+ unmute")),	
]

#matches
m_default = Match(wm_class=["Thunar|Deluge"],title=["MATLAB R013a"])
m_music   = Match(title=["mocp"])
m_browser = Match(wm_class=["Google-chrome-unstable|Firefox"])
示例#34
0
def init_keys():
    keys = [
        Key([mod], "Left", lazy.screen.prev_group(skip_managed=True)),
        Key([mod], "Right", lazy.screen.next_group(skip_managed=True)),
        Key([mod, "shift"], "Left", window_to_previous_column_or_group()),
        Key([mod, "shift"], "Right", window_to_next_column_or_group()),
        Key([mod, "control"], "Up", lazy.layout.grow_up()),
        Key([mod, "control"], "Down", lazy.layout.grow_down()),
        Key([mod, "control"], "Left", lazy.layout.grow_left()),
        Key([mod, "control"], "Right", lazy.layout.grow_right()),
        Key([mod, "mod1"], "Left", lazy.prev_screen()),
        Key([mod, "mod1"], "Right", lazy.next_screen()),
        Key([mod, "shift", "mod1"], "Left", window_to_previous_screen()),
        Key([mod, "shift", "mod1"], "Right", window_to_next_screen()),
        Key([mod], "t", switch_screens()),
        Key([mod], "Up", lazy.group.prev_window()),
        Key([mod], "Down", lazy.group.next_window()),
        Key([mod, "shift"], "Up", lazy.layout.shuffle_up()),
        Key([mod, "shift"], "Down", lazy.layout.shuffle_down()),
        Key([mod], "space", lazy.next_layout()),
        Key([mod], "f", lazy.window.toggle_floating()),
        Key([mod], "s", lazy.layout.toggle_split()),
        Key([mod], "r", lazy.spawncmd()),
        Key([mod], "u", lazy.spawn(browser)),
        Key([mod], "Return", lazy.spawn(terminal)),
        Key([mod], "BackSpace", lazy.window.kill()),
        Key([mod, "shift"], "r", lazy.restart()),
        Key([mod, "shift"], "q", lazy.shutdown()),
        Key([], "Print", lazy.spawn("gnome-screenshot -i")),
        Key([mod], "Print", lazy.spawn("gnome-screenshot -p")),
        Key([], "Scroll_Lock", lazy.spawn(screenlocker)),
        Key([mod], "Delete", lazy.spawn("amixer set Master toggle")),
        Key([mod], "Prior", lazy.spawn("amixer set Master 5+")),
        Key([mod], "Next", lazy.spawn("amixer set Master 5-")),
        Key([mod], "Insert", lazy.spawn("spotify-dbus playpause")),
        Key([mod], "End", lazy.spawn("spotify-dbus next")),
        Key([mod], "Home", lazy.spawn("spotify-dbus previous")),
    ]
    if DEBUG:
        keys += [
            Key([mod], "Tab", lazy.layout.next()),
            Key([mod, "shift"], "Tab", lazy.layout.previous()),
            Key([mod, "shift"], "f", lazy.layout.flip()),
            Key([mod, "shift"], "s",
                lazy.group["scratch"].dropdown_toggle("term"))
        ]
    return keys
示例#35
0
        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"], "n",      lazy.spawn("firefox")),
    Key(["mod1"], "h",      lazy.to_screen(1)),
    Key(["mod1"], "l",      lazy.to_screen(0)),
    # ~/bin/x starts a terminal program
    Key(["mod1"], "Return", lazy.spawn("~/bin/x")),
    Key(["mod1"], "Tab",    lazy.nextlayout()),
    Key(["mod1"], "w",      lazy.window.kill()),

    # The bindings below control Amarok, and my sound volume.
    Key(
        ["mod1", "shift"], "k",
        lazy.spawn("amixer -c 1 -q set Speaker 2dB+")
    ),
    Key(
        ["mod1", "shift"], "j",
        lazy.spawn("amixer -c 1 -q set Speaker 2dB-")
示例#36
0
文件: config.py 项目: bogobog/qtile
        lazy.layout.shrink()
    ),

    # Swap panes of split stack
    Key(
        [mod, "shift"], "Down",
        lazy.window.enable_minimize()
    ),

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

    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawn("dmenu_run -i -fn '-*-droid sans-medium-*-*-*-13-*-*-*-*-*-*-*' -nb '#737373' -nf '#000000'")),

    # lock screen
    Key([mod], "l", lazy.spawn( home + "/bin/qtile/lock.sh" ) ),

]

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

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
示例#37
0
xmodmap = os.path.expanduser('~/.Xmodmap')
if os.path.exists(xmodmap):
    call(['xmodmap', xmodmap])

mpc = 'mpc -h %s ' % mpd_host

mod = 'mod4'
liteblue = '0066FF'
litegreen = '00BB55'
keys = [
    Key([mod, "shift"], "Left", lazy.layout.decrease_ratio()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    Key([mod, "shift"], "Right", lazy.layout.increase_ratio()),
    Key([mod, "shift"], "Tab", lazy.layout.previous()),
    Key([mod, "shift"], "j", lazy.spawn("amixer -c 0 -q set Master 2dB-")),
    Key([mod, "shift"], "k", lazy.spawn("amixer -c 0 -q set Master 2dB+")),
    Key([mod, "shift"], "q", lazy.shutdown()),
    Key([mod, "shift"], "p", lazy.pause()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod], "Left", lazy.group.prevgroup()),
    Key([mod], "Right", lazy.group.nextgroup()),
    Key([mod], "Up", lazy.to_next_screen()),
    Key([mod], "Down", lazy.to_prev_screen()),
    Key([mod], "Tab", lazy.layout.next()),
    Key([mod], "f", lazy.window.toggle_floating()),
    Key([mod], "g", lazy.togroup()),
    Key([mod], "r", lazy.spawncmd()),
    Key([mod], "j", lazy.layout.up()),
    Key([mod], "k", lazy.layout.down()),
    Key([mod], "q", lazy.restart()),
示例#38
0
    # 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, "shift"], "k", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_up()),

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

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

    # Clementine Controls
    Key(["control", "shift"], "KP_Up", lazy.spawn("clementine --volume-up")),
    Key(["control", "shift"], "KP_Down",
        lazy.spawn("clementine --volume-down")),
    Key(["control", "shift"], "KP_Left", lazy.spawn("clementine --previous")),
    Key(["control", "shift"], "KP_Right", lazy.spawn("clementine --next")),
    Key(["control", "shift"], "KP_Begin",
        lazy.spawn("clementine --play-pause")),

    # 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, "control"], "t", lazy.spawn("xfce4-terminal")),
    Key([mod, "control"], "f", lazy.spawn("thunar")),
示例#39
0
    Key([mod], "h", lazy.layout.grow()),
    Key([mod], "l", lazy.layout.shrink()),
    Key([mod], "n", lazy.layout.reset()),

    # Switch window focus to other pane(s) of stack
    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()),
    Key([mod], "Return", lazy.spawn("alacritty")),
    Key(["control", ALT], "t", lazy.group['scpd'].dropdown_toggle('term')),
    Key([mod], "period", lazy.group['scpd'].dropdown_toggle('music')),
    Key([mod], "comma", lazy.group['scpd'].dropdown_toggle('calendar')),

    # 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.spawn(
            "rofi -show power-menu -modi power-menu:rofi-power-menu --no-symbols"
        )),
    Key([mod], "r", lazy.spawn('rofi -show drun')),
    Key([mod, "shift"], "r", lazy.spawn('rofi -show run')),
    # Sow Greenclip clipboard manager
示例#40
0
 'M-i':
 layout.grow(),
 'M-m':
 layout.shrink(),
 'M-n':
 layout.normalize(),
 'M-o':
 layout.maximize(),
 'M-S-<space>':
 layout.flip(),
 'M-<space>':
 lazy.window.toggle_floating(),
 'M-S-<Return>':
 lazy.window.toggle_split(),
 'M-<Return>':
 lazy.spawn('urxvt'),
 'M-q':
 lazy.window.kill(),
 'M-f':
 lazy.window.toggle_fullscreen(),
 # System
 'M-<Tab>':
 lazy.next_layout(),
 'M-S-q':
 lazy.window.kill(),
 'M-C-r':
 lazy.restart(),
 'M-C-q':
 lazy.shutdown(),
 # Launchers
 'M-d':
示例#41
0
def iWinSwap():
    @lazy.function
    def __inner(qtile):
        group = qtile.current_group
        group.cmd_next_window()
        window = qtile.current_window
        if window.floating:
            window.cmd_bring_to_front()

    return __inner


keys = [
    # Sound control
    Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute 0 toggle")),
    #Microphone control
    Key([], "XF86AudioMicMute", lazy.spawn("pactl set-source-mute 1 toggle")),
    Key([], "XF86WLAN", lazy.spawn("netTogg")),
    Key([], "XF86Tools",
        lazy.spawn('xdg-open /home/xiangchong/.config/qtile/config.py')),
    Key([win], "m", lazy.next_layout()),
    Key([win], "n", itoggFloat()),

    # Move windows in current stack
    Key([win, "shift"], "j", iSwindowJ()),
    Key([win, "shift"], "k", iSwindowK()),
    Key([win, "shift"], "h", iSwindowH()),
    Key([win, "shift"], "l", iSwindowL()),

    # Adjust size of windows
示例#42
0
    # Move windows up or down in current stack
    Key([mod, "control"], "k", lazy.layout.shuffle_down()),
    Key([mod, "control"], "j", lazy.layout.shuffle_up()),

    # Switch window focus to other pane(s) of stack
    # 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()),
    Key([mod], "Return", lazy.spawn("termite")),

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

    # Custom Keybinding
    Key([mod], "b", lazy.spawn("qutebrowser")),
    Key([mod], "d", lazy.spawn("dmenu_run")),
]

groups = [Group(i) for i in "123456789"]
示例#43
0
文件: config.py 项目: AlexJavor/qtile
# Not used
#def get_keycode():
#    keycode = subprocess.getoutput("xmodmap -pke | grep KP_1 | awk '{print $2}'")
#    return keycode

keys = [
    # Main key bindings
    Key([mod], "k", lazy.layout.down()),
    Key([mod], "j", lazy.layout.up()),
    Key([mod, "control"], "k", lazy.layout.shuffle_down()),
    Key([mod, "control"], "j", lazy.layout.shuffle_up()),
    Key([mod], "space", lazy.layout.next()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    Key([mod], "Return", lazy.spawn(my_terminal)),
    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()),

    # MonadTall recommaded key bindings
    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()),
示例#44
0
    # 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()
    ),
    Key([mod], "Return", lazy.spawn("xterm")),

    # 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, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
]

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

for i in groups:
    # mod1 + letter of group = switch to group
    keys.append(
示例#45
0
    # Swap panes of split stack
    Key(
        ["mod1", "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(
        ["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")),

    # Toggle between different layouts as defined below
    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"),
示例#46
0
文件: config.py 项目: Tritlo/dotfiles
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget

mod = "mod4"
spawns = [
    Key([mod, "shift"], "Return", lazy.spawn("gnome-terminal")),
    Key([mod, "shift"], "f", lazy.spawn("chromium-browser")),
]

keys = [
    # Switch between windows in current stack pane

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.nextlayout()),
    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], "h", lazy.layout.left()),
示例#47
0
    'color7': '#abb2bf',
    'color8': '#545862',
    'color9': '#e06c75',
    'color10': '#98c379',
    'color11': '#e5c07b',
    'color12': '#61afef',
    'color13': '#c678dd',
    'color14': '#56b6c2',
    'color15': '#c8ccd4'
}
font = 'Cantarell'
monofont = 'Inconsolata'

keys = [
    # The essentials
    Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'),
    Key([mod],
        "d",
        lazy.spawn(
            "dmenu_run -fn '{font}:pixelsize=13' -nb '{nb}' -nf '{nf}' -sb '{sb}' -sf '{sf}' -l 20 -p 'Run: '"
            .format(font=font,
                    nb=colors['color0'],
                    nf=colors['color7'],
                    sb=colors['color4'],
                    sf=colors['color0'])),
        desc='Run Launcher'),
    Key([mod], "f", lazy.spawn(myBrowser), desc='Browser'),
    Key([mod], "Tab", lazy.next_layout(), desc='Toggle through layouts'),
    Key([mod], "q", lazy.window.kill(), desc='Kill active window'),
    Key([mod, "shift"], "r", lazy.restart(), desc='Restart Qtile'),
    Key([mod, "shift"], "e", lazy.shutdown(), desc='Shutdown Qtile'),
示例#48
0
    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()),

    # move between groups
    Key([mod], "Left", go_to_prev_group()),
    Key([mod], "Right", go_to_next_group()),

    # 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, "control"], "Return", lazy.window.toggle_floating()),
    Key([mod], "Return", lazy.spawn(term)),

    # 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], "Scroll_Lock", lazy.spawn("i3lock -c 000000")),
    Key([mod], "slash", lazy.switchgroup()),

    # Key([mod], "r", lazy.spawncmd()),
    Key([mod], "r", lazy.spawn("rofi -show run")),

    # Pulse Audio controls
    Key([], "XF86AudioMute", lazy.spawn("amixer -D pulse sset Master toggle")),
    Key([], "XF86AudioLowerVolume",
示例#49
0
BLACK = "#1A1C1D"
RED = color_data['colors']['color1']
GREEN = color_data['colors']['color2']
YELLOW = color_data['colors']['color3']
BLUE = color_data['colors']['color4']
MAGENTA = color_data['colors']['color5']
CYAN = color_data['colors']['color6']
WHITE = color_data['colors']['color7']

keys = [
    # Switch between windows
    Key("M-h", lazy.layout.left()),
    Key("M-l", lazy.layout.right()),
    Key("M-j", lazy.layout.down()),
    Key("M-k", lazy.layout.up()),
    Key("M-t", lazy.spawn('kitty')),

    # Move windows
    Key("M-S-h", lazy.layout.shuffle_left()),
    Key("M-S-l", lazy.layout.shuffle_right()),
    Key("M-S-j", lazy.layout.shuffle_down()),
    Key("M-S-k", lazy.layout.shuffle_up()),

    # Grow windows
    Key("M-C-h", lazy.layout.grow_left()),
    Key("M-C-l", lazy.layout.grow_right()),
    Key("M-C-j", lazy.layout.grow_down()),
    Key("M-C-k", lazy.layout.grow_up()),

    # Flip windows
    Key("M-A-h", lazy.layout.flip_left()),
示例#50
0
                    ],
                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
        Key([mod, "shift"], "k",       lazy.layout.move_up()),
        Key([mod, "shift"], "j",       lazy.layout.move_down()),
示例#51
0
    Key([mod, 'control'], 'k', lazy.layout.shuffle_down()),
    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')),
示例#52
0
from libqtile import bar, hook, layout, widget
from libqtile.command import lazy
from libqtile.config import Click, Drag, Group, Key, Screen

wmname = 'qtile'
mod = 'mod4'

# Key bindings
keys = [
    # Window manager controls
    Key([mod, 'control'], 'r', lazy.restart()),
    Key([mod, 'control'], 'q', lazy.shutdown()),
    Key([mod], 'r', lazy.spawncmd()),
    Key([mod], 'Return', lazy.spawn('xterm')),
    Key([mod], 'w',      lazy.window.kill()),

    Key([mod], 'Tab', lazy.layout.next()),
    Key([mod], 'Left', lazy.screen.prevgroup()),
    Key([mod], 'Right', lazy.screen.nextgroup()),

    # Layout modification
    Key([mod, 'control'], 'space', lazy.window.toggle_floating()),

    # 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()),
示例#53
0
def autostart():
	home = os.path.expantuser('~')
	lazy.spawn('sakura -x .fig')
示例#54
0
    ),
    Key(
        [mod, "control"], "j",
        lazy.layout.shrink(),         # xmonad-tall
    ),

    # 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()    # stack
    ),
    # Shortcuts
    Key([mod], "Return", lazy.spawn("xterm")),
    Key([mod], "b", lazy.spawn("firefox")),
    Key([mod], "n", lazy.spawn("pcmanfm")),
    Key([mod], "r", lazy.spawncmd()),

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

    # Controls on session and clients
    Key([mod, "control"], "w", lazy.window.kill()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod, "control"], "l", lazy.spawn("slock")), # require suckless-tools
]

groups = [Group(i) for i in "asdfuiop"]
示例#55
0
    # 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, "control"], "Return",
        lazy.layout.toggle_split()
    ),
    Key([mod, "shift"], "Return", lazy.spawn("sakura")),

	Key([mod], "Tab", lazy.screen.togglegroup()),

    # Toggle between different layouts as defined below
    Key([mod], "l", 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, "shift"], "t", lazy.spawn("subl3")),

    Key([mod, "shift"], "w", lazy.spawn("vivaldi")),
	Key([mod, "shift"], "v", lazy.spawn("volume")),
示例#56
0
from typing import List  # noqa: F401

mod = 'mod4'
colors = {
    'black1': '000000',
    'black2': '515151',
    'white1': 'ffffff',
    'white2': 'cccccc',
    'cyan': '3e83d8',
    'blue': '7f70e7',
    'magenta': '9f65ed'
}

keys = [
    # Custom application keybinds
    Key([mod], 'w', lazy.spawn('firefox')),
    Key([mod], 'e', lazy.spawn('emacs')),
    Key([mod], 'r', lazy.spawn('rofi -show run')),
    Key([mod], 'c', lazy.spawn('code')),
    Key([mod], 'v', lazy.spawn('urxvt -e vifm')),
    Key([mod], 'g', lazy.spawn('gimp')),
    Key([mod], 'Return', lazy.spawn('urxvt')),

    # Window operation keybinds
    Key([mod], 'k', lazy.layout.down()),
    Key([mod], 'j', lazy.layout.up()),
    Key([mod, 'control'], 'k', lazy.layout.shuffle_down()),
    Key([mod, 'control'], 'j', lazy.layout.shuffle_up()),
    Key([mod, 'shift'], 'q', lazy.window.kill()),
    Key([mod], 'f', lazy.window.toggle_fullscreen()),
示例#57
0
文件: config.py 项目: ilex/dotfiles
from libqtile import bar, widget
from libqtile.command import lazy


def change_keyboard_layout():
    def callback(qtile):
        qtile.widgetMap.get('KeyboardLayout').next_keyboard()

    return callback


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-")),
示例#58
-1
文件: config.py 项目: Jdaco/dotfiles
 def init_keys(self):
     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-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", lazy.spawncmd()),
         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-v', projectm_toggle),
     ] + [
         Key('A-{}'.format(i), lazy.group[group.name].toscreen())
         for i, group in zip((1, 2, 3, 4, 9), self.groups)
     ] + [
         Key('A-S-{}'.format(i), lazy.window.togroup(group.name))
         for i, group in zip((1, 2, 3, 4, 9), self.groups)
     ]