Exemplo n.º 1
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)
Exemplo n.º 2
0
def init_keys(config):
    # Key bindings
    mod = config['mod']
    keys = [
        # WM control
        Key([mod, 'control'], 'r', lazy.restart()),
        Key([mod, 'control'], 'q', lazy.shutdown()),
        Key([mod], 'r', lazy.spawncmd()),
        Key([mod, 'shift'], 'c', lazy.window.kill()),

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

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

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

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

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

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

    return keys
Exemplo n.º 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.prev_screen()),
        Key([mod, "mod1"], "Right", lazy.next_screen()),
        Key([mod, "shift", "mod1"], "Left", window_to_previous_screen()),
        Key([mod, "shift", "mod1"], "Right", window_to_next_screen()),
        Key([mod], "t", switch_screens()),
        Key([mod], "Up", lazy.group.prev_window()),
        Key([mod], "Down", lazy.group.next_window()),
        Key([mod, "shift"], "Up", lazy.layout.shuffle_up()),
        Key([mod, "shift"], "Down", lazy.layout.shuffle_down()),
        Key([mod], "space", lazy.next_layout()),
        Key([mod], "f", lazy.window.toggle_floating()),
        Key([mod], "s", lazy.layout.toggle_split()),
        Key([mod], "r", lazy.spawncmd()),
        Key([mod], "u", lazy.spawn(browser)),
        Key([mod], "Return", lazy.spawn(terminal)),
        Key([mod], "BackSpace", lazy.window.kill()),
        Key([mod, "shift"], "r", lazy.restart()),
        Key([mod, "shift"], "q", lazy.shutdown()),
        Key([], "Print", lazy.spawn("gnome-screenshot -i")),
        Key([mod], "Print", lazy.spawn("gnome-screenshot -p")),
        Key([], "Scroll_Lock", lazy.spawn(screenlocker)),
        Key([mod], "Delete", lazy.spawn("amixer set Master toggle")),
        Key([mod], "Prior", lazy.spawn("amixer set Master 5+")),
        Key([mod], "Next", lazy.spawn("amixer set Master 5-")),
        Key([mod], "Insert", lazy.spawn("spotify-dbus playpause")),
        Key([mod], "End", lazy.spawn("spotify-dbus next")),
        Key([mod], "Home", lazy.spawn("spotify-dbus previous")),
    ]
    if DEBUG:
        keys += [
            Key([mod], "Tab", lazy.layout.next()),
            Key([mod, "shift"], "Tab", lazy.layout.previous()),
            Key([mod, "shift"], "f", lazy.layout.flip()),
            Key([mod, "shift"], "s",
                lazy.group["scratch"].dropdown_toggle("term"))
        ]
    return keys
Exemplo n.º 4
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
Exemplo n.º 5
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
Exemplo n.º 6
0
        lazy.layout.toggle_split()
    ),
    Key([mod], "Return", lazy.spawn("gnome-terminal")),
    Key(["control", "mod1"], "l", lazy.spawn("/home/mfa/bin/i3lock-fancy/lock")),

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

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

    # move cursor to other screen(s)
    Key([mod], "Up", lazy.prev_screen()),
    Key([mod], "Down", lazy.next_screen()),

    # Switch between windows in current stack pane
    Key([mod], 'Tab', lazy.layout.down()),
    Key([mod, 'shift'], 'Tab', lazy.layout.up()),

    Key(
        [mod], "F12",
        lazy.window.toggle_fullscreen()
    ),

    # music / mpd
    Key(
        [mod, "control"], "m",
        lazy.spawn("mpc toggle"),
Exemplo n.º 7
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([mod, "shift"], "Return", lazy.layout.toggle_split()),

    # Launch applications
    Key([mod], "Return", lazy.spawn("urxvt")),
    Key([mod], "e", lazy.spawn("emacs")),

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

    # Switch between monitors
    Key([mod], "Right", lazy.next_screen()),
    Key([mod], "Left", lazy.prev_screen()),
    Key([mod, "control"], "l", lazy.next_screen()),
    Key([mod, "control"], "h", lazy.prev_screen()),

    # Move windows between monitors
    Key([mod, "shift"], "Right", window_to_next_screen()),
    Key([mod, "shift"], "Left", window_to_prev_screen()),
    Key([mod, "control", "shift"], "l", window_to_next_screen()),
    Key([mod, "control", "shift"], "h", window_to_prev_screen()),

    # Commands
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    # Key([mod], "r", lazy.spawncmd()),
    Key([mod, "control"], "w", lazy.window.kill()),
    Key([mod], "w", lazy.spawn(f"rofi -show window -font '{theme.font} 14'")),
Exemplo n.º 8
0
        # Keyboard focus to screen(0)
        lazy.to_screen(0)),
    Key(
        [mod],
        "e",
        # Keyboard focus to screen(1)
        lazy.to_screen(1)),
    Key(
        [mod],
        "r",
        # Keyboard focus to screen(2)
        lazy.to_screen(2)),

    # Switch focus of monitors
    Key([mod], "period", lazy.next_screen()),
    Key([mod], "comma", lazy.prev_screen()),
    Key([mod], "Tab", lazy.screen.toggle_group()),
    Key([mod2], "Tab", lazy.prev_screen()),

    # Treetab controls
    # Key([mod, "control"], "k",
    #     lazy.layout.section_up()                # Move up a section in treetab
    #     ),
    # Key([mod, "control"], "j",
    #     lazy.layout.section_down()              # Move down a section in treetab
    #     ),

    # Window controls
    Key([mod], "h", lazy.layout.left()),
    Key([mod], "l", lazy.layout.right()),
    Key([mod], "j", lazy.layout.down()),
