Пример #1
0
    # Other FN keys
    Key('<XF86MonBrightnessUp>', lazy.spawn(Commands.brightness_up)),
    Key('<XF86MonBrightnessDown>', lazy.spawn(Commands.brightness_down)),
    Key('<XF86Display>', lazy.spawn('arandr')),
    Key('<XF86Favorites>', lazy.spawn('touchpad_toggle')),

    # Screenshot
    Key('<Print>', lazy.spawn(Commands.screenshot_selection)),
    Key('S-<Print>', lazy.spawn(Commands.screenshot_all)),
    Key('A-<Print>', lazy.spawn(Commands.screenshot_window)),

    # DMENU
    Key("M-r", lazy.run_extension(extension.DmenuRun())),
    Key("M-A-w", lazy.run_extension(extension.WindowList(
        item_format="{group}: {window}",
        foreground=BLUE,
        selected_background=BLUE))),
    Key("M-C-c", lazy.run_extension(extension.Dmenu(
        dmenu_command="clipmenu",
        foreground=YELLOW,
        selected_background=YELLOW))),
    Key("M-A-p", lazy.run_extension(extension.Dmenu(
        dmenu_command="passmenu",
        foreground=RED,
        selected_background=RED))),
    Key("M-A-n", lazy.run_extension(extension.Dmenu(
        dmenu_command="networkmanager_dmenu",
        foreground=RED,
        selected_background=RED))),
    Key("M-A-m", lazy.run_extension(extension.CommandSet(
        commands={
Пример #2
0
                'logout': 'qtile-cmd -o cmd -f shutdown',
                'reload': 'qtile-cmd -o cmd -f restart',
            }, ))),
    # general volume
    Key([], "XF86AudioRaiseVolume", lazy.spawn("volumenotify +5")),
    Key([], "XF86AudioLowerVolume", lazy.spawn("volumenotify -5")),
    Key([], "XF86AudioMute",
        lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")),
    # music volume
    #    Key(["mod4"], "XF86AudioRaiseVolume", lazy.spawn("mpc volume +5")),
    #    Key(["mod4"], "XF86AudioLowerVolume", lazy.spawn("mpc volume -5")),
    Key([mod],
        "Tab",
        lazy.run_extension(
            extension.WindowList(item_format="{group}: {window}",
                                 foreground=BLUE,
                                 selected_background=BLUE)),
        desc='window list'),

    # Toggle between different layouts as defined below
    Key([mod, 'shift'], "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()),
]

group_names = ["1 ", "2 ", "3 ", "4 ", "5 ", "6 ", "7 ", "8 λ", "9 "]
groups = [Group(name, layout='monadtall') for name in group_names]
for i, name in enumerate(group_names):
    indx = str(i + 1)
Пример #3
0
def window_to_next_screen(qtile):
    i = qtile.screens.index(qtile.current_screen)
    if i + 1 != len(qtile.screens):
        group = qtile.screens[i + 1].group.name
        qtile.current_window.togroup(group)


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


keys = [
    Key([mod], 'b', lazy.run_extension(extension.WindowList())),
    # SUPER + FUNCTION KEYS
    Key([mod], "e", lazy.spawn('code')),
    Key([mod], "g", lazy.window.toggle_fullscreen()),
    Key([mod], "m", lazy.spawn('pragha')),
    Key([mod], "q", lazy.window.kill()),
    Key([mod], "r", lazy.spawn('rofi-theme-selector')),
    Key([mod], "w", lazy.spawn('firefox')),
    Key([mod], "v", lazy.spawn('nvim')),
    Key([mod], "Escape", lazy.spawn('xkill')),
    Key(["mod1"], "p", lazy.spawn('xprop')),
    Key([mod], "Return", lazy.spawn('alacritty')),
    # Key([mod], "space",
    #     lazy.spawn(home + '/.config/rofi/launchers/misc/launcher.sh')),
    Key([mod], "space", lazy.spawn("rofi -modi drun -show drun -show-icons")),
    Key([mod], "c", lazy.spawn('alacritty  -e cmus')),
Пример #4
0
        '/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next'
    )),

    # Spawn
    Key([mod], "Return",     lazy.spawn(terminal)),
    Key([mod], "f",          lazy.spawn(browser)),
    Key([mod], "e",          lazy.spawn(filemanager)),
    Key([mod], "r",          lazy.spawn("dmenu_run")),
    Key([mod, "shift"], "r", lazy.spawn("dmenu_sudo")),
    Key([mod], "F1",         lazy.spawn("dmenu_confedit")),
    Key([mod], "F2",         lazy.spawn("color-picker.sh")),
    Key([mod], "F3",         lazy.spawn("dmenu_unicode")),
    Key([], "Scroll_Lock",   lazy.spawn("clip2qr")),
    Key([], "Print",         lazy.spawn("screenshot")),
    Key([mod], "z",          lazy.spawn("pavucontrol")),
    Key([], 'F1',            lazy.run_extension(extension.WindowList(dmenu_font = 'JetBrains Mono'))),

    # Scratchpads
    Key([mod], "x", lazy.group['scratchpad'].dropdown_toggle('term')),
]

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

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

        # mod1 + shift + letter of group = move focused window to group
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name, switch_group=False)),
    ])
