Exemplo n.º 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
Exemplo n.º 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()),

        # 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
Exemplo n.º 3
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
Exemplo n.º 4
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())]
Exemplo n.º 5
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
Exemplo n.º 6
0
    #     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()),
    #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()),
Exemplo n.º 7
0
    #Key([mod], 'k', lazy.layout.down()),
    #Key([mod, 'shift'], 'j', lazy.layout.shuffle_up()),
    #Key([mod, 'shift'], 'k', lazy.layout.shuffle_down()),
    #Key([mod, 'shift'], 'g', lazy.layout.grow()),
    #Key([mod, 'shift'], 's', lazy.layout.shrink()),
    #Key([mod, 'shift'], 'n', lazy.layout.normalize()),
    #Key([mod, 'shift'], 'm', lazy.layout.maximize()),
    #Key([mod, 'shift'], 'space', lazy.layout.flip()),

    # Switch groups
    Key([mod], 'Left', lazy.screen.prevgroup()),
    Key([mod], 'Right', lazy.screen.nextgroup()),

    # Cycle layouts
    Key([mod], 'Up', lazy.nextlayout()),
    Key([mod], 'Down', lazy.prevlayout()),

    # Change window focus
    Key([mod], 'Tab', lazy.layout.next()),
    Key([mod, 'shift'], 'Tab', lazy.layout.previous()),

    # Switch focus to other screens
    Key([mod], 'h', lazy.to_screen(0)),  # left
    Key([mod], 'l', lazy.to_screen(1)),  # right

    # Commands: Application Launchers
    Key([mod], 'space', lazy.spawn(Commands.dmenu)),
    Key([mod], 'n', lazy.spawn(Commands.browser)),
    Key([mod], 'e', lazy.spawn(Commands.file_manager)),
    Key([mod], 'Return', lazy.spawn(Commands.terminal)),
Exemplo n.º 8
0
    keys.append(Key([mod], upkey, lazy.layout.up()))
    keys.append(Key([mod], downkey, lazy.layout.down()))
    for mod2 in [ctrl, alt, shift]:
        keys.append(Key([mod, mod2], upkey, lazy.layout.shuffle_up()))
        keys.append(Key([mod, mod2], downkey, lazy.layout.shuffle_down()))


# Switch between layouts.
layout_switch_keys = [
        # Super + the two keys on both sides of the bottom row of the keyboard to switch windows.
        ("period", "slash"),
        ("z", "x"),
]
for upkey, downkey in layout_switch_keys:
    keys.append(Key([mod], upkey, lazy.nextlayout()))
    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()))
Exemplo n.º 9
0
        [], "XF86AudioLowerVolume",
        lazy.spawn("amixer -q set Master 2- unmute")
    ),
    Key(
        [], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -q set Master 2+ unmute")
    ),
    Key(
        [], "XF86AudioMute",
        lazy.spawn("amixer -q set Master toggle")
    ),
    Key([MOD], "h",      lazy.to_screen(1)),
    Key([MOD], "l",      lazy.to_screen(0)),
    Key([MOD], "Return", lazy.spawn("gnome-terminal")),
    Key([MOD], "n",      lazy.nextlayout()),
    Key([MOD], "b",      lazy.prevlayout()),
    Key([MOD], "k",      lazy.window.kill()),

    Key([CTRL, ALT], "r", lazy.restart()),
]

groups = [Group(c) for c in "123456qwert7890"]
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))
    )

