Example #1
0
    def setup_monitors(action=None, device=None):
        """
Add 1 group per screen
"""

        if action == "change":
            # setup monitors with xrandr
            call("setup_screens")
            lazy.restart()

        nbr_screens = len(qtile.conn.pseudoscreens)
        for i in xrange(0, nbr_screens-1):
            groups.append(Group('h%sx' % (i+5), persist=False))
Example #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
Example #3
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
Example #4
0
def conf(groups=None, mod=None):
    keys = [
        Key([mod], "Up", lazy.group.next_window()),
        Key([mod], "Down", lazy.group.prev_window()),
        Key([mod], "Right", lazy.screen.next_group()),
        Key([mod], "Left", lazy.screen.prev_group()),
        Key([mod], "period", lazy.next_screen()),
        Key([mod], "comma", lazy.prev_screen()),
        Key([mod, "shift"], "Up", lazy.layout.increase_ratio()),
        Key([mod, "shift"], "Down", lazy.layout.decrease_ratio()),
        Key([mod], "equal", lazy.layout.increase_nmaster()),
        Key([mod], "minus", lazy.layout.decrease_nmaster()),
        Key([mod, "shift"], "Return", lazy.layout.shift()),
        Key([mod], "b", lazy.hide_show_bar()),
        Key([mod], "f", lazy.window.toggle_fullscreen()),
        Key([mod], "s", lazy.group.setlayout("max")),
        Key([mod], "t", lazy.group.setlayout("mastertile")),
        Key([mod], "space", lazy.next_layout()),
        Key([mod], "Tab", lazy.screen.togglegroup()),
        Key([mod], "c", lazy.window.kill()),
        Key([mod], "r", lazy.spawncmd()),
        Key([mod], "x", lazy.spawn("xautolock -locknow")),
        Key([mod], "Return", lazy.spawn("termite")),
        Key([], "XF86KbdBrightnessUp", lazy.spawn("kbdlight up 10")),
        Key([], "XF86KbdBrightnessDown", lazy.spawn("kbdlight down 10")),
        Key(["shift"], "XF86KbdBrightnessUp", lazy.spawn("kbdlight max")),
        Key(["shift"], "XF86KbdBrightnessDown", lazy.spawn("kbdlight set 0")),
        Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight +5")),
        Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -5")),
        Key(["shift"], "XF86MonBrightnessUp", lazy.spawn("xbacklight =100")),
        Key(["shift"], "XF86MonBrightnessDown", lazy.spawn("xbacklight =0")),
        Key([], "XF86AudioRaiseVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")),
        Key([], "XF86AudioLowerVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%")),
        Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ 1")),
        Key(["shift"], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ 0")),
        Key([], "XF86AudioNext", lazy.spawn("mpc next")),
        Key([], "XF86AudioPrev", lazy.spawn("mpc prev")),
        Key([], "XF86AudioPlay", lazy.spawn("mpc toggle")),
        Key([], "XF86AudioPause", lazy.spawn("mpc toggle")),
        # Key([], "XF86LaunchA", ),
        # Key([], "XF86LaunchB", ),
        Key([mod, "shift"], "q", lazy.restart()),
    ]

    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.toggle_floating()),
    ]

    for index, grp in enumerate(groups):
        keys.append(Key([mod], str(index + 1), lazy.group[grp.name].toscreen()))

        keys.append(Key([mod, "shift"], str(index + 1), lazy.window.togroup(grp.name)))

    return (keys, mouse)
Example #5
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
        ]
Example #6
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
Example #7
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()),
    ]
Example #8
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
Example #9
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())]
Example #10
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
Example #11
0
def init_const_keys():
    """For layMan key-switcher (WIP): non-layout, consistent keys"""
    keys = [
        # Switch window focus to other pane(s) of stack
        Key([mod], "Tab", lazy.layout.next()),
        Key([mod, shift], 'Tab', lazy.layout.previous()),

        # 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], 'w', lazy.window.toggle_minimize()),
        Key([mod, shift], 'w', lazy.window.toggle_minimize()),

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

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

        # Scrotter
        Key([mod, shift], 'a', lazy.spawn([
        	'scrot', '-q', '100',
        	'%Y%m%d.%H%M:%S_qtile.png',
            '-e', 'mv $f ~/Screenshots/',
        	])),
        Key([mod, shift], 'u', lazy.spawn([
        	'scrot', '-ubq', '100',
            '%Y%m%d.%H%M:%S_window.png',
            '-e', 'mv $f ~/Screenshots',
        	])),
        # TODO: grab mouse for this
        Key([mod, shift], 's', lazy.spawn([
        	'scrot', '-sq', '100',
            '%Y%m%d.%H%M:%S_selection.png',
            '-e', 'mv $f ~/Screenshots',
        	])),

        # Window Ops
        Key([mod], "x", lazy.window.kill()),
        Key([mod], "t", lazy.window.toggle_floating()),
        Key([mod, shift], "e", lazy.window.toggle_fullscreen()),
        Key([mod], "semicolon", lazy.spawn(TERMUX)),

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

        Key([mod], "slash", 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([], "XF86AudioNext",
            # lazy.function(lambda q: fipc_jango("next"))),
            lazy.spawn("mpc next")),
        Key([], "XF86AudioPrev",
            # lazy.function(lambda q: fipc_jango("prev"))),
            lazy.spawn("mpc prev")),
        # No mute key @notebook
        Key([shift], "XF86AudioMute"),

        # Key([], "F12", lazy.function(SwapGroup('h4x'))), #qtile-examples/roger/
        # Key(['shift'], "F12", lazy.function(to_urgent)), #qtile-examples/roger/
    ]
    keys.extend(init_groups_keys())
    return keys
Example #12
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()),
    Key([mod], "Return", lazy.spawn(myTerm)),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod], "q", lazy.window.kill()),
    Key([mod, "shift"], "r", lazy.restart()),
    Key([mod, "shift"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
    Key([mod], "d", lazy.spawn("rofi -modi drun -show drun")),
    Key([mod], "m", lazy.window.toggle_fullscreen()
        ),  # Toggle a window between minimum and maximum sizes
    Key([mod], "b", lazy.spawn("firefox")),  # Launch Firefox
    Key([mod], "p",
        lazy.spawn("bitwarden")),  # Launch Bitwarden Password Manager
]


##### BAR COLORS #####
# Uses Tartan color scheme in xcolors.net from terminal.sexy
def init_colors():
    return [
Example #13
0
	# Switch groups
	Key([], 'XF86Back', lazy.screen.prev_group(skip_managed=True, )),
	Key([], 'XF86Forward', lazy.screen.next_group(skip_managed=True, )),
	Key([mod], 'XF86Back', lazy.screen.prev_group(skip_managed=True, )),
	Key([mod], 'XF86Forward', lazy.screen.next_group(skip_managed=True, )),
	Key([mod], 'Left', lazy.screen.prev_group(skip_managed=True, )),
	Key([mod], 'Right', lazy.screen.next_group(skip_managed=True, )),
	Key([mod], 'Escape', lazy.screen.togglegroup()),
	# Toggle between different layouts as defined below
	Key([mod], 'space', lazy.next_layout()),
	Key([mod, 'shift'], 'space', lazy.prev_layout()),
	# lazy.group.setlayout('...
	Key([mod, 'shift'], 'c', lazy.window.kill()),
	# qtile maintenence
	Key([mod, 'shift'], 'e', lazy.spawn('gvim {}'.format(__file__))),
	Key([mod, 'shift'], 'r', lazy.restart()), # default is control! ;)
	Key([mod, 'shift'], 'q', lazy.shutdown()),
	Key([mod], 'r', lazy.spawncmd()),
	Key([mod], 'f', lazy.window.toggle_floating()),
	Key([mod], 'm', lazy.window.toggle_fullscreen()),
	Key([mod], 'n', lazy.window.toggle_minimize()),
	#Key( [mod, 'shift'], '2', lazy.to_screen(1), lazy.group.toscreen(1)),
	]

# create groups
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())
	)