Пример #5
0
def window_list(**kwargs):
    return extension.WindowList(dmenu_command="rofi -dmenu -i", dmenu_lines=6, **kwargs)
Пример #6
0
    # Change Layout:
    Key("M-<Tab>", lazy.next_layout()),
    # Close focused window:
    Key("M-q", lazy.window.kill()),

    # Restart qtile in place:
    Key("M-C-r", lazy.restart()),

    # Open a run prompt:
    #Key("M- "r", lazy.spawncmd()),
    Key(
        "M-r",
        lazy.run_extension(
            extension.WindowList(item_format="{id}: {window}",
                                 dmenu_ignorecase=True,
                                 dmenu_prompt=" Avilable Windows"))),
]

groups = [
    Group("1", label=""),
    Group("2", matches=[Match(wm_class=["firefox"])], label=""),
    Group("3", matches=[Match(wm_class=["Emacs"])], label=""),
    Group("4", matches=[Match(wm_class=["libreoffice", "Discord"])],
          label=""),
    Group("5", matches=[Match(wm_class=["Thunderbird"])], label=""),
    Group("6", matches=[Match(wm_class=["code-oss"])], label=""),
]

for i in groups:
    keys.extend([
Пример #7
0
    Key([mod], "grave", toggle_scrachpad_on_main("term")),
    Key([mod], "BackSpace", lazy.next_screen()),
    Key([mod, ctrl], "BackSpace", switch_groups_between_screens()),
    Key([mod, shift], "BackSpace", window_to_next_screen()),
    Key([], 'XF86AudioRaiseVolume', lazy.spawn(Commands.volume_up)),
    Key([], 'XF86AudioLowerVolume', lazy.spawn(Commands.volume_down)),
    Key([], 'XF86AudioMute', lazy.spawn(Commands.volume_toggle)),
    Key([], 'XF86AudioNext', lazy.spawn("playerctl next")),
    Key([], 'XF86AudioPrev', lazy.spawn("playerctl previous")),
    Key([], 'XF86AudioPlay', lazy.spawn("playerctl play-pause")),
    Key([], 'XF86MonBrightnessUp', lazy.spawn("light -A 10")),
    Key([], 'XF86MonBrightnessDown', lazy.spawn("light -U 10")),
    Key([alt], 'Tab',
        lazy.run_extension(
            extension.WindowList(
                all_groups=True,
                dmenu_ignorecase=True,
            ))),
    Key([mod], 'space', switch_language()),
    Key([mod], '1', spawn_bin('screen_clip.sh')),
    Key([mod], '2', spawn_bin('screen_file.sh')),
    Key([mod, shift], '1', spawn_bin('screen_clip_full.sh')),
    Key([mod, shift], '2', spawn_bin('screen_file_full.sh')),
    Key([mod], 's', spawn_bin('screen_layouts/setup.sh')),
    Key([mod], 'p', spawn_bin('dmenu-session.sh')),
]

groups = [
    ScratchPad("scratchpad", [
        DropDown("term",
                 "alacritty -e zsh -c byobu",
                 opacity=0.8,
Пример #8
0
 # Toggle between different layouts as defined below
 Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
 Key([mod], "w", lazy.window.kill(), desc="Kill focused window"),
 Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"),
 Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
 Key([mod],
     "r",
     lazy.run_extension(
         extension.DmenuRun(dmenu_font="Hack:pixelsize=18",
                            dmenu_ignorecase=True)),
     desc="Spawn a command using a prompt widget"),
 Key([mod],
     "t",
     lazy.run_extension(
         extension.WindowList(
             dmenu_font="Hack:pixelsize=18",
             dmenu_ignorecase=True,
         )),
     desc="Swap window"),
 Key([mod, "control"],
     "space",
     lazy.spawn("toggle_keyboard"),
     desc="Toggle keyboard layout"),
 Key([mod, "shift"],
     "z",
     lazy.spawn("lock_and_suspend"),
     desc="lock screen"),
 Key([mod, "shift"],
     "a",
     lazy.spawn("autorandr -c"),
     desc="autorandr detected layout"),
 Key([mod, "shift", "control"],