Exemplo n.º 9
0
    def init_keys(self, my_term, script_path, mod):

        return [
            # Window manager controls
            Key([mod, 'control'], 'r', lazy.restart()),
            # Key([mod, 'control'], 'q', lazy.shutdown()),
            Key([mod], 'r', lazy.spawn(script_path + 'dmenu_recent.sh')),
            Key([mod, "mod1"], 'r',
                lazy.spawn(script_path + 'dmenu_removeRecent.sh')),
            Key([mod], 'Return', lazy.spawn(my_term)),
            Key([mod], 'q', lazy.window.kill()),
            Key([mod], 'Tab', lazy.layout.next()),
            #Key([mod], 'Left', lazy.screen.prev_group()),
            #Key([mod], 'Right', lazy.screen.next_group()),
            Key([mod], "Left", lazy.prev_screen()),
            Key([mod], "Right", lazy.next_screen()),
            Key([mod, "shift"], "Left", Function.window_to_prev_screen()),
            Key([mod, "shift"], "Right", Function.window_to_next_screen()),

            # Layout modification
            Key([mod, 'control'], 'f', 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, 'shift'], 'k', lazy.layout.shuffle_down()),
            Key([mod, 'shift'], 'j', lazy.layout.shuffle_up()),

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

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

            #############################################################################
            # Own shortcuts                                                             #
            #############################################################################
            # # emacs
            Key(['control', 'mod1'], 'e', lazy.spawn('emacs')),
            # pcmanfm
            Key([mod], 'e', lazy.spawn(script_path + 'dmenu_filemanager.sh')),
            # firefox
            Key([mod, 'control'], 'Return', lazy.spawn('firefox')),
            # logout
            Key([mod, 'shift'], 'q',
                lazy.spawn(script_path + 'dmenu_exit.sh')),
            Key([mod], 'l', lazy.spawn(script_path + 'lockscreen.sh')),
            # brightness control
            Key([], 'XF86MonBrightnessDown',
                lazy.spawn(script_path + 'brightness.sh -')),
            Key([], 'XF86MonBrightnessUp',
                lazy.spawn(script_path + 'brightness.sh +')),
            # volume control
            Key([], 'XF86AudioRaiseVolume',
                lazy.spawn(script_path + 'adjust_volume.sh +')),
            Key([], 'XF86AudioLowerVolume',
                lazy.spawn(script_path + 'adjust_volume.sh -')),
            Key([], 'XF86AudioMute',
                lazy.spawn(script_path + 'adjust_volume.sh m')),
            # screenshots
            Key([mod], 's', lazy.spawn(script_path + 'screenshot_full.sh')),
            Key([mod, 'shift'], 's',
                lazy.spawn(script_path + 'screenshot_region.sh')),
            Key([], 'XF86AudioPlay',
                lazy.spawn(script_path + 'mpc_playpause.sh')),
            Key([], 'XF86AudioNext', lazy.spawn('mpc next')),
            Key([], 'XF86AudioPrev', lazy.spawn('mpc prev')),
            # screens and monitors
            Key([mod], 'p',
                lazy.spawn(script_path + 'dmenu_displayselect.sh')),
        ]
Exemplo n.º 10
0
 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')),
 # SUPER + SHIFT KEYS
 Key([mod, "shift"], "Return", lazy.spawn('thunar')),
 Key([mod, "shift"], "r", lazy.restart()),
 Key([mod, "shift"], "w", lazy.shutdown()),
 # CONTROL + ALT KEYS
 Key(["mod1", "control"], "r", lazy.spawn('rofi-theme-selector')),
 Key(["mod1", "control"], "u", lazy.spawn('pavucontrol')),
 Key(["mod1", "control"], "Return", lazy.spawn('alacritty')),
 # MOVE TO SCREEN
 Key([mod, "mod1"], "h", lazy.prev_screen()),
 Key([mod, "mod1"], "l", lazy.next_screen()),
 # SCREENSHOTS
 Key(["shift"], "Print", lazy.spawn('flameshot gui')),
 Key([], "Print", lazy.spawn('xfce4-screenshooter')),
 # INCREASE/DECREASE BRIGHTNESS
 Key([], "XF86MonBrightnessUp", lazy.spawn("light -A 5")),
 Key([], "XF86MonBrightnessDown", lazy.spawn("light -U 5")),
 Key([mod], "4", lazy.spawn("light -A 5")),
 Key([mod], "3", lazy.spawn("light -U 5")),
 # INCREASE/DECREASE/MUTE VOLUME
 Key([], "XF86AudioMute",
     lazy.spawn('sh ' + home + '/.config/scripts/mute-script.sh')
     ),
 Key([], "XF86AudioLowerVolume", lazy.spawn("pamixer -d 5")),
 Key([], "XF86AudioRaiseVolume", lazy.spawn("pamixer -i 5")),
Exemplo n.º 11
0
    Key([mod], "F4", lazy.window.kill()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "w", lazy.screen.togglegroup()),

    # cycle to previous and next group
    Key([mod], "h", lazy.screen.prev_group(skip_managed=True)),
    Key([mod], "l", lazy.screen.next_group(skip_managed=True)),
    Key([sup], "f", lazy.window.toggle_fullscreen()),
    Key([sup], "t", lazy.window.toggle_floating()),

    # Process `gnome-screensaver` must run
    Key([mod, sup], "l", lazy.spawn(lock)),

    # Multihead magic
    Key([sup], "h", lazy.prev_screen()),
    Key([sup], "l", lazy.next_screen()),

    # Function keys
    Key([], "XF86AudioRaiseVolume", lazy.spawn(vol_up)),
    Key([], "XF86AudioLowerVolume", lazy.spawn(vol_down)),
    Key([], "XF86AudioMute", lazy.spawn(mute)),
    Key([], "XF86MonBrightnessUp", lazy.spawn(bright_up)),
    Key([], "XF86MonBrightnessDown", lazy.spawn(bright_down)),
    Key([], "Print", lazy.spawn(scrot)),
    Key([sup], "Print", lazy.spawn(scrot_all)),

    # Multimedia
    Key([sup], "Left", lazy.spawn(player_prev)),
    Key([sup], "Right", lazy.spawn(player_next)),
    Key([sup], "Down", lazy.spawn(player_play_pause)),