Example #14
0
        lazy.layout.toggle_split()
    ),
    Key([mod], "space", lazy.nextlayout()),

    Key([mod], "r", lazy.spawncmd()),
    Key([mod], "x", lazy.spawn("xchat")),
    Key([mod], "w", lazy.spawn("firefox")),
    Key([mod], "Return", lazy.spawn("tilda")),
    Key([mod], "f", lazy.spawn("pcmanfm")),
    Key([mod], "s", lazy.spawn("skype")),
    Key([mod], "g", lazy.spawn("gimp")),

    # alt
    Key([alt], "t", lazy.window.toggle_floating()),
    Key([alt], "w", lazy.window.kill()),
    Key([alt], "r", lazy.restart()),
    Key([alt], "q", lazy.shutdown()),
    Key([alt], "F10", lazy.spawn("scrot -b -d 1 '%Y:%m:%d:%H:%M:%S.png' -e 'mv $f ~/Desktop/'")),
]

groups = [
    Group("1"),
    Group("2"),
    Group("3"),
    Group("4"),
    Group("5"),
    Group("6"),
    Group("7"),
    Group("8"),
    Group("9")
]
Example #15
0
    return screen_config


num_screens = get_number_of_screens()

screens = make_screen_config(num_screens)

mod = "mod4"
altkey = "mod1"
# mod1 = Alt
# mod4 = Win Key