layouts = [
Exemplo n.º 10
0
        lazy.layout.shuffle_up()),       # Stack, xmonad-tall
    Key([mod, "shift"], "j",
        lazy.layout.shuffle_down()),     # Stack, xmonad-tall

    Key([mod, shift], "space",
        lazy.layout.rotate(),
        lazy.layout.flip()),             # xmonad-tall

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

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

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

    Key([mod], "x",              lazy.window.kill()),
    Key([mod, ctrl], "r",        lazy.restart()),

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

    # start specific apps
    Key([alt], "F2",
            lazy.spawn("dmenu_run -p run -fn 'Terminus-13' -nb '#202020' -nf '#ffffff'")),
    Key([mod], "Return",         lazy.spawn("urxvt")),
    Key([mod, alt], "Return",    lazy.group["code"].toscreen()),
    Key([mod], "b",              
            lazy.spawn("chromium-browser"),
Exemplo n.º 11
0
    Key( [ mod, "shift" ], "space",
         lazy.layout.rotate() ),

    # Toggle Split and Unsplit Stack
    Key( [ mod, "shift" ], "Return",
         lazy.layout.toggle_split() ),

    # Open Terminal
    Key( [ mod ], "Return",
         lazy.spawn(term) ),

    # Layout Toggle
    Key ( [ mod ], "Tab",
         lazy.nextlayout() ),
    Key ( [ mod, "shift" ], "Tab",
          lazy.prevlayout() ),

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

    # Start and Restart Hwaetile
    Key ( [ mod, "shift" ], "r",
          lazy.restart() ),
    Key ( [ mod, "shift" ], "q",
          lazy.shutdown() ),

    # Open Command Prompt
    Key ( [ mod ], "r",
          lazy.spawncmd() ),
Exemplo n.º 12
0
    #Key([mod], 'k', lazy.layout.down()),
    #Key([mod, 'shift'], 'j', lazy.layout.shuffle_up()),
    #Key([mod, 'shift'], 'k', lazy.layout.shuffle_down()),
    #Key([mod, 'shift'], 'g', lazy.layout.grow()),
    #Key([mod, 'shift'], 's', lazy.layout.shrink()),
    #Key([mod, 'shift'], 'n', lazy.layout.normalize()),
    #Key([mod, 'shift'], 'm', lazy.layout.maximize()),
    #Key([mod, 'shift'], 'space', lazy.layout.flip()),

    # Switch groups
    Key([mod], 'Left', lazy.screen.prevgroup()),
    Key([mod], 'Right', lazy.screen.nextgroup()),

    # Cycle layouts
    Key([mod], 'Up', lazy.nextlayout()),
    Key([mod], 'Down', lazy.prevlayout()),

    # Change window focus
    Key([mod], 'Tab', lazy.layout.next()),
    Key([mod, 'shift'], 'Tab', lazy.layout.previous()),

    # Switch focus to other screens
    Key([mod], 'h', lazy.to_screen(0)),  # left
    Key([mod], 'l', lazy.to_screen(1)),  # right

    # Commands: Application Launchers
    Key([mod], 'space', lazy.spawn(Commands.dmenu)),
    Key([mod], 'n', lazy.spawn(Commands.browser)),
    Key([mod], 'e', lazy.spawn(Commands.file_manager)),
    Key([mod], 'Return', lazy.spawn(Commands.terminal)),
Exemplo n.º 13
0
    Key([mod], "Return", lazy.spawn(TERMINAL)),
    Key([mod, shift], "Return", lazy.spawn(EDITOR)),

    Key([mod], "k", lazy.layout.up()),
    Key([mod], "j", lazy.layout.down()),
    Key([mod, "shift"], "k", lazy.layout.shuffle_up()),  # Stack, xmonad-tall
    Key([mod, "shift"], "j", lazy.layout.shuffle_down()),  # Stack, xmonad-tall
    Key([mod], "Tab", lazy.layout.next()),
    Key([mod,shift], "Tab", lazy.layout.previous()),
    Key([mod], "p", lazy.layout.previous()),
    Key([mod], "n", lazy.layout.next()),
    Key([mod, shift], "f", lazy.window.toggle_floating()),
    Key([mod, shift], "m", lazy.window.toggle_maximized()),

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

    Key([mod], "Left", lazy.group.prevgroup()),
    Key([mod], "Right", lazy.group.nextgroup()),

    #Key([mod,shift], "Left", lazy.to_next_screen()),
    #Key([mod,shift], "Right", lazy.to_prev_screen()),
    Key([mod], "o", lazy.to_next_screen()),
    #Key([mod,shift], "Right", lazy.to_prev_screen()),

    Key([mod, shift], "space", lazy.layout.rotate()),
    Key([mod, shift], "minus", lazy.layout.toggle_split()),

    # start specific apps
    Key([mod], "F1",              lazy.spawn(BROWSER)),
    Key([mod], "F2",              lazy.spawn(FILEMANAGER)),
Exemplo n.º 14
0
    # Key([mod, "control"], "Prior", lazy.layout.shift_up()),
    # Key([mod, "control"], "Next", lazy.layout.shift_down()),

    Key([mod], "Tab", lazy.group.prev_window()),
    Key([mod, "shift"], "Return", lazy.layout.rotate()),
    Key([mod, "shift"], "space", lazy.layout.toggle_split()),

    Key([mod], "o", lazy.next_screen()),

    Key([mod], "e",      lazy.spawn("/usr/local/bin/emacs")),
    Key([mod], "f",      lazy.spawn("firefox")),
    Key([mod, "shift"], "f", lazy.window.toggle_fullscreen()),
    Key([mod], "g",      lazy.spawn("google-chrome")),
    Key([mod], "Return", lazy.spawn("x-terminal-emulator")),
    Key([mod], "z",  lazy.nextlayout()),
    Key([mod, "shift"], "z",  lazy.prevlayout()),
    Key([mod, "control"], "space",  lazy.nextlayout()),
    Key([mod], "c",      lazy.window.kill()),
    Key([mod], "t",      lazy.window.disable_floating()),
    # Key([mod, "shift"], "t", lazy.window.enable_floating()),

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

    Key([mod], "Left", lazy.prevgroup()),
    Key([mod], "Right", lazy.nextgroup()),
]

if HOSTNAME.startswith('yoga'):
    keys += [