Exemplo n.º 12
0
    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()),
    Key([MODKEY], 'l', lazy.layout.right()),
    Key([MODKEY], 'w', lazy.prev_screen()),
    Key([MODKEY], 'e', lazy.next_screen()),
    Key([WIN], '1', lazy.to_screen(0)),
    Key([WIN], '2', lazy.to_screen(1)),
    Key([WIN], '3', lazy.to_screen(2)),

    # Move Window
    Key([MODKEY, SHIFT], 'j', lazy.layout.shuffle_down()),
    Key([MODKEY, SHIFT], 'k', lazy.layout.shuffle_up()),
    Key([MODKEY], 'i', lazy.layout.swap_main()),

    # Alter Window Size
    Key([MODKEY, SHIFT], 'h', lazy.layout.shrink()),
    Key([MODKEY, SHIFT], 'l', lazy.layout.grow()),
    Key([MODKEY, SHIFT], 'n', lazy.layout.reset()),
    Key([MODKEY], 'm', lazy.layout.maximize()),
Exemplo n.º 13
0
keys = [

    # SUPER + FUNCTION KEYS
    Key([mod], "f", lazy.window.toggle_fullscreen()),
    Key([mod], "q", lazy.window.kill()),
    Key([mod, "shift"], "q", lazy.window.kill()),
    Key([mod, "shift"], "r", lazy.restart()),

    # QTILE LAYOUT KEYS
    Key([mod], "n", lazy.layout.normalize()),
    Key([mod], "space", lazy.next_layout()),

    # CHANGE SCREENS
    Key([mod], "Tab", lazy.next_screen()),
    Key([mod, "shift"], "Tab", lazy.prev_screen()),

    # CYCLE WINDOWS
    Key(["mod1"], "Tab", lazy.group.next_window()),
    Key(["mod1", "shift"], "Tab", lazy.group.prev_window()),

    # CHANGE FOCUS
    Key([mod], "Up", lazy.layout.up()),
    Key([mod], "Down", lazy.layout.down()),
    Key([mod], "Left", lazy.layout.left()),
    Key([mod], "Right", lazy.layout.right()),
    Key([mod], "k", lazy.layout.up()),
    Key([mod], "j", lazy.layout.down()),
    Key([mod], "h", lazy.layout.left()),
    Key([mod], "l", lazy.layout.right()),
Exemplo n.º 14
0
 ('A-C-l', lazy.spawn('i3lock -i sajat/bg.png -c 000000')),
 ('M-C-r', lazy.restart()),
 ('M-<BackSpace>', lazy.layout.rotate()),
 ('M-S-<space>', lazy.layout.toggle_split()),
 ('M-A-<space>', lazy.next_layout()),
 ('M-f', lazy.window.toggle_fullscreen()),
 ('M-S-f', lazy.window.toggle_floating()),
 ('M-C-f', lazy.window.bring_to_front()),
 ('M-<grave>', lazy.window.bring_to_front()),
 ('M-<Left>', to_prev_used_group()),
 ('M-<Right>', to_next_used_group()),
 ('M-C-<Left>', lazy.screen.prev_group()),
 ('M-C-<Right>', lazy.screen.next_group()),
 ('M-S-<Left>', window_to_prev_group()),
 ('M-S-<Right>', window_to_next_group()),
 ('M-A-<Left>', lazy.prev_screen()),
 ('M-A-<Right>', lazy.next_screen()),
 ('A-<Tab>', lazy.group.next_window()),
 ('A-S-<Tab>', lazy.group.prev_window()),
 ('M-w', lazy.window.kill()),
 ('M-C-h', lazy.layout.grow_left(), lazy.layout.decrease_ratio(),
  lazy.layout.grow_width(-30)),  # dvorak h
 ('M-C-j', lazy.layout.grow_down(), lazy.layout.decrease_nmaster(),
  lazy.layout.grow_height(-30)),  # dvorak j
 ('M-C-k', lazy.layout.grow_up(), lazy.layout.increase_nmaster(),
  lazy.layout.grow_height(30)),  # dvorak k
 ('M-C-l', lazy.layout.grow_right(), lazy.layout.increase_ratio(),
  lazy.layout.grow_width(30)),  # dvorak l
 ('M-h', lazy.layout.left(), lazy.layout.previous()),  # h
 ('M-j', lazy.layout.down()),  # j
 ('M-k', lazy.layout.up()),  # k
Exemplo n.º 15
0
    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()),
    Key([MODKEY], 'l', lazy.layout.right()),
    Key([MODKEY], 'w', lazy.prev_screen()),
    Key([MODKEY], 'e', lazy.next_screen()),
    Key([WIN], '1', lazy.to_screen(0)),
    Key([WIN], '2', lazy.to_screen(1)),
    Key([WIN], '3', lazy.to_screen(2)),

    # Move Window
    Key([MODKEY, SHIFT], 'j', lazy.layout.shuffle_down()),
    Key([MODKEY, SHIFT], 'k', lazy.layout.shuffle_up()),
    Key([MODKEY], 'i', lazy.layout.swap_main()),

    # Alter Window Size
    Key([MODKEY, SHIFT], 'h', lazy.layout.shrink()),
    Key([MODKEY, SHIFT], 'l', lazy.layout.grow()),
    Key([MODKEY, SHIFT], 'n', lazy.layout.reset()),
    Key([MODKEY], 'm', lazy.layout.maximize()),
Exemplo n.º 16
0
from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget

from typing import List  # noqa: F401

mod = "mod4"