keys = [
    Key(["control", "mod4"], "q", lazy.shutdown()),
    Key(["control", "mod4"], "r", lazy.restart()),
    Key([mod], "Left", lazy.screen.prev_group()),
    Key([mod], "Right", lazy.screen.next_group()),
    Key([mod], "k", lazy.layout.down()),
    Key([mod], "j", lazy.layout.up()),
    Key([mod], "h", lazy.layout.previous()),
    # Key([mod, "shift"], "l",              lazy.layout.shuffle_up()),
    # Key([mod, "shift"], "h",              lazy.layout.shuffle_down()),
    Key([mod], "l", lazy.layout.next()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    Key([mod], "space", lazy.next_layout()),
    Key(["mod1"], "Tab", lazy.layout.next()),
    Key(["mod1", "shift"], "Tab", lazy.layout.prev()),
    Key([mod, "shift"], "Right", lazy.layout.increase_ratio()),
    Key([mod, "shift"], "Left", lazy.layout.decrease_ratio()),
Example #16
0
    from libqtile.manager import Key, Group
except ImportError:
    from libqtile.config import Key, Group
from libqtile.manager import Screen, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook

follow_mouse_focus = False

mod = "mod4"
alt = "mod1"

keys = [
    Key(
        [mod, "control"], "r",
        lazy.restart()
    ),
    Key(
        [mod], "w",
        lazy.window.kill()
    ),
    Key(
        [alt], "Tab",
        lazy.group.next_window()),
    # this is usefull when floating windows get buried
    Key(
        [alt], "grave",
        lazy.window.bring_to_front()
    ),
    Key(
        [mod, alt], "Tab",
Example #17
0
 EzKey("M-b", lazy.layout.left()),
 EzKey("M-C-p", lazy.layout.shuffle_up()),
 EzKey("M-C-f", lazy.layout.shuffle_right()),
 EzKey("M-C-n", lazy.layout.shuffle_down()),
 EzKey("M-C-b", lazy.layout.shuffle_left()),
 EzKey("M-S-f", lazy.layout.grow_right()),
 EzKey("M-S-b", lazy.layout.grow_left()),
 EzKey("M-S-<space>", lazy.layout.rotate()),
 EzKey("M-C-<Return>", lazy.layout.toggle_split()),
 EzKey("M-m", lazy.layout.toggle_fullscreen()),
 EzKey("M-S-<Return>", lazy.window.toggle_floating()),
 EzKey("C-S-<grave>", lazy.spawn(terminal_program)),
 EzKey("M-<Tab>", lazy.next_layout()),
 EzKey("M-o", lazy.next_screen()),
 EzKey("M-q", lazy.window.kill()),
 EzKey("M-C-r", lazy.restart()),
 EzKey("M-C-q", lazy.shutdown()),
 EzKey("M-r", lazy.spawncmd()),
 EzKey("A-<Shift_L>", lazy.function(switch_kbd_layout)),
 EzKey("<XF86AudioRaiseVolume>", lazy.spawn("amixer -q sset Master 5%+")),
 EzKey("<XF86AudioLowerVolume>", lazy.spawn("amixer -q sset Master 5%-")),
 EzKey("A-<XF86AudioRaiseVolume>", lazy.spawn("amixer -q sset Master 100%")),
 EzKey("A-<XF86AudioLowerVolume>", lazy.spawn("amixer -q sset Master 0%")),
 EzKey("<XF86AudioMute>", lazy.spawn("amixer -q sset Master toggle")),
 EzKey("M-<bracketleft>", lazy.function(switch_pulse_default_sink)),
 EzKey("M-<bracketright>", lazy.function(switch_pulse_default_source)),
 EzKey("<XF86MonBrightnessUp>", lazy.spawn("light -A 5")),
 EzKey("<XF86MonBrightnessDown>", lazy.spawn("light -U 5")),
 EzKey("<XF86KbdBrightnessUp>", lazy.spawn("kbdlight up")),
 EzKey("<XF86KbdBrightnessDown>", lazy.spawn("kbdlight down")),
 EzKey("A-<XF86KbdBrightnessUp>", lazy.spawn("kbdlight max")),
Example #18
0
    Key([mod], 'k', lazy.layout.down()),

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

    # Start xterm
    Key([mod], 'Return', lazy.spawn('xterm')),

    # Toggle between different layouts
    Key([mod], 'Tab', lazy.next_layout()),

    # Close window
    Key([mod], 'w', lazy.window.kill()),

    # Restart qtile with new config
    Key([mod, ctrl], 'r', lazy.restart()),

    # Shutdown
    Key([mod, ctrl], 'q', lazy.shutdown()),

    # Run commands
    Key([mod], 'r', lazy.spawncmd()),
]

groups = [
    Group('1',
          label=u'1 \uf120',
          matches=[Match(wm_class=['XTerm'])],
          spawn='xterm'),
    Group('2', label='2 DEV', matches=[Match(wm_class=['code'])]),
    Group('3',
Example #19
0
 # Modify current layout
 Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
 Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
 Key([mod], "i", lazy.layout.grow()),
 Key([mod], "m", lazy.layout.shrink()),
 Key([mod], "n", lazy.layout.reset()),
 Key([mod], "o", lazy.layout.maximize()),
 # Close the window in focus
 Key([alt], "F4", lazy.window.kill()),
 Key([ctrl, alt], "w", lazy.window.kill()),
 # Switch window layout
 Key([mod], "space", lazy.next_layout()),
 # Toggle between different keyboard layouts
 Key([ctrl, alt], "space", lazy.widget["keyboardlayout"].next_keyboard()),
 # Quit & restart qtile
 Key([mod, ctrl], "r", lazy.restart()),
 Key([mod, ctrl], "l", lazy.spawn("slock")),
 Key([mod, ctrl], "q", lazy.shutdown()),
 # lazy.spawn(["confirm_execute", "kill -9 -1", "Log out?"])),
 Key(
     [mod, ctrl],
     "p",
     lazy.spawn(["confirm_execute", "shutdown now", "Shut down now?"]),
 ),
 Key([mod, ctrl], "o",
     lazy.spawn(["confirm_execute", "reboot", "Reboot now?"])),
 # Launch things
 Key([mod], "Return", lazy.spawn(terminal)),
 Key([mod, ctrl], "Return", lazy.spawn("alacritty")),
 Key([mod], "r", lazy.spawn("dmenu_run")),
 Key([alt], "space", lazy.spawn("dmenu_run")),
Example #20
0
def init_keys():
    return [
        # ------------ WINDOW CONFIGS ------------

        # Switch between windows in current stack pane
        Key([mod_key], "j", lazy.layout.down()),
        Key([mod_key], "k", lazy.layout.up()),
        Key([mod_key], "h", lazy.layout.left()),
        Key([mod_key], "l", lazy.layout.right()),

        # Change window sizes (MonadTall)
        Key([mod_key, "shift"], "l", lazy.layout.grow()),
        Key([mod_key, "shift"], "h", lazy.layout.shrink()),

        # Toggle floating
        Key([mod_key, "shift"], "f", lazy.window.toggle_floating()),

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

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

        # Kill window
        Key([mod_key], "w", lazy.window.kill()),

        # Restart Qtile
        Key([mod_key, "control"], "r", lazy.restart()),
        Key([mod_key, "control"], "q", lazy.shutdown()),
        Key([mod_key], "r", lazy.spawncmd()),

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

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

        # ------------ APPS CONFIG ------------

        # Menu
        Key([mod_key], "m", lazy.spawn("rofi -show run")),

        # Window Nav
        Key([mod_key, "shift"], "m", lazy.spawn("rofi -show")),

        # Browser
        Key([mod_key], "b", lazy.spawn("firefox")),

        # File Manager
        Key([mod_key], "f", lazy.spawn("thunar")),

        # Terminal
        Key([mod_key], "Return", lazy.spawn("alacritty")),

        # Redshift
        Key([mod_key], "r", lazy.spawn("redshift -O 2400")),
        Key([mod_key, "shift"], "r", lazy.spawn("redshift -x")),

        # ------------ HARDWARE CONFIG ------------

        # Volume
        Key([], "XF86AudioLowerVolume",
            lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%")),
        Key([], "XF86AudioRaiseVolume",
            lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")),
        Key([], "XF86AudioMute",
            lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")),

        #Brightness
        Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +10%")),
        Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 10%-")),
    ]
Example #21
0
 Key([mod], "b", lazy.spawn(browser), desc="Launch Chrome Browser"),
 Key(
     [mod, "shift"],
     "b",
     lazy.spawn(ibrowser),
     desc="Launch Chrome in Incognito",
 ),
 Key([mod], "e", lazy.spawn(emacs), desc="Launch Doom Emacs"),
 Key([mod], "s", lazy.spawn("slack"), desc="Launch Slack"),
 Key([mod], "z", lazy.spawn("zoom-client"), desc="Launch Zoom"),
 ##### --------------------------------------------------------------------------
 ### Qtile Enviornment Keys #####################################################
 ##### --------------------------------------------------------------------------
 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"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
 Key([mod], "period", lazy.next_screen(),
     desc="Move focus to next monitor"),
 ##### --------------------------------------------------------------------------
 ### Treetab Layout Keys ########################################################
 ##### --------------------------------------------------------------------------
 Key(
     [mod, "control"],
     "k",
     lazy.layout.section_up(),
     desc="Move up a section in treetab",
 ),
 Key(
     [mod, "control"],
     "j",
Example #22
0
def init_keys():
    keys = [
        Key(
            [mod],
            "Return",
            lazy.spawn(myTerm)  # Open terminal
        ),
        Key(
            [mod],
            "Tab",
            lazy.next_layout()  # Toggle through layouts
        ),
        Key(
            [mod, "shift"],
            "c",
            lazy.window.kill()  # Kill active window
        ),
        Key(
            [mod, "shift"],
            "r",
            lazy.restart()  # Restart Qtile
        ),
        Key(
            [mod, "shift"],
            "q",
            lazy.shutdown()  # Shutdown Qtile
        ),
        Key(
            [mod],
            "i",
            lazy.to_screen(0)  # Keyboard focus screen(0)
        ),
        Key(
            [mod],
            "o",
            lazy.to_screen(1)  # Keyboard focus screen(1)
        ),
        Key(
            [mod],
            "p",
            lazy.to_screen(2)  # Keyboard focus screen(2)
        ),
        # Window controls
        Key(
            [mod],
            "k",
            lazy.layout.down()  # Switch between windows in current stack pane
        ),
        Key(
            [mod],
            "j",
            lazy.layout.up()  # Switch between windows in current stack pane
        ),
        Key(
            [mod, "shift"],
            "k",
            lazy.layout.shuffle_down()  # Move windows down in current stack
        ),
        Key(
            [mod, "shift"],
            "j",
            lazy.layout.shuffle_up()  # Move windows up in current stack
        ),
        Key(
            [mod, "shift"],
            "l",
            lazy.layout.grow(),  # Grow size of current window (XmonadTall)
            lazy.layout.increase_nmaster(
            ),  # Increase number in master pane (Tile)
        ),
        Key(
            [mod, "shift"],
            "h",
            lazy.layout.shrink(),  # Shrink size of current window (XmonadTall)
            lazy.layout.decrease_nmaster(
            ),  # Decrease number in master pane (Tile)
        ),
        Key(
            [mod, "shift"],
            "Left",  # Move window to workspace to the left
            window_to_prev_group),
        Key(
            [mod, "shift"],
            "Right",  # Move window to workspace to the right
            window_to_next_group),
        Key(
            [mod],
            "n",
            lazy.layout.normalize(
            )  # Restore all windows to default size ratios 
        ),
        Key(
            [mod],
            "m",
            lazy.layout.maximize(
            )  # Toggle a window between minimum and maximum sizes
        ),
        Key(
            [mod, "shift"],
            "KP_Enter",
            lazy.window.toggle_floating()  # Toggle floating
        ),
        Key(
            [mod, "shift"],
            "space",
            lazy.layout.rotate(),  # Swap panes of split stack (Stack)
            lazy.layout.flip(
            )  # Switch which side main pane occupies (XmonadTall)
        ),
        # Stack controls
        Key(
            [mod],
            "space",
            lazy.layout.next()  # Switch window focus to other pane(s) of stack
        ),
        Key(
            [mod, "control"],
            "Return",
            lazy.layout.toggle_split(
            )  # Toggle between split and unsplit sides of stack
        ),
        # GUI Apps
        Key([mod], "w", lazy.spawn("firefox")),
        Key([mod], "t", lazy.spawn("thunderbird")),
        Key([mod], "f", lazy.spawn("pcmanfm")),
        Key([mod], "g", lazy.spawn("geany")),
        # Terminal Apps
        Key(
            [mod],
            "KP_Insert",  # Keypad 0
            lazy.spawncmd()  # Run Dialog
        ),
        Key(
            [mod],
            "KP_End",  # Keypad 1
            lazy.spawn(myTerm + " -e ranger")),
        Key(
            [mod],
            "KP_Down",  # Keypad 2
            lazy.spawn(myTerm + " -e htop")),
        Key(
            [mod],
            "KP_Page_Down",  # Keypad 3
            lazy.spawn(myTerm + " -e irssi")),
        Key(
            [mod],
            "KP_Left",  # Keypad 4
            lazy.spawn(myTerm + " -e lynx http://www.omgubuntu.co.uk")),
        Key(
            [mod],
            "KP_Begin",  # Keypad 5
            lazy.spawn(myTerm + " -e mutt")),
        Key(
            [mod],
            "KP_Right",  # Keypad 6
            lazy.spawn(myTerm + " -e canto-curses")),
        Key(
            [mod],
            "KP_Home",  # Keypad 7
            lazy.spawn(myTerm + " -e alsamixer")),
        Key(
            [mod],
            "KP_Up",  # Keypad 8
            lazy.spawn(myTerm + " -e ncmpcpp")),
        Key(
            [mod],
            "KP_Page_Up",  # Keypad 9
            lazy.spawn(myTerm + " -e mpsyt")),
        # Color Testing Scripts
        Key(
            [mod, "shift"],
            "KP_End",  # Keypad 1
            lazy.spawn(myTerm +
                       " -e /home/derek/scripts/colors/colortest.sh")),
        Key(
            [mod, "shift"],
            "KP_Down",  # Keypad 2
            lazy.spawn(myTerm + " -e /home/derek/scripts/colors/dna.sh")),
        Key(
            [mod, "shift"],
            "KP_Page_Down",  # Keypad 3
            lazy.spawn(myTerm + " -e /home/derek/scripts/colors/pipes2")),
        Key(
            [mod, "shift"],
            "KP_Left",  # Keypad 4
            lazy.spawn(myTerm + " -e 'httping -KY --draw-phase localhost'")),
        Key(
            [mod, "shift"],
            "KP_Begin",  # Keypad 5
            lazy.spawn(myTerm + " -e rtorrent")),
        Key(
            [mod, "shift"],
            "KP_Right",  # Keypad 6
            lazy.spawn(myTerm + " -e nmon")),
        Key(
            [mod, "shift"],
            "KP_Home",  # Keypad 7
            lazy.spawn(myTerm + " -e tudu")),
        Key(
            [mod, "shift"],
            "KP_Up",  # Keypad 8
            lazy.spawn(myTerm + "-e calcurse")),
        Key(
            [mod, "shift"],
            "KP_Page_Up",  # Keypad 9
            lazy.spawn(myTerm +
                       " -e 'vim /home/derek/.config/qtile/config.py'")),
    ]
    return keys
Example #23
0
    Key([mod], "k", lazy.layout.up()),
    Key([mod, shift], "j", lazy.layout.shuffle_down()),
    Key([mod, shift], "k", lazy.layout.shuffle_up()),
    Key([control, mod], "n", lazy.layout.normalize()),
    Key([control, mod], "k", lazy.layout.grow()),
    Key([control, mod], "j", lazy.layout.shrink()),

    # Manage workspaces
    Key([mod], "Tab", lazy.screen.next_group()),
    Key([mod, shift], "Tab", lazy.screen.prev_group()),
    Key([mod], "l", lazy.screen.next_group()),
    Key([mod], "h", lazy.screen.prev_group()),
    Key([mod], "m", lazy.next_layout()),

    # Multimedia keys
    Key([], "XF86AudioPlay", lazy.spawn('playerctl play-pause')),
    Key([], "XF86AudioPrev", lazy.spawn('playerctl previous')),
    Key([], "XF86AudioNext", lazy.spawn('playerctl next')),
    Key([], "Print", lazy.spawn('gnome-screenshot')),
    Key([control], "Print", lazy.spawn('gnome-screenshot -a')),
    Key([control, mod], "space", lazy.spawn('emoji-keyboard -s')),
    Key([mod, "control"], "r", lazy.restart()),
]

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)))
Example #24
0
def idle_dialogues(window):
    if((window.window.get_name() == 'Search Dialog') or
           (window.window.get_name() == 'Module') or
           (window.window.get_name() == 'Goto') or
           (window.window.get_name() == 'IDLE Preferences')):
        window.floating = True


mod = "mod4"
alt = "mod1"

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

   # Key([mod], "f",
    #     lazy.window.toggle_floating()),
    Key([mod], "f",
        lazy.window.toggle_fullscreen()),
    Key([mod], "h",
        lazy.layout.left()),
    Key([mod], "l",
        lazy.layout.right()),
    Key([mod], "k",
        lazy.layout.up()),
    Key([mod], "j",
        lazy.layout.down()),
Example #25
0
def init_keys():
    keys = [

        # Change Focus:
        Key([mod], "h", lazy.layout.left()),
        Key([mod], "l", lazy.layout.right()),
        Key([mod], "j", lazy.layout.down()),
        Key([mod], "k", lazy.layout.up()),
        # Swap places:
        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], "w", lazy.to_screen(0)),
        Key([mod], "y", lazy.to_screen(1)),
        Key([mod, "shift"], "w", lazy.window.to_screen(0)),
        Key([mod, "shift"], "y", lazy.window.to_screen(1)),
    
    
        # Resize keys:
        Key([mod], "i", lazy.layout.grow()),
        Key([mod], "m", lazy.layout.shrink()),
        Key([mod], "n", lazy.layout.normalize()),
        Key([mod], "o", lazy.layout.maximize()),
        # Move the master pane Left/Right:
        Key([mod, "shift"], "space", lazy.layout.flip()),
        # Toggel fullscreen on/off:
        Key([mod], "f", lazy.window.toggle_fullscreen()),
    
        # Change Layout:
        Key([mod], "Tab", lazy.next_layout()),
        # Close focused window:
        Key([mod, "shift"], "q", lazy.window.kill()),
    
        # Restart qtile in place:
        Key([mod, "control"], "r", lazy.restart()),
    
        # Open a run prompt:
        Key([mod], "r", lazy.spawncmd()),
    
        # Applications/Scripts Shortcuts:
        Key([mod], "Return", lazy.spawn("alacritty")),
        Key([mod], "p", lazy.spawn("./Scripts/pmenu.sh")),
        Key([mod, "shift"], "f", lazy.spawn("firefox")),
        Key([mod, "shift"], "e", lazy.spawn("emacs")),
        Key([mod, "shift"], "t", lazy.spawn("thunderbird")),
        Key([mod, "shift"], "b", lazy.spawn("thunar")),
        Key([mod], "d", lazy.spawn("rofi -show run")),
        Key([mod, "shift"], "p", lazy.spawn("./Scripts/pdfs.sh")),
    
        # Backlight control:
        Key([mod], "Down", lazy.spawn("light -U 5")),
        Key([mod], "Up", lazy.spawn("light -A 5")),
    
        # Volume control:
        Key([mod], "Left", lazy.spawn("amixer -c 0 -q set Master 2dB-")),
        Key([mod], "Right", lazy.spawn("amixer -c 0 -q set Master 2dB+")),
    
        # Change keyboard layout:
        Key([mod], "space", lazy.spawn("./Scripts/kbdlayout.sh")),
        ]
    return keys
Example #26
0
        'layout': 'columns'
    },
    "VMS": {
        'layout': 'max'
    }
}

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

##### KEYBINDINGS #####
keys = [
    ### BASICS
    Key([mod], "y", lazy.spawncmd(), desc='launch prompt'),
    Key([mod], "k", lazy.window.kill(), desc='Kill active window'),
    Key([mod], "q", lazy.window.kill(), desc='Kill active window'),
    Key([mod, "shift"], "r", lazy.restart(), desc='Restart Qtile'),
    Key([mod, "shift"], "q", lazy.shutdown(), desc='Shutdown Qtile'),
    #Key([mod], "x", lazy.spawn('arcolinux-logout')),

    ### WINDOW CONTROL

    ## Focus
    Key([mod], "Down", lazy.layout.down(),
        desc="Switch focus to window below"),
    Key([mod], "Up", lazy.layout.up(), desc="Switch focus to window above"),
    Key([mod],
        "Right",
        lazy.layout.left(),
        desc="Switch focus to window to the right"),
    Key([mod],
        "Left",
Example #27
0
        'format': '{char}{hour:d}:{min:02d}',
        })

    weather = widget.copy()
    weather.update({
        'update_interval': 60,
        'metric': False,
        'format': '{condition_text} {condition_temp}°',
        })


##-> Keybindings
MOD = 'mod4'
keys = [
    ## Window Manager Controls
    Key([MOD, 'control'], 'r', lazy.restart()),
    Key([MOD, 'control'], 'q', lazy.shutdown()),

    ## Window Controls
    Key([MOD], 'w', lazy.window.kill()),
    Key([MOD], 'Left', lazy.group.prevgroup()),
    Key([MOD], 'Right', lazy.group.nextgroup()),

    ## Volume Controls
    Key([], 'XF86AudioRaiseVolume', lazy.spawn(Commands.volume_up)),
    Key([], 'XF86AudioLowerVolume', lazy.spawn(Commands.volume_down)),
    Key([], 'XF86AudioMute', lazy.spawn(Commands.volume_toggle)),

    ## Application Launchers
    #Key([MOD], 'r', lazy.spawncmd(prompt=':')),
    Key([MOD], 'space', lazy.spawn(Commands.dmenu)),
Example #28
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()),
Example #29
0
mod = 'mod4'
xterm = 'sakura'


# Groups
groups = [
  Group("main"),
  Group("music"),
  Group("www"),
]

# Keys
keys = [
  Key([mod], "Return", lazy.spawn("sakura")),
  Key([mod], "p", lazy.spawncmd()),
  Key([mod, "shift"], "r", lazy.restart()),
  Key([mod, "shift"], "q", lazy.shutdown()),

  Key([mod, "shift"], "c", lazy.window.kill()),
  Key([mod], "space", lazy.window.toggle_floating()),
  Key([mod], "m",     lazy.window.toggle_maximize()),
  Key([mod], "f",     lazy.window.toggle_fullscreen()),

  Key([mod], "k", lazy.layout.down()),
  Key([mod], "j", lazy.layout.up()),
  Key([mod], "h", lazy.layout.previous()),
  Key([mod], "l", lazy.layout.next()),

  # Those are specific to the Stack layout:
  Key([mod], "s", lazy.layout.toggle_split()),
  Key([mod], "d", lazy.layout.toggle_split()),
Example #30
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()),
    #Key([MOD], "[",   lazy.window.move_floating(-10,0)),
    #Key([MOD], "]",   lazy.window.move_floating(10,0)),
    Key([MOD, 'shift'], "r",      lazy.restart()),
    Key([MOD], "p",      lazy.spawncmd()),
    #Key([MOD, 'shift'], "Down", lazy.window.down_opacity()),
    Key([MOD], "z", lazy.window.down_opacity()),
    Key([MOD], "downarrow", lazy.window.down_opacity()),
    #Key([MOD, 'shift'], "Up", lazy.window.up_opacity()),
    Key([MOD], "a", lazy.window.up_opacity()),


    # The bindings below control Amarok, and my sound volume.
    Key(
        [MOD, "shift"], "k",
        lazy.spawn("amixer -c 1 -q set Speaker 2dB+")
    ),
    Key(
        [MOD, "shift"], "j",
Example #31
0
    keys.append(Key([mod], downkey, lazy.prevlayout()))


# Switch between screens.
screen_switch_keys = [
        # Super + the two keys on both sides of the middle row of the keyboard to switch windows.
        ("semicolon", "apostrophe"),
        ("s", "d"),
]

for firstkey, secondkey in screen_switch_keys:
    keys.append(Key([mod], firstkey, lazy.to_screen(0)))
    keys.append(Key([mod], secondkey, lazy.to_screen(1)))


keys.append(Key([mod, ctrl], "r", lazy.restart()))
keys.append(Key([mod, ctrl, shift, alt], "q", lazy.spawn("echo \"quit\" > /tmp/hevents%s" % (os.environ["DISPLAY"].replace(":", "_"))), lazy.shutdown()))

keys.append(Key([mod, ctrl, alt, shift], "1", lazy.spawn(os.path.expanduser("~/.bin/screenconf 1"))))
keys.append(Key([mod, ctrl, alt, shift], "2", lazy.spawn(os.path.expanduser("~/.bin/screenconf 2"))))


#### Application Launching

# Slock for screen locking.
keys.append(Key([mod], "l", lazy.spawn("slock")))

# Synapse for doing stuff.
keys.append(Key([mod], "space", lazy.spawn("synapse")))

# File browser
Example #32
0
def init_keys(mod,myTerm):
    keys = [
            Key(
                [mod], "Return",
                lazy.spawn(myTerm)                  # Open terminal
                ),
            Key(
                [mod], "Tab",
                lazy.next_layout()                  # Toggle trough layouts
                ),
            Key(
                [mod, "shift"], "c",
                lazy.window.kill()                  # Kill active window
                ),
            Key(
                [mod], "q",
                lazy.restart()                      # Restart Qtile
                ),
            Key(
                [mod, "shift"], "q",
                lazy.shutdown()                     # Shutdown Qtile
                ),
            Key(
                [mod, "control"], "j",
                lazy.layout.section_up()            # Move up a section in treetab
                ),
            Key(
                [mod, "control"], "k",
                lazy.layout.section_down()          # Move down a section in treetab
                ),
            ### Window controls
            Key(
                [mod], "j",
                lazy.layout.down()                  # Switch between windows in current stack pane
                ),
            Key(
                [mod], "k",
                lazy.layout.up()                    # Switch between windows in current stack pane
                ),
            Key(
                [mod, "shift"], "k",
                lazy.layout.shuffle_down()          # Move windows down in current stack
                ),
            Key(
                [mod, "shift"], "j",
                lazy.layout.shuffle_up()            # Move windows up in current stack
                ),
            Key(
                [mod, "shift"], "l",
                lazy.layout.grow(),                 # Grow size of current window (XmonadTall)
                lazy.layout.increase_nmaster(),     # Increase number in master pane (Tile)
                ),
            Key(
                [mod, "shift"], "h",
                lazy.layout.shrink(),               # Shrink size of current window (XmonadTall)
                lazy.layout.decrease_nmaster(),     # Decrease number in master pane (Tile)
                ),
            Key(
                [mod, "shift"], "Left",             # Move window to workspace to the left
                window_to_prev_group
                ),
            Key(
                [mod, "shift"], "Right",            # Move window to workspace to the right
                window_to_next_group
                ),
            Key(
                [mod], "n",
                lazy.layout.normalize()             # Restore all windows to default size ratios
                ),
            Key(
                [mod], "m",
                lazy.layout.maximize()              # Toggle a window between minimum and maximum sizes
                ),
            Key(
                [mod], "f",
                lazy.window.toggle_floating()       # Toggle floating
                ),
            Key(
                [mod, "shift"], "space",
                lazy.layout.rotate(),               # Swap panes of split stack (Stack)
                lazy.layout.flip()                  # Switch which side main pane occupies (XmonadTall)
                ),
            ### Stack controls
            Key(
                [mod], "space",
                lazy.layout.next()                  # Switch window focus to other pane(s) of stack
                ),
            Key(
                [mod, "control"], "Return",
                lazy.layout.toggle_split()          # Toggle between split and unsplit sides of stack
                ),
            ### Dmenu Run Launcher  (C-esc is mapped to Windows key on its own)
            Key(
                ["control"], "Escape",
                lazy.spawn("dmenu_run -fn \
                                'UbuntuMono Nerd Font:size=12' \
                                -nb '#292d3e' \
                                -nf '#bbc5ff' \
                                -sb '#82AAFF' \
                                -sf '#292d3e' \
                                -p 'dmenu:'\
                            ")
                ),
            ### Dmenu scripts launched with MOD + ALT + KEY
            Key(
                [mod, "mod1"], "e",
                lazy.spawn("./.dmenu/dmenu-edit-configs.sh")
                ),
            Key(
                [mod, "mod1"], "m",
                lazy.spawn("./.dmenu/dmenu-sysmon.sh")
                ),
            Key(
                [mod, "mod1"], "p",
                lazy.spawn("passmenu")
                ),
            Key(
                [mod, "mod1"], "r",
                lazy.spawn("./.dmenu/dmenu-reddio.sh")
                ),
            Key(
                [mod, "mod1"], "s",
                lazy.spawn("./.dmenu/dmenu-surfraw.sh")
                ),
            Key(
                [mod, "mod1"], "t",
                lazy.spawn("./.dmenu/dmenu-trading.sh")
                ),
            ### Applications
            #Key(
                #[mod], "w",
                #lazy.spawn(myTerm+" -e surf")
                #),
            Key(
                [mod, "shift"], "w",
                lazy.spawn("firefox")
                ),
            Key(
                [mod, "shift"], "e",
                lazy.spawn("emacsclient -a '' -nc")
                ),
            Key(
                [mod], "f",
                lazy.spawn(myTerm+" -e vifm")
                ),
            Key(
                [mod, "shift"], "f",
                lazy.spawn("pcmanfm")
                ),
            #Key(
                #[mod, "mod1"], "j",
                #lazy.spawn(myTerm+" -e joplin")
                #),
            #Key(
                #[mod, "mod1"], "y",
                #lazy.spawn(myTerm+" -e youtube-viewer")
                #),
            #Key(
                #[mod, "mod1"], "a",
                #lazy.spawn(myTerm+" -e ncpamixer")
                #),
    ]
    return keys
Example #33
0
    Key([alt, "shift"], "space", lazy.layout.flip()),

    # Bindings for Tile layout
    Key([alt, "shift"], "i", lazy.layout.increase_ratio()),
    Key([alt, "shift"], "d", lazy.layout.decrease_ratio()),

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

    # Qtile management
    Key([alt, "shift"], "r", lazy.restart()),
    Key([alt, "shift"], "q", lazy.shutdown()),

    # cycle to previous group
    Key([mod], "F11", lazy.screen.prevgroup(skip_managed=True)),
    # cycle to next group
    Key([mod], "F12", lazy.screen.nextgroup(skip_managed=True)),
    # toggle group
    Key([mod], "Tab", lazy.screen.togglegroup()),

    # PRINT SCREEN
    Key([mod], "F10", lazy.spawn("import -window root ~/screenshot.png")),
]

groups = [
    Group("term"),
Example #34
0
keys = [
    Key([mod, ctrl], 'Left', lazy.layout.toggle_split()),
    Key([mod, ctrl], 'Right', lazy.layout.client_to_next()),
    Key([mod, ctrl], 'Down', lazy.layout.down()),
    Key([mod, ctrl], 'Up', lazy.layout.rotate()),
    Key([alt], 'Tab', lazy.layout.next()),
    Key([mod], 'f', lazy.window.toggle_floating()),
    Key([mod], 'Tab', lazy.next_screen()),
    Key([mod, ctrl], 'q', lazy.shutdown()),
    Key([], 'F1', lazy.screen[0].togglegroup('')),
    Key([mod], 'Return', lazy.spawn(term)),
    Key([mod, shft], 'Tab', lazy.next_layout()),
    Key([mod], 'Prior', lazy.screen.prev_group()),
    Key([mod], 'Next', lazy.screen.next_group()),
    Key([alt], 'F4', lazy.window.kill()),
    Key([mod, ctrl], 'r', lazy.restart()),
    Key([mod], 'space', lazy.spawncmd('run')),
    Key([mod, ctrl], 'f', lazy.window.toggle_fullscreen()),
    Key([alt], 'grave', lazy.window.bring_to_front()),
    Key([], 'XF86MonBrightnessDown', lazy.spawn('sudo /home/filipe/local/bin/backlight dec')),
    Key([], 'XF86MonBrightnessUp', lazy.spawn('sudo /home/filipe/local/bin/backlight inc')),
    Key([], 'XF86AudioLowerVolume', lazy.spawn('sh -c "pactl set-sink-mute 0 false ; pactl set-sink-volume 0 -5%"')),
    Key([], 'XF86AudioRaiseVolume', lazy.spawn('sh -c "pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +5%"')),
    Key([], 'XF86AudioMute', lazy.spawn('pactl set-sink-mute 0 toggle')),
    Key([mod], 'z', lazy.window.togroup()),
    Key([mod], 'b', lazy.spawn('bash -c "/home/filipe/local/bin/backlight_off"')),
    Key([mod, alt], "Down", lazy.layout.down()),
    Key([mod, alt], "Up", lazy.layout.up()),
    Key([mod, alt], "Left", lazy.layout.client_to_next()),
    Key([mod, alt], "Right", lazy.layout.client_to_previous()),
]
Example #35
0
    # 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"),
    Group("o"),
    Group("p"),
]
for i in groups:
    # mod1 + letter of group = switch to group
    keys.append(
Example #36
0
    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")),
    Key(["control", SUPER], "BackSpace", lazy.restart()),
    Key([ALT], "t", lazy.window.toggle_floating()),
]

mouse = [
    Drag(["control"], LEFT_CLICK, lazy.window.set_position_floating(),
        start=lazy.window.get_position()),
    Drag(["control"], RIGHT_CLICK, lazy.window.set_size_floating(),
        start=lazy.window.get_size()),
    Click(["control"], MIDDLE_CLICK, lazy.window.bring_to_front())
]

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

for index, group in enumerate(groups, 1):
    index = str(index)
Example #37
0
    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()),
]