keys = [
    # QTile
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod, "shift"], "c", lazy.window.kill()),
    # Screen
    Key([mod, "control"], "j", lazy.next_screen()),
    Key([mod, "control"], "k", lazy.prev_screen()),
    # Layout
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod], "j", lazy.layout.down()),
    Key([mod], "k", lazy.layout.up()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    Key(
        [mod],
        "h",
        lazy.layout.shrink_main(),
    ),
    Key(
        [mod],
        "l",
Exemplo n.º 17
0
dgroups_key_binder = None
dgroups_app_rules = []
main = None
follow_mouse_focus = False
bring_front_click = False
cursor_warp = False
floating_layout = layout.Floating()
auto_fullscreen = True
wmname = "qtile"

keys = [
    # Switch between windows in current stack pane
    Key([mod], "k", lazy.layout.next()),
    Key([mod], "j", lazy.layout.previous()),
    Key([mod], "l", lazy.next_screen()),
    Key([mod], "o", lazy.prev_screen()),
    Key([mod], "1", lazy.to_screen(1)),
    Key([mod], "2", lazy.to_screen(0)),
    Key([mod], "3", lazy.to_screen(2)),

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

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

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),
Exemplo n.º 18
0
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([], 'Print', lazy.spawn('scrot -s ')),

    # 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(TERMINAL_EMULATOR)),
    Key([WIN], "l", lazy.spawn('xlock')),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod], "w", lazy.window.kill()),
    Key([CTRL, mod], "j", lazy.next_screen()),
    Key([CTRL, mod], "k", lazy.prev_screen()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
    Key([ALT, CTRL], 's', lazy.spawn('spotify')),
    Key([ALT, CTRL], 'f', lazy.spawn('firefox')),
    Key([ALT, CTRL], 'a', lazy.spawn('arandr')),
    Key([ALT, CTRL], 'c', lazy.spawn('chromium')),
    Key([ALT, CTRL], 'z', lazy.spawn('zulip')),
    Key([ALT, CTRL], 'p', lazy.spawn('postman')),
    Key([ALT, CTRL], 't', lazy.spawn('thunderbird')),
    Key([ALT, CTRL], 'n', lazy.spawn('nm-applet')),
    Key([ALT, CTRL], 'k', lazy.spawn('keepassxc')),
]

groups = [
Exemplo n.º 19
0
 Key([mod], "Tab", lazy.next_layout(), desc='Toggle through layouts'),
 Key([mod, "shift"], "c", 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(["control", "shift"],
     "e",
     lazy.spawn("emacsclient -c -a emacs"),
     desc='Doom Emacs'),
 ### Switch focus to specific monitor (out of three)
 Key([mod], "w", lazy.to_screen(0), desc='Keyboard focus to monitor 1'),
 Key([mod], "e", lazy.to_screen(1), desc='Keyboard focus to monitor 2'),
 Key([mod], "r", lazy.to_screen(2), desc='Keyboard focus to monitor 3'),
 ### Switch focus of monitors
 Key([mod], "period", lazy.next_screen(),
     desc='Move focus to next monitor'),
 Key([mod], "comma", lazy.prev_screen(), desc='Move focus to prev monitor'),
 ### Treetab controls
 Key([mod, "control"],
     "k",
     lazy.layout.section_up(),
     desc='Move up a section in treetab'),
 Key([mod, "control"],
     "j",
     lazy.layout.section_down(),
     desc='Move down a section in treetab'),
 ### Window controls
 Key([mod],
     "k",
     lazy.layout.down(),
     desc='Move focus down in current stack pane'),
 Key([mod],
Exemplo n.º 20
0
    Key([mod], "F7", lazy.spawn('virtualbox')),
    Key([mod], "F8", lazy.spawn('thunar')),
    Key([mod], "F9", lazy.spawn('evolution')),
    #Key([mod], "F10", lazy.spawn("spotify")),
    Key([mod], "F10", lazy.spawn("alacritty -e musikcube")),
    Key([mod], "F11", lazy.spawn('rofi -show run -fullscreen')),
    Key([mod], "F12", lazy.spawn('rofi-theme-selector')),
    Key([mod], "d", lazy.spawn("dmenu_run -fn 'pixelsize=18'")),
    Key([mod], "apostrophe",
        lazy.spawn('xfce4-terminal --drop-down -e "bc -q"')),
    ### Switch focus of monitors
    Key([mod], "period", lazy.next_screen(),
        desc='Move focus to next monitor'),
    Key([mod],
        "semicolon",
        lazy.prev_screen(),
        desc='Move focus to prev monitor'),

    # SUPER + SHIFT KEYS
    Key([mod, "shift"], "Return", lazy.spawn('thunar')),
    Key([mod, "shift"], "z",
        lazy.spawn('sh /mnt/g/git-home/bash-script/tick_dmenu.sh')),
    Key([mod, "shift"], "d", lazy.spawn("dmenu_run -c -bw 2 -l 20 -g 4")),
    Key([mod, "shift"], "q", lazy.window.kill()),
    Key([mod, "shift"], "r", lazy.restart()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "shift"], "x", lazy.shutdown()),
    Key([mod, "shift"], "m", lazy.spawn('sh /mnt/d/WSL/scripts/dmenuumount')),
    Key([mod, "shift"], "e",
        lazy.spawn(
            'sh /mnt/d/WSL/test/suckless/voidrice/.local/bin/dmenuunicode')),
Exemplo n.º 21
0
    Key([MOD], "f", lazy.window.toggle_fullscreen()),

    # 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(TERMINAL)),
    Key([ALT], "Return", lazy.spawn(ALTTERMINAL)),
    Key([MOD], "b", lazy.spawn(BROWSER)),
    Key([ALT], "b", lazy.spawn(ALTBROWSER)),

    # Toggle between different layouts
    Key([MOD], "Tab", lazy.next_layout()),
    Key([MOD], "q", lazy.window.kill()),
    Key([MOD, "shift", "control"], "Up", lazy.prev_screen(),
        lazy.function(lambda x: updateGroupWidgets())),
    Key([MOD, "shift", "control"], "Down", lazy.next_screen(),
        lazy.function(lambda x: updateGroupWidgets())),
    Key([MOD, "shift", "control"], "Right",
        lazy.function(lambda x: next_prev_group(x, next=True)),
        lazy.function(lambda x: updateGroupWidgets()), changeWallpaper),
    Key([MOD, "shift", "control"], "Left",
        lazy.function(lambda x: next_prev_group(x, next=False)),
        lazy.function(lambda x: updateGroupWidgets()), changeWallpaper),
    Key([MOD], "u", lazy.next_urgent(),
        lazy.function(lambda x: updateGroupWidgets())),
    Key([], "XF86AudioMute", lazy.function(lambda x: setMute(2)),
        lazy.function(lambda x: updateVolumeWidgets())),
    Key([MOD], "z", lazy.function(lambda x: setMute(2)),
        lazy.function(lambda x: updateVolumeWidgets())),
Exemplo n.º 22
0
            "/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next")),
    Key([], "XF86AudioPrev",
        lazy.spawn(
            "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify "
            "/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous")),

    # == backlight
    # yaourt -S light-git
    Key([], "XF86MonBrightnessUp",
        lazy.spawn("light -A 5")),
    Key([], "XF86MonBrightnessDown",
        lazy.spawn("light -U 5")),

    # == toggle screens
    Key([mod], "twosuperior", lazy.next_screen()),
    Key([mod, "shift"], "twosuperior", lazy.prev_screen()),
    Key([mod], "g", lazy.screen.togglegroup()),
    Key([mod, "shift"], "g", lazy.switchgroup()),

    # == keys for groups
    Key([mod], "u", lazy.next_urgent()),
    Key([mod], "Left", lazy.screen.prev_group(skip_managed=True)),
    Key([mod], "Right", lazy.screen.next_group(skip_managed=True)),

    # keys for FR keymap, strange that "1", "2", does not work....
    # TODO: something to detect keymap and attrib the good keys automatically ?
    # "1"
    Key([mod], "ampersand", lazy.group["main"].toscreen()),
    Key([mod, "shift"], "ampersand", lazy.window.togroup("main")),
    # "2"
    Key([mod], "eacute", lazy.group["main2"].toscreen()),
Exemplo n.º 23
0
            qtile.groups[index - 1].cmd_toscreen()
        else:
            qtile.groups[len(qtile.groups) - 1].cmd_toscreen()

    return __inner


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

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

    # Switch between windows in current stack pane
    Key([mod], "h", lazy.layout.left()),
    Key([mod], "l", lazy.layout.right()),
    Key([mod], "j", lazy.layout.down()),
    Key([mod], "k", lazy.layout.up()),
    Key([mod, "shift"], "h", lazy.layout.swap_left()),
    Key([mod, "shift"], "l", lazy.layout.swap_right()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
    Key([mod], "space", lazy.layout.next()),
Exemplo n.º 24
0
    def init_keys(self):

        # Key alias
        mod = "mod4"
        alt = "mod1"
        altgr = "mod5"

        return [
            # On root
            Key([mod, altgr], "Insert", lazy.restart()),  # Restart Qtile
            Key([mod, altgr], "Delete", lazy.shutdown()),  # Shutdown Qtile
            Key([mod, altgr], "p", lazy.spawncmd()),  # Launch Qtile prompt

            # On window
            Key([mod], "Home",
                lazy.window.bring_to_front()),  # Bring window to front
            Key([mod], "End",
                lazy.group[""].toscreen()),  # Go to minimized windows gruop
            Key([mod, "shift"], "End",
                lazy.window.togroup("")),  # Move to minimized windows group
            Key([mod, "control"], "End", lazy.window.togroup(""), lazy.
                group[""].toscreen()),  # Move with to minimized windows group
            # Key([mod, alt], "End",
            # 	lazy.window.toggle_minimize()),				# Toogle minimize
            Key([mod], "j", lazy.layout.down()),  # Switch to next window
            Key([mod], "k", lazy.layout.up()),  # Switch to previous window
            Key([mod, "shift"], "j", lazy.layout.shuffle_down()
                ),  # Move windows down in current stack
            Key([mod, "shift"], "k",
                lazy.layout.shuffle_up()),  # Move windows up in current stack
            Key([mod, "control"], "j", lazy.layout.client_to_previous()
                ),  # Move window to previous stack side
            Key([mod, "control"], "k", lazy.layout.client_to_next()
                ),  # Move window to next stack side
            Key([alt], "Tab",
                lazy.group.next_window()),  # Switch focus to other window
            Key([alt, "shift"], "Tab",
                lazy.group.prev_window()),  # Switch focus to other window
            Key([mod, altgr], "Tab", lazy.group.next_window(),
                lazy.window.bring_to_front()
                ),  # Switch focus to other window + front
            Key([mod, altgr, "shift"], "Tab", lazy.group.prev_window(),
                lazy.window.bring_to_front()
                ),  # Switch focus to other window + front
            Key([mod], "w", lazy.window.kill()),  # Kill active window
            Key([mod, alt], "w", lazy.spawn("xkill")),  # Terminate program
            Key([mod, "shift"], "w", Function.kill_all_windows_minus_current()
                ),  # Kill all windows except current
            Key([mod, "control"], "w",
                Function.kill_all_windows()),  # Kill all windows
            Key([mod, "control"], "Return",
                lazy.window.toggle_floating()),  # Toggle floating

            # On layout
            Key([mod], "backslash", lazy.layout.swap_main()
                ),  # Swap current window to main pane (Xmonad)
            Key([mod], "m",
                lazy.layout.next()),  # Move focus to another stack (Stack)
            Key([mod], "h",
                lazy.layout.shrink()),  # Shrink size of window (Xmonad)
            Key([mod], "l",
                lazy.layout.grow()),  # Grow size of window (Xmonad)
            Key(
                [mod, "shift"],
                "h",
                # lazy.layout.decrease_nmaster(),			# Decrease number in master pane (Tile)
                lazy.layout.shrink_main()
            ),  # Shrink size of main window (Xmonad)
            Key(
                [mod, "shift"],
                "l",
                # lazy.layout.increase_nmaster(),			# Increase number in master pane (Tile)
                lazy.layout.grow_main()),  # Grow size of main window (Xmonad)
            Key([mod, "shift"], "n", lazy.layout.normalize()
                ),  # Restore all windows to default size ratios
            Key([mod, "shift"], "m", lazy.layout.maximize()
                ),  # Toggle a window between min and max sizes
            Key(
                [mod, "shift"],
                "space",
                lazy.layout.rotate(),  # Swap panes of split stack (Stack)
                lazy.layout.flip()),  # Switch side main pane occupies (Xmonad)
            Key([mod, "shift"], "Return", lazy.layout.toggle_split()
                ),  # Toggle between split and unsplit (Stack)
            Key([mod], "Up", lazy.prev_layout()),  # Toggle through layouts
            Key([mod], "Down", lazy.next_layout()),  # Toggle through layouts

            # On group
            Key([mod], "z",
                lazy.screen.togglegroup()),  # Move to previous visited group
            Key([mod, "shift"], "i",
                lazy.next_urgent()),  # Move to next urgent group
            Key([mod], "Left",
                lazy.screen.prev_group()),  # Move to previous group
            Key([mod], "Right",
                lazy.screen.next_group()),  # Move to next group
            Key([mod, "shift"], "Left", Function.window_to_prev_group()
                ),  # Move window to previous group
            Key([mod, "shift"], "Right",
                Function.window_to_next_group()),  # Move window to next group
            Key([mod, "control"], "Left", Function.window_to_prev_group(),
                lazy.screen.prev_group()
                ),  # Move with window to previous group
            Key([mod, "control"], "Right", Function.window_to_next_group(),
                lazy.screen.next_group()),  # Move with window to next group

            # On screen
            Key([mod], "Page_Up",
                lazy.prev_screen()),  # Switch to previous screen
            Key([mod], "Page_Down",
                lazy.next_screen()),  # Switch to next screen
            Key([mod, "shift"], "Page_Up", Function.window_to_prev_screen()
                ),  # Move window to previous screen
            Key([mod, "shift"], "Page_Down", Function.window_to_next_screen()
                ),  # Move window to next screen
            Key([mod, "control"], "Page_Up",
                Function.swap_prev_screen()),  # Swap active groups on screens
            Key([mod, "control"], "Page_Down",
                Function.swap_next_screen()),  # Swap active groups on screens

            # On bar
            Key([mod, alt], "slash",
                lazy.hide_show_bar("all")),  # Toggle all screen bars
            # Key([mod, "shift"], "slash",
            # 	lazy.hide_show_bar("top")),					# Toggle top screen bar
            # Key([mod, "control"], "slash",
            # 	lazy.hide_show_bar("bottom"))				# Toggle bottom screen bar
        ]
Exemplo n.º 25
0
        ([mod, "shift"], "f", lazy.window.toggle_floating()),

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

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

        # Kill window
        ([mod], "q", lazy.window.kill()),

        # Switch focus of monitors
        ([mod], "period", lazy.next_screen()),
        ([mod], "comma", lazy.prev_screen()),

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

        # ------------ App Configs ------------

        # Menu
        ([mod], "m", lazy.spawn("rofi -show drun")),
        ([mod], lazy.spawn("rofi -show drun")),

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

        # Browser
Exemplo n.º 26
0
    def init_keys(self):
        alt = self.alt
        mod = self.mod  # Sets mod key to SUPER/WINDOWS
        altgr = self.altgr
        shift = self.shift
        ctrl = self.ctrl

        mainTerminal = self.mainTerminal
        secTerminal = self.secTerminal

        # START_KEYS

        keys = [
            # The essentials
            Key([mod], "Return", lazy.spawn(mainTerminal + " -e zsh"),
                'Launches My Terminal'),
            Key([mod, shift], "Return", lazy.spawn("dmenu_run -p 'Run: '"),
                'Run Launcher'),
            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([ctrl, shift], "v", lazy.spawn("vi"), 'Vim'),
            Key([ctrl, shift], "e", lazy.spawn("emacsclient -c -a emacs"),
                'Doom Emacs'),

            # Switch focus to specific monitor (out of two)
            Key([mod], "w", lazy.to_screen(0), 'Keyboard focus to monitor 1'),
            Key([mod], "e", lazy.to_screen(1), 'Keyboard focus to monitor 2'),
            #Key([mod], "r", lazy.to_screen(2), desc='Keyboard focus to monitor 3'),

            # Switch focus of monitors
            Key([mod], "period", lazy.next_screen(),
                'Move focus to next monitor'),
            Key([mod], "comma", lazy.prev_screen(),
                'Move focus to prev monitor'),

            # Treetab controls
            Key([mod, shift], "h", lazy.layout.move_left(),
                'Move up a section in treetab'),
            Key([mod, shift], "l", lazy.layout.move_right(),
                'Move down a section in treetab'),

            # Window controls
            Key([mod], "j", lazy.layout.down(),
                'Move focus down in current stack pane'),
            Key([mod], "k", lazy.layout.up(),
                'Move focus up in current stack pane'),
            Key([mod, shift],
                "j",
                lazy.layout.shuffle_down(),
                lazy.layout.section_down(),
                desc='Move windows down in current stack'),
            Key([mod, shift],
                "k",
                lazy.layout.shuffle_up(),
                lazy.layout.section_up(),
                desc='Move winum_screensndows up in current stack'),
            Key([mod],
                "h",
                lazy.layout.shrink(),
                lazy.layout.decrease_nmaster(),
                desc=
                'Shrink window (MonadTall), decrease number in master pane (Tile)'
                ),
            Key([mod],
                "l",
                lazy.layout.grow(),
                lazy.layout.increase_nmaster(),
                desc=
                'Expand window (MonadTall), increase number in master pane (Tile)'
                ),
            Key([mod], "n", lazy.layout.normalize(),
                'normalize window size ratios'),
            Key([mod], "m", lazy.layout.maximize(),
                'toggle window between minimum and maximum sizes'),
            Key([mod, shift], "f", lazy.window.toggle_floating(),
                'toggle floating'),
            Key([mod], "f", lazy.window.toggle_fullscreen(),
                'toggle fullscreen'),

            # Stack controls
            Key([mod, shift],
                "Tab",
                lazy.layout.rotate(),
                lazy.layout.flip(),
                desc='Switch which side main pane occupies (XmonadTall)'),
            Key([mod], "space", lazy.layout.next(),
                'Switch window focus to other pane(s) of stack'),
            Key([mod, shift], "space", lazy.layout.toggle_split(),
                'Toggle between split and unsplit sides of stack'),

            # Move windows to different physical screens
            Key([mod, shift], "comma",
                lazy.function(Library.window_to_previous_screen)),
            Key([mod, shift], "period",
                lazy.function(Library.window_to_next_screen)),
            Key([mod], "t", lazy.function(Library.switch_screens)),
            Key([mod, shift], "slash", lazy.spawn('qtile_keys.sh')),
            # Custom/App key bindiNGS
            #KeyChord([ctrl], "x", [
            #    Key([], "l", lazy.spawn("libreoffice --writer")),
            #]),

            # a-z applications
            Key([mod, alt], "a", lazy.spawn(secTerminal)),
            Key([mod, alt], "b", lazy.spawn("brave")),
            Key([mod, alt], "c", lazy.spawn("code")),
            Key([mod, alt], "d", lazy.spawn("robo3t")),
            Key([mod, alt], "e", lazy.spawn("thunar")),
            Key([mod, alt], "f",
                lazy.spawn("kitty -e vifm ~/Documents ~/Downloads")),
            Key([mod, alt], "g", lazy.spawn("gimp")),
            Key([mod, alt], "h", lazy.spawn("bleachbit")),
            Key([mod, alt], "i", lazy.spawn("nitrogen")),
            Key([mod, alt], "k", lazy.spawn("inkscape")),
            Key([mod, alt], "o", lazy.spawn("postman")),
            Key([mod, alt], "p", lazy.spawn("brave --incognito")),
            Key([mod, alt], "r", lazy.spawn("rambox")),
            Key([mod, alt], "s", lazy.spawn("obs")),
            Key([mod, alt], "t", lazy.spawn("teams")),
            Key([mod, alt], "u", lazy.spawn("audacity")),
            Key([mod, alt], "v", lazy.spawn("vlc -q --no-one-instance")),
            Key([mod, alt], "m", lazy.spawn("remmina")),
            Key([mod, alt], "w", lazy.spawn("libreoffice --writer")),
            Key([mod, alt], "x", lazy.spawn("libreoffice --calc")),
            Key([mod, alt], "y", lazy.spawn("lbry")),

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

            # SCREENSHOTS
            Key([], "Print",
                lazy.spawn(
                    "scrot 'ArcoLinux-%Y-%m-%d-%s_screenshot_$wx$h.jpg' -e 'mv $f $$(xdg-user-dir PICTURES)'"
                )),
            Key([ctrl], "Print", lazy.spawn('xfce4-screenshooter')),
            Key([ctrl, shift], "Print",
                lazy.spawn('gnome-paru :: screenshot -i')),

            # also allow changing volume, tracks the old fashioned way
            Key([mod], "equal",
                lazy.spawn("amixer -D pulse -q sset Master 5%+")),
            Key([mod], "minus",
                lazy.spawn("amixer -D pulse -q sset Master 5%-")),

            # Emacs programs launched using the key chord CTRL+e followed by 'key'
            KeyChord([ctrl], "e", [
                Key([], "e", lazy.spawn("emacsclient -c -a 'emacs'"),
                    'Launch Emacs'),
                Key([], "b",
                    lazy.spawn("emacsclient -c -a 'emacs' --eval '(ibuffer)'"),
                    'Launch ibuffer inside Emacs'),
                Key([], "d",
                    lazy.spawn("emacsclient -c -a 'emacs' --eval '(dired nil)'"
                               ), 'Launch dired inside Emacs'),
                Key([], "i",
                    lazy.spawn("emacsclient -c -a 'emacs' --eval '(erc)'"),
                    'Launch erc inside Emacs'),
                Key([], "m",
                    lazy.spawn("emacsclient -c -a 'emacs' --eval '(mu4e)'"),
                    'Launch mu4e inside Emacs'),
                Key([], "n",
                    lazy.spawn("emacsclient -c -a 'emacs' --eval '(elfeed)'"),
                    'Launch elfeed inside Emacs'),
                Key([], "s",
                    lazy.spawn("emacsclient -c -a 'emacs' --eval '(eshell)'"),
                    'Launch the eshell inside Emacs'),
                Key([], "v",
                    lazy.spawn(
                        "emacsclient -c -a 'emacs' --eval '(+vterm/here nil)'"
                    ), 'Launch vterm inside Emacs')
            ]),

            # Dmenu scripts launched using the key chord SUPER+p followed by 'key'
            KeyChord([mod], "p", [
                Key([], "e", lazy.spawn("dm-confedit"),
                    'Choose a config file to edit'),
                Key([], "i", lazy.spawn("dm-maim"),
                    'Take screenshots via dmenu'),
                Key([], "k", lazy.spawn("dm-kill"),
                    'Kill processes via dmenu'),
                Key([], "l", lazy.spawn("dm-logout"), 'A logout menu'),
                Key([], "m", lazy.spawn("dm-man"), 'Search manpages in dmenu'),
                Key([], "o", lazy.spawn("dm-bookman"),
                    'Search your qutebrowser bookmarks and quickmarks'),
                Key([], "r", lazy.spawn("dm-reddit"),
                    'Search reddit via dmenu'),
                Key([], "s", lazy.spawn("dm-websearch"),
                    'Search various search engines via dmenu'),
                Key([], "p", lazy.spawn("passmenu"),
                    'Retrieve passwords with dmenu')
            ]),

            # Lock and Powermanrtmp://aljazeeraflashlivefs.fplive.net:1935/aljazeeraflashlive-live?/aljazeera_eng_highgament
            Key([ctrl, alt], "l", lazy.spawn('light-locker-command -l'))
            #Key([ctrl, alt],     'l', lazy.spawn('dm-tool lock'))
        ]

        # END_KEYS

        return keys
Exemplo n.º 27
0
	Key([mod, "control"], "q", lazy.shutdown()),

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

	# cycle to previous and next group
	Key([mod], "h", lazy.screen.prev_group(skip_managed=True)),
	Key([mod], "l", lazy.screen.next_group(skip_managed=True)),

	Key([sup], "f", lazy.window.toggle_fullscreen()),
	Key([sup], "t", lazy.window.toggle_floating()),

	# Process `gnome-screensaver` must run
	Key([mod, sup], "l", lazy.spawn(lock)),

	# Multihead magic
	Key([sup], "h", lazy.prev_screen()),
	Key([sup], "l", lazy.next_screen()),

	# Multimedia
	Key([], "XF86AudioRaiseVolume", lazy.spawn(vol_up)),
	Key([], "XF86AudioLowerVolume", lazy.spawn(vol_down)),
	Key([], "XF86AudioMute", lazy.spawn(mute)),
	Key([], "XF86MonBrightnessUp", lazy.spawn(bright_up)),
	Key([], "XF86MonBrightnessDown", lazy.spawn(bright_down)),
	Key([], "Print", lazy.spawn(scrot)),
	Key([sup], "Print", lazy.spawn(scrot_all)),
]