groups = [Group(chr(ord("1") + i)) for i in range(9)]
for i in groups:
    keys.append(Key([mod], i.name, lazy.group[i.name].toscreen()))
    keys.append(Key([mod, shift], i.name, lazy.window.togroup(i.name)))

keys.append(Key([mod], "Left", lazy.group.prevgroup()))
Example #38
0
last_window_id = None
x_display = display.Display()
x_screen = x_display.screen()


class command:
    terminal = get_alternatives(['terminator', 'gnome-terminal', 'xterm'])
    autostart = os.path.join(os.path.dirname(__file__), 'bin/autostart')
    lock = os.path.join(os.path.dirname(__file__), 'bin/lock')
    suspend = os.path.join(os.path.dirname(__file__), 'bin/suspend')
    hibernate = os.path.join(os.path.dirname(__file__), 'bin/hibernate')

# Key bindings
keys = [
    # Window manager controls
    Key([MODKEY, CTRL], 'r', lazy.restart()),
    Key([MODKEY, CTRL], 'q', lazy.shutdown()),
    Key([MODKEY, SHIFT], SPACE, lazy.layout.flip()),
    Key([MODKEY], RETURN, lazy.spawn(command.terminal)),
    Key([MODKEY], SPACE, lazy.nextlayout()),
    Key([MODKEY], 'q', lazy.window.kill()),
    Key([MODKEY], 'p', lazy.spawncmd()),
    Key([MODKEY], 't', lazy.window.toggle_floating()),
    Key([MODKEY], 'f', lazy.window.toggle_fullscreen()),

    # Move Focus
    Key([MODKEY], TAB, lazy.layout.next()),
    Key([MODKEY, SHIFT], TAB, lazy.layout.previous()),
    Key([MODKEY], 'h', lazy.layout.left()),
    Key([MODKEY], 'j', lazy.layout.down()),
    Key([MODKEY], 'k', lazy.layout.up()),
    # 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")),
	Key([mod, "shift"], "i", lazy.spawn("eog")),
	Key([mod, "shift"], "l", lazy.spawn("libreoffice")),
	Key([mod, "shift"], "g", lazy.spawn("speedcrunch")),
	Key([mod, "shift"], "h", lazy.spawn("sakura -e mc")),
]