workspaces = [
	{"name": "i", "key": "i", "matches": [Match(wm_class=["Pidgin"])]},
Exemplo n.º 28
0
 ### Switch focus to specific monitor (out of three)
 Key([mod], "w",
     lazy.to_screen(0)                       # Keyboard focus to screen(0)
     ),
 Key([mod], "e",
     lazy.to_screen(1)                       # Keyboard focus to screen(1)
     ),
 Key([mod], "r",
     lazy.to_screen(2)                       # Keyboard focus to screen(2)
     ),
 ### Switch focus of monitors
 Key([mod], "period",
     lazy.next_screen()                      # Move monitor focus to next screen
     ),
 Key([mod], "comma",
     lazy.prev_screen()                      # Move monitor focus to prev screen
     ),
 ### Treetab controls
 Key([mod, "control"], "Up",
     lazy.layout.section_up()                # Move up a section in treetab
     ),
 Key([mod, "control"], "Down",
     lazy.layout.section_down()              # Move down a section in treetab
     ),
 ### Window controls
 Key(
     [mod], "Down",
     lazy.layout.down()                      # Switch between windows in current stack pane
     ),
 Key(
     [mod], "Up",
Exemplo n.º 29
0
    Key("M-A-l", lazy.layout.flip_right()),
    Key("M-A-j", lazy.layout.flip_down()),
    Key("M-A-k", lazy.layout.flip_up()),

    # Monadtall additional
    Key("M-i", lazy.layout.grow()),
    Key("M-m", lazy.layout.shrink()),
    Key("M-o", z_maximize),
    Key("M-n", lazy.layout.reset()),
    Key("M-S-<space>", lazy.layout.flip()),

    # Switch window focus to other pane(s) of stack
    Key("M-<space>", lazy.layout.next()),

    # Switch between monitors
    Key("M-<comma>", lazy.prev_screen()),
    Key("M-<period>", lazy.next_screen()),

    Key("M-<Return>", lazy.spawn("kitty -e tmux")),
    Key("A-S-<space>", z_next_keyboard),
    Key("M-<Tab>", lazy.next_layout()),
    Key("M-S-w", lazy.window.kill()),

    Key("M-S-x", lazy.hide_show_bar("top")),
    Key("M-C-x", lazy.hide_show_bar("bottom")),

    Key("M-C-r", lazy.restart()),
    Key("M-C-f", lazy.window.toggle_floating()),

    # Sound
    Key('<XF86AudioRaiseVolume>', lazy.spawn(Commands.volume_up)),
Exemplo n.º 30
0
    # Key([mod], "h", lazy.layout.shrink_main()),
    # Key([mod], "l", lazy.layout.grow_main()),
    Key([mod, "control"], "j", lazy.layout.grow_down(), lazy.layout.shrink()),
    Key([mod, "control"], "k", lazy.layout.grow_up(), lazy.layout.grow()),
    Key([mod, "control"], "h", lazy.layout.grow_main(),
        lazy.layout.grow_left()),
    Key([mod, "control"], "l", lazy.layout.shrink_main(),
        lazy.layout.grow_right()),
    Key([mod, "control"], "n", lazy.layout.normalize()),
    Key([mod, alt], "f", lazy.window.toogle_floating()),
    #Key([mod, "control"], "f", lazy.toggle_fullscreen()),
    Key([mod, "control"], "m", lazy.layout.maximize()),

    # Switch window focus to other pane(s) of stack
    Key([mod], "space", lazy.next_screen()),
    Key([mod, "shift"], "space", lazy.prev_screen()),

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

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

    # Applications launching