groups = [
    Group("term1", spawn="sakura -x .fig"),
Example #40
0
    # for MonadTall layout
    Key([mod], "l", lazy.layout.grow()),
    Key([mod], "h", lazy.layout.shrink()),
    Key([mod], "n", lazy.layout.normalize()),
    Key([mod], "m", lazy.layout.maximize()),

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

    Key([mod], "Return", lazy.spawn("urxvt")),
    Key([mod], "p", lazy.spawn("dmenu_run")),

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

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


mouse = [
    # XXX: Drag+Click on same button are not working!
    #Click([mod], "Button1", lazy.window.bring_to_front()),
    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()),
]

group_names = [
    ("code1", {}),
Example #41
0
    # Swap panes of split stack
    #Key([sup, "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([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")),	
Example #42
0
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
try:
    from libqtile.manager import Key, Group
except ImportError:
    from libqtile.config import Key, Group

from libqtile.manager import Click, Drag, Screen

sup = "mod4"
alt = "mod1"

keys = [
 # 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()),
Example #43
0
    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()),
    Key([mod], "l", lazy.spawn(
        'alock -auth pam -bg image:center,file=' + image)),
    Key([mod], "space", lazy.nextlayout()),
    Key([mod], "Return", lazy.spawn('urxvt')),
    Key([mod], "w", lazy.window.kill()),
    Key([mod], "BackSpace", lazy.spawn(
        "dmenu_run -i -b -fn 'monofur:pixelsize=16:antialias=true'"
        " -p 'Run' -nf '#ffffff' -nb '#202020'")),
    Key([mod], "XF86AudioPlay", lazy.spawn(mpc + 'toggle')),
    Key([mod], "XF86AudioPrev", lazy.spawn(mpc + 'prev')),
    Key([mod], "XF86AudioNext", lazy.spawn(mpc + 'next')),
    Key([mod], "XF86AudioStop", lazy.spawn(mpc + 'stop')),
    Key([mod], "XF86AudioLowerVolume", lazy.spawn(mpc + 'volume -2')),
    Key([mod], "XF86AudioRaiseVolume", lazy.spawn(mpc + 'volume +2')),
]
Example #44
-1
 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)
     ]