Beispiel #1
0
        "b",
        lazy.spawn(browser_alt),
        desc="Launch alternative browser"),
    Key([
        mod,
    ], "m", lazy.spawn(email), desc="Launch neomutt"),
    Key([mod, "shift"],
        "m",
        lazy.spawn(musicplayer),
        desc="Launch musicplayer"),
    Key([mod], "e", lazy.spawn(ide), desc="Launch doom emacs"),
    Key([mod], "r", lazy.spawn(rss), desc="Launch doom emacs"),
    Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),

    # qtile commands
    Key([mod], "c", lazy.restart(), desc="Restart qtile"),
    Key([mod, "shift"], "c", lazy.shutdown(), desc="Shutdown qtile"),

    # shift window focus
    Key([mod], "j", lazy.layout.down(), desc="Shift focus down"),
    Key([mod], "k", lazy.layout.up(), desc="Shift focus up"),
    Key([mod], "h", lazy.layout.left(), desc="Shift focus left"),
    Key([mod], "l", lazy.layout.right(), desc="Shift focus right"),
    Key([mod], "Tab", lazy.screen.toggle_group(),
        desc="Toggle prev workspace"),

    # move windows
    Key([mod, "shift"],
        "j",
        lazy.layout.shuffle_down(),
        desc="Move focused window down"),
Beispiel #2
0
            lazy.spawn("qtile-winhide -h"),
            desc="hide a window"
            ),

        Key([mod, "shift"], "BackSpace",
            lazy.spawn("qtile-winhide -s"),
            desc="hide a window"
            ),

        Key([mod, "shift"], "q",
            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, "shift"], "space",
            lazy.window.toggle_floating(),
            desc="Toggle between floating and non-floating"
            )
    ]


for i in groups:
Beispiel #3
0
        desc='Increase focused window size'),
    Key([mod], 'KP_Subtract', lazy.layout.shrink(),
        desc='Decrease focused window size'),

    # Mouse mode
    Key([mod], 'Escape', toggle_widgets(mouse_widget_group),
        desc='Toggle mouse mode'),

    # General Qtile controls
    Key([mod], 'Tab', lazy.next_layout(), desc='Toggle between layouts'),
    Key([mod], 'f', lazy.window.toggle_fullscreen(),
        desc='Toggle fullscreen for focused window'),
    Key([mod], 'space', lazy.window.toggle_floating(),
        desc='Toggle floating for focused window'),
    Key([mod, 'shift'], 'q', lazy.window.kill(), desc='Kill focused window'),
    Key([mod, 'shift'], 'r', lazy.restart(), desc='Restart qtile'),
    Key([mod, 'control', 'shift'], 'q', lazy.shutdown(),
        desc='Shutdown qtile'),

    # Volume
    Key([], 'XF86AudioRaiseVolume', lazy.spawn(
        'amixer sset Master 4%+'), desc='Raise volume'),
    Key([], 'XF86AudioLowerVolume', lazy.spawn(
        'amixer sset Master 4%-'), desc='Lower volume'),
    Key([], 'XF86AudioMute', lazy.spawn(
        'amixer sset Master toggle'), desc='Toggle mute'),

    # Brightness
    Key([], 'XF86MonBrightnessUp', lazy.spawn(
        'smart-backlight up'), desc='Brightness up'),
    Key([], 'XF86MonBrightnessDown', lazy.spawn(
Beispiel #4
0
filemanager = "thunar"
filemanager_alt = "pcmanfm"
email = "thunderbird"

keys = [

    # launch and kill programs
    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
    Key([mod, "shift"],
        "t",
        lazy.spawn(terminal_alt),
        desc="Launch alternative terminal"),
    Key([mod, "shift"], "q", lazy.window.kill(), desc="Kill focused window"),

    # qtile commands
    Key([mod, "shift"], "r", lazy.restart(), desc="Restart qtile"),
    Key([mod, "shift"], "e", lazy.shutdown(), desc="Shutdown qtile"),

    # shift window focus
    Key([mod], "j", lazy.layout.down(), desc="Shift focus down"),
    Key([mod], "k", lazy.layout.up(), desc="Shift focus up"),
    Key([mod], "h", lazy.layout.left(), desc="Shift focus left"),
    Key([mod], "l", lazy.layout.right(), desc="Shift focus right"),
    Key([mod], "Tab", lazy.screen.toggle_group(),
        desc="Toggle prev workspace"),

    # move windows
    Key([mod, "shift"],
        "j",
        lazy.layout.shuffle_down(),
        desc="Move focused window down"),
Beispiel #5
0
    # TAMANHO DA JANELA
    Key([mod], 'equal', lazy.layout.grow(),
        desc='Aumenta o tamanho da janela'),
    Key([mod],
        'minus',
        lazy.layout.shrink(),
        desc='Diminui o tamanho da janela'),
    Key([mod, shift],
        "Return",
        lazy.layout.toggle_split(),
        desc='Muda entre janelas separadas ou maximizadas'),

    # QTILE GERAL
    Key([mod], 'Tab', lazy.next_layout(), desc='Troca tipo de layout'),
    Key([mod, ctrl], 'w', lazy.window.kill(), desc='Fecha a janela focada'),
    Key([mod, 'control'], 'r', lazy.restart(), desc='Restart qtile'),
    Key([mod, "control"], 'q', lazy.shutdown(), desc='Sai do Qtile'),
    Key([mod],
        'r',
        lazy.spawncmd(),
        desc='Abre o widget Prompt pra executar comando'),

    # TECLAS DE AUDIO
    Key([],
        'XF86AudioPlay',
        lazy.spawn('playerctl play-pause'),
        desc='Play ou Pause'),
    Key([],
        'XF86AudioNext',
        lazy.spawn('playerctl next'),
        desc='Próxima faixa'),
Beispiel #6
0
@lazy.function
def window_to_offset_screen(qtile, offset, switch_screen=True):
    if qtile.current_window:
        i = wrap(qtile.current_screen.index + offset, 0, len(qtile.screens) - 1)
        group = qtile.screens[i].group.name
        qtile.current_window.togroup(group)
        if switch_screen == True:
            qtile.cmd_to_screen(i)

show_brightness_cmd = 'value=$(xbacklight -get | cut -d. -f1) && dunstify -t 2000 -u low -r 13481 -h int:value:$value "Brightness: $value" --icon a'

mod = "mod4" # super key
keys = [
    # A list of available commands that can be bound to keys can be found
    # at https://docs.qtile.org/en/latest/manual/config/lazy.html
    Key([mod], "r", lazy.restart(), desc="Reload config"),
    Key([mod, "shift"], "r", lazy.restart(), desc="Restart Qtile"),
    Key([mod, "shift"], "q", lazy.shutdown(), desc="Quit Qtile"),
    Key([mod, "control", "shift"], "q", lazy.spawn("shutdown now"), desc="Shutdown computer"),
    Key([mod, "control", "shift"], "s", lazy.spawn("systemctl suspend"), desc="Sleep/suspend computer"),
    Key([mod, "control", "shift"], "r", lazy.spawn("reboot"), desc="Reboot computer"),

    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
    Key([mod, "shift"], "Return", lazy.spawn(launcher), desc="Show program launcher"),
    Key([mod], "b", lazy.spawn(browser), desc="Launch browser"),
    Key([mod], "e", lazy.spawn(file_manager), desc="Launch file manager"),
    Key([mod, "control"], "l", lazy.spawn("xset s activate"), desc="Lock computer with lock screen"),

    Key([mod], "c", lazy.window.kill(), desc="Kill focused window"),
    Key([mod, "shift"], "c", kill_all_windows, desc="Kill all windows in group"),
Beispiel #7
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("xterm")),

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

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

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 = switch to & move focused window to group
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name)),
    ])
Beispiel #8
0
    Key([mod], "k", lazy.layout.down()),
    Key([mod], "j", lazy.layout.up()),

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

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

    # Swap panes of split stack
    Key([mod, shft], "space", lazy.layout.rotate()),
    Key([mod, shft], "Return", lazy.layout.toggle_split()),
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod, shft], "q", lazy.window.kill()),
    Key([mod, ctrl], "r", lazy.restart()),
    Key([mod, ctrl, shft], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
    Key([mod], "m", lazy.hide_show_bar()),
    Key([mod, ctrl], "period", lazy.spawn("/home/gabe/.scripts/screens")),
    Key([mod], "period", lazy.spawn("/home/gabe/.scripts/startup-walls")),
    Key([mod, shft], "period",
        lazy.spawn("/home/gabe/.scripts/startup-walls-light")),
    Key([mod], "comma", lazy.spawn("/home/gabe/.scripts/startup-dark")),
    Key([mod, shft], "comma", lazy.spawn("/home/gabe/.scripts/startup-light")),
    Key([mod], "Return", lazy.spawn("kitty -e ranger")),
    Key([mod], "semicolon", lazy.spawn("kitty")),
    Key([mod], "e", lazy.spawn('emacsclient -ca "emacs --daemon"')),
    Key([mod], "q", lazy.spawn("qutebrowser")),
    Key([mod, ctrl], "0", lazy.spawn('/home/gabe/.scripts/powermenu.sh')),
    Key([alt], "space", lazy.spawn("/home/gabe/.scripts/rofidrun.sh")),
Beispiel #9
0
    def init_keys(self):
        #################### CUSTOM KEYS  ##########################
        return [
            ############   BINDINGS FOR MONADTALL   ##############
            Key([self.mod], "h", lazy.layout.left()),
            Key([self.mod], "l", lazy.layout.right()),
            Key([self.mod], "j", lazy.layout.down()),
            Key([self.mod], "k", lazy.layout.up()),
            Key([self.mod, "shift"], "h", lazy.layout.swap_left()),
            Key([self.mod, "shift"], "l", lazy.layout.swap_right()),
            Key([self.mod, "shift"], "j", lazy.layout.shuffle_down()),
            Key([self.mod, "shift"], "k", lazy.layout.shuffle_up()),
            Key([self.mod], "i", lazy.layout.grow()),
            Key([self.mod], "m", lazy.layout.shrink()),
            Key([self.mod], "n", lazy.layout.normalize()),
            Key([self.mod], "o", lazy.layout.maximize()),
            Key([self.mod, "shift"], "space", lazy.layout.flip()),

            ############   BINDINGS FOR FLOATING   ##############
            Key([self.mod, "shift"],
                "g",
                lazy.window.toggle_floating(),
                desc='toggle floating'),
            Key([self.mod, "shift"],
                "f",
                lazy.window.toggle_fullscreen(),
                desc='toggle fullscreen'),

            # Move screen to next and previous workspace
            Key([self.mod],
                "k",
                lazy.screen.next_group(),
                desc="Move screen to the next workspace"),
            Key([self.mod],
                "j",
                lazy.screen.prev_group(),
                desc="Move screen to the previous workspace"),

            # Move window to next group
            Key([self.control, self.shift],
                "k",
                Functions.window_to_next_group(),
                desc="Move screen to the next workspace"),
            Key([self.control, self.shift],
                "j",
                Functions.window_to_prev_group(),
                desc="Move screen to the previous workspace"),
            # Kill Functions
            Key([self.mod, self.altgr],
                "c",
                Functions.kill_all_windows_minus_current(),
                desc="Kill all windows except current in the workspace"),
            Key([self.mod, self.altgr],
                "x",
                Functions.kill_all_windows(),
                desc="Kill all windows except current in the workspace"),

            # Toggle between different layouts as defined below
            Key([self.mod],
                "Tab",
                lazy.next_layout(),
                desc="Toggle between layouts"),

            # Toggle bar
            Key([self.mod, "shift"],
                "t",
                lazy.hide_show_bar("top"),
                desc="Show and hide top bar"),

            # Basic Commands
            Key([self.mod],
                "q",
                lazy.window.kill(),
                desc="Kill focused window"),
            Key([self.mod],
                "Return",
                lazy.spawn(self.terminal),
                desc="Launch terminal"),
            Key([self.mod, "shift"], "r", lazy.restart(),
                desc="Restart qtile"),
            Key([self.mod, "shift"],
                "q",
                lazy.shutdown(),
                desc="Shutdown qtile"),
            # Key([self.mod], "r", lazy.spawn('rofi -modi system:/home/surajkarki/.config/rofi/scripts/powermenu.sh -show system -theme dmenu -icon-theme "Papirus-Dark" -show-icons'),
            # desc="Run Rofi"),
            Key([self.mod], "d", lazy.spawn('dmenu_run'), desc="Run dmenu"),
            Key([self.mod],
                "Escape",
                lazy.spawn("betterlockscreen -l"),
                desc="Lock the sreen"),

            # Applications hotkeys
            # Most apps are opened with Super + left self.alt keys
            Key([self.mod, self.alt],
                "e",
                lazy.spawn("emacs"),
                desc="Open Doom Emacs"),
            Key([self.mod, self.alt],
                "b",
                lazy.spawn("brave"),
                desc="Open Brave Browser"),
            Key([self.mod, self.alt],
                "v",
                lazy.spawn("codium"),
                desc="Open VS codium"),
            Key([self.mod, self.alt],
                "a",
                lazy.spawn("pavucontrol"),
                desc="Open Pulse audio GUI controller"),
            Key([self.mod, self.alt],
                "s",
                lazy.spawn("signal-desktop"),
                desc="Open Signal"),
            Key([self.mod, self.alt],
                "n",
                lazy.spawn("pcmanfm"),
                desc="Open PCManFM file browser"),
            Key([self.mod, self.alt],
                "i",
                lazy.spawn("insomnia"),
                desc="Open Insomnia"),
            Key([self.mod, self.alt],
                "r",
                lazy.spawn(self.terminal + " ranger"),
                desc="Open Ranger file manager"),
            Key([self.mod],
                "s",
                lazy.spawn("spotifymusic"),
                desc="Open Spotify"),
            Key([self.mod], "p", lazy.spawn("passmenu"), desc="Open passmenu"),

            # System
            Key([self.mod, self.control],
                "r",
                lazy.spawn("systemctl reboot"),
                desc="Reboot"),
            Key([self.mod, self.control],
                "s",
                lazy.spawn("systemctl poweroff"),
                desc="Shutdown"),
            Key([self.mod, self.control],
                "a",
                lazy.spawn("systemctl suspend"),
                desc="Suspend"),

            # Media hotkeys
            Key([self.mod], 'Up', lazy.spawn('pulseaudio-ctl up 5')),
            Key([self.mod], 'Down', lazy.spawn('pulseaudio-ctl down 5')),
            Key([], "XF86AudioPlay", lazy.spawn('playerctl play-pause')),
            Key([], "XF86AudioPause", lazy.spawn('playerctl play-pause')),

            # Screenshots
            Key([], "Print", lazy.spawn('xfce4-screenshooter')),
            Key([self.alt], "Print", lazy.spawn('xfce4-screenshooter -f -c')),
            Key([self.shift], "Print",
                lazy.spawncmd(
                    "xfce4-screenshooter -f -s /home/daniel/Pictures/Screenshots/"
                )),

            # ------------ Hardware Configs ------------

            # 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%-")),
        ]
Beispiel #10
0
    Key([mod, 'shift'], 'Left', lazy.window.resize_floating(-20, 0)),
    Key([mod, 'shift'], 'Down', lazy.window.resize_floating(0, 20)),
    Key([mod, 'shift'], 'Up', lazy.window.resize_floating(0, -20)),
    Key([mod, 'shift'], 'Right', lazy.window.resize_floating(20, 0)),
    Key([mod], 'r', lazy.layout.flip()),
    Key([mod], 'Tab', lazy.next_layout()),
    Key([mod], 'equal', lazy.layout.grow()),
    Key([mod], 'minus', lazy.layout.shrink()),
    Key([mod], 'BackSpace', lazy.layout.reset()),
    Key([mod], 'f', lazy.window.toggle_floating()),
    Key([mod], 'q', lazy.window.kill()),
    Key([mod], 'p', lazy.spawn('dmenu_run')),
    Key([mod], 'Return', lazy.spawn(term)),
    Key([mod], 's', lazy.group['scratchpad'].dropdown_toggle(term)),
    Key([mod], 'grave', lazy.next_screen()),
    Key([mod, 'shift'], 'r', lazy.restart()),
    Key([mod, 'shift'], 'q', lazy.shutdown()),
    Key([], 'XF86AudioMute', lazy.spawn('amixer set Master toggle')),
    Key([], 'XF86AudioRaiseVolume', lazy.spawn('amixer set Master 10%+')),
    Key([], 'XF86AudioLowerVolume', lazy.spawn('amixer set Master 10%-')),
]

groups = [
    ScratchPad("scratchpad",
               [DropDown(term, term, opacity=1, height=0.8, x=0.1, y=0.1)]),
    Group('1'),
    Group('2'),
    Group('3'),
    Group('4'),
    Group('5'),
    Group('6'),
Beispiel #11
0
    subprocess.call([home])


mod = "mod4"
myTerm = "termite"

keys = [
    ### The essentials
    Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'),
    Key([mod, "shift"],
        "Return",
        lazy.spawn("dmenu_run -p 'Run: '"),
        desc='Dmenu Run Launcher'),
    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'),
    ### Window controls
    Key([mod],
        "k",
        lazy.layout.down(),
        desc='Move focus down in current stack pane'),
    Key([mod],
        "j",
        lazy.layout.up(),
        desc='Move focus up in current stack pane'),
    Key([mod, "shift"],
Beispiel #12
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"], "space", lazy.layout.toggle_split(),
        desc="Toggle between split and unsplit sides of stack"),

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

    # Essential control keys
    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.spawncmd(),desc="Spawn a command using a prompt widget"),
    # Special Key
    Key([], "XF86MonBrightnessUp",
        lazy.spawn("xbacklight -inc 5"), desc="BrightnessUp"),
    Key([], "XF86MonBrightnessDown",
        lazy.spawn("xbacklight -dec 5"), desc="BrightnessDown"),
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer set Master 5%+"), desc="RaiseVolume"),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer set Master 5%-"), desc="LowerVolume"),
    Key([], "XF86AudioMute",
        lazy.spawn("amixer set Master toggle"), desc="LowerVolume"),
Beispiel #13
0
modifier_keys = dict(
    M="mod4",
    A="mod1",
    S="shift",
    C="control",
)
# current = qtile.current_layout.name
keys = [
    ### The essentials
    # Key("M-<Enter>", lazy.spawn(terminal)),
    # Key("M-S-<Enter>" lazy.spawn(dmenu_run)),
    Key("M-d", lazy.group["scratchpad"].dropdown_toggle("term")),
    Key("M-a", lazy.function(KbdOverview().toggle)),
    Key("M-<Tab>", lazy.next_layout()),
    Key("M-S-<Tab>", lazy.prev_layout()),
    Key("M-S-r", lazy.restart()),
    Key("M-S-q", lazy.shutdown()),
    Key("M-S-c", lazy.window.kill()),
    ### Switch focus to specific monitor (out of three)
    # M-w, lazy.to_screen(0)),
    # M-e, lazy.to_screen(1)),
    # M-r, lazy.to_screen(2)),
    ### Switch focus of monitors
    Key("M-<period>", lazy.next_screen()),
    Key("M-<comma>", lazy.prev_screen()),
    ### Window controls
    ## Change focus
    Key("M-h", lazy.layout.left()),
    Key("M-j", lazy.layout.down()),
    Key("M-k", lazy.layout.up()),
    Key("M-l", lazy.layout.right()),
Beispiel #14
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()),
    Key([mod], "Return", lazy.spawn(default_term)),
    Key([mod, 'control'], "Return", lazy.spawn('firefox')),
    Key([mod], 'f', lazy.window.toggle_floating()),
    Key([mod], 'F11', lazy.window.toggle_fullscreen()),

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

    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
    Key([mod, 'shift'], "r", lazy.spawn(commands.rofi)),
    Key([mod], "p", lazy.spawn('xrandr --output eDP1 --off'), lazy.restart()),
    Key([], "Print", lazy.spawn(commands.ss)),
    Key([mod], "Print", lazy.spawn(commands.ss_mod)),
    Key(['shift'], "Print", lazy.spawn(commands.ss_doc)),
    Key([mod, 'shift'], "Print", lazy.spawn(commands.ss_doc_mod)),

    # Media keys setup
    Key([], "XF86AudioPlay", lazy.spawn("cmus-remote -u")),
    Key([], "XF86AudioNext", lazy.spawn("cmus-remote -n")),
    Key([mod], "XF86AudioNext", lazy.spawn("cmus-remote --seek +10s")),
    Key([mod], "XF86AudioPrev", lazy.spawn("cmus-remote --seek -10s")),
    Key([], "XF86AudioPrev", lazy.spawn("cmus-remote -r")),
Beispiel #15
0
def my_shortcuts():
    return [
        # ---------- KEYBOARD LAYOUT ----------
        Key([mod, "shift"], "d", lazy.spawn("setxkbmap de")),
        Key([mod, "shift"], "e", lazy.spawn("setxkbmap us")),
        # ---------- WINDOW MANAGEMENT ----------
        Key([mod],
            "f",
            lazy.window.toggle_fullscreen(),
            desc="Toggle Fullscreen"),
        Key([mod],
            "k",
            lazy.layout.down(),
            desc="Move focus down in stack pane"),
        Key([mod], "j", lazy.layout.up(), desc="Move focus up in stack pane"),
        Key([mod],
            "h",
            lazy.layout.left(),
            desc="Move focus left in stack pane"),
        Key([mod],
            "l",
            lazy.layout.right(),
            desc="Move focus right in stack pane"),
        Key(
            [mod, "shift"],
            "k",
            lazy.layout.shuffle_down(),
            desc="Move window down in current stack ",
        ),
        Key(
            [mod, "shift"],
            "j",
            lazy.layout.shuffle_up(),
            desc="Move window up in current stack ",
        ),
        Key(
            [mod, "shift"],
            "h",
            lazy.layout.shuffle_left(),
            desc="Move window left in current stack ",
        ),
        Key(
            [mod, "shift"],
            "l",
            lazy.layout.shuffle_right(),
            desc="Move window right in current stack ",
        ),
        Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
        # ---------- FUNCTION KEYS ----------
        Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")),
        Key([], "XF86AudioLowerVolume",
            lazy.spawn("amixer -q sset Master 3%- unmute")),
        Key([], "XF86AudioRaiseVolume",
            lazy.spawn("amixer -q sset Master 3%+ unmute")),
        # TODO Keyboard Backlight
        # ---------- QTILE ----------
        Key([mod, "shift"],
            "c",
            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"),
        # ---------- SCRIPTS ----------
        KeyChord(
            [mod],
            "s",
            [
                Key(
                    [],
                    "c",
                    lazy.spawn(
                        "python /home/alex/Coding/pythonscripts/claphands.py"),
                    desc="Clap 👏 Hands",
                ),
                Key(
                    [],
                    "v",
                    lazy.spawn("script-ytv getclip"),
                    desc="Automatically download URL as video",
                ),
                Key(
                    [],
                    "a",
                    lazy.spawn("script-yta getclip"),
                    desc="Automatically download URL as audio",
                ),
            ],
        ),
        # ---------- LAUNCH PROGRAMS ----------
        KeyChord(
            [mod],
            "d",
            [
                Key([], "space", lazy.spawn(terminal), desc="Launch terminal"),
                Key([], "b", lazy.spawn("brave"), desc="Launch Browser"),
                Key(
                    [],
                    "s",
                    lazy.spawn("signal-desktop"),
                    desc="Launch Signal",
                ),
                Key(
                    [],
                    "m",
                    lazy.spawn("element-desktop"),
                    desc="Launch Matrix client Element",
                ),
                Key(
                    [],
                    "t",
                    lazy.spawn("telegram-desktop"),
                    desc="Launch Telegram",
                ),
                Key(
                    [],
                    "k",
                    lazy.spawn("keepassxc"),
                    desc="Launch KeepAssXC",
                ),
                Key([], "d", lazy.spawn("dolphin"), desc="Launch Dolphin"),
                Key([], "f", lazy.spawn("firefox"), desc="Launch Firefox"),
            ],
        ),
        # ---------- ROFI ----------
        KeyChord(
            [mod],
            "space",
            [
                Key(
                    [],
                    "space",
                    lazy.spawn("rofi -show drun"),
                    desc="Spawn a command using a prompt widget",
                ),
                Key(
                    [],
                    "e",
                    lazy.spawn("rofi -show emoji -modi emoji"),
                    desc="Spawn a command using a prompt widget",
                ),
                Key(
                    [],
                    "w",
                    lazy.spawn("rofi -show window"),
                    desc="Spawn a command using a prompt widget",
                ),
                Key(
                    [],
                    "n",
                    lazy.spawn(
                        "rofi-wifi-menu -config ~/dotfiles/rofi/monokai.rasi"),
                    desc="Spawn wifi menu",
                ),
                Key(
                    [],
                    "b",
                    lazy.spawn("rofi-bluetooth"),
                    desc="Spawn bluetooth menu",
                ),
            ],
        ),
        # ---------- EMACS ----------
        KeyChord(
            [mod],
            "i",
            [
                Key(
                    [],
                    "e",
                    lazy.spawn("emacsclient -c -a 'emacs'"),
                    desc="Launch Emacs",
                ),
                Key(
                    [],
                    "s",
                    lazy.spawn("emacs --daemon"),
                    desc="Start Emacs daemon",
                ),
                Key(
                    [],
                    "b",
                    lazy.spawn("emacsclient -c -a 'emacs' --eval '(ibuffer)'"),
                    desc="Launch ibuffer inside Emacs",
                ),
                Key(
                    [],
                    "d",
                    lazy.spawn(
                        "emacsclient -c -a 'emacs' --eval '(dired nil)'"),
                    desc="Launch dired inside Emacs",
                ),
                Key(
                    [],
                    "k",
                    lazy.spawn("pkill emacs"),
                    desc="Kill emacs",
                ),
            ],
        ),
    ]
Beispiel #16
0
    def __get_meta_keys(self) -> list:
        KC_KILL_QTILE = Key(self.mod_shift, "q", lazy.shutdown())
        KC_RESTART_QTILE = Key(self.mod, "F2", lazy.restart())

        return [KC_KILL_QTILE, KC_RESTART_QTILE]
Beispiel #17
0
####    SCRIPTS    ####
#######################
screenshot = "sleep 0.2;scrot -s ~/pictures/screenshots/$(date +%F_%T).png -e 'xclip -selection clipboard -t image/png < $f'"
suspend = "systemctl suspend"
change_wallpaper = "~/.local/user/scripts/setwp -r"
start_picom = "picom -b"
emojiCmd = "rofimoji --skin-tone neutral --max-recent 0 --prompt ''"
inc_backlight = "sudo xbacklight -inc 10"
dec_backlight = "sudo xbacklight -dec 10"

############################
####    KEY BINDINGS    ####
############################
keys = [
    # WM control
    Key(HYPER, "r", lazy.restart()),
    Key(HYPER, "q", lazy.shutdown()),
    Key(HYPER, "s", lazy.spawn(suspend)),

    # Core stuff
    Key(M, "Return", lazy.spawn(terminal)),
    Key(M_Ctl, "Return",
        lazy.spawn("/home/juuso/.local/user/scripts/duplicate-term")),
    Key(M_Sft, "Return", lazy.spawn("rofi -show run -display-run ''")),
    Key(M_Sft, "q", lazy.window.kill()),

    # Window controls
    Key(M, "j", lazy.layout.down()),
    Key(M, "k", lazy.layout.up()),
    Key(M_Sft, "j", lazy.layout.shuffle_down()),
    Key(M_Sft, "k", lazy.layout.shuffle_up()),
Beispiel #18
0
from libqtile.config import Key
from libqtile.lazy import lazy

CONTROL_KEYS = [
    Key(["control"], "r", lazy.restart(), desc="Restart Qtile"),
    Key(["control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
    Key(["control"],
        "l",
        lazy.spawn(["betterlockscreen", "-l"]),
        desc="Lock Screen with betterlockscreen"),
    Key(["control"],
        "s",
        lazy.spawn(["betterlockscreen", "-s"]),
        desc="Suspend with betterlockscreen"),
    Key(["control"],
        "Home",
        lazy.hide_show_bar(position="top"),
        desc="Toggle top bar"),
    Key(["control"],
        "End",
        lazy.hide_show_bar(position="bottom"),
        desc="Toggle bottom bar"),
]
Beispiel #19
0
        desc="Toggle floating"),
    Key([
        meta,
    ], "F11", lazy.window.toggle_maximize(), desc="Toggle maximize"),
    Key([],
        "XF86AudioPlay",
        lazy.spawn("playerctl play-pause"),
        desc="Play/Pause"),
    Key([], "XF86AudioNext", lazy.spawn("playerctl next"), desc="Next"),
    Key([], "XF86AudioPrev", lazy.spawn("playerctl previous"),
        desc="Previous"),
    Key([],
        "XF86AudioMute",
        lazy.spawn("pactl -- set-sink-mute @DEFAULT_SINK@ toggle"),
        desc="Toggle Mute"),
    Key([meta, ctrl], "F5", lazy.restart(), desc="Restart Qtile"),
    Key([
        meta,
    ], "Escape", lazy.shutdown(), desc="Shutdown Qtile"),
]

groups = [
    Group("1"),
    Group("2", matches=[Match(wm_class="discord")]),
    Group("3"),
    Group("4", layout="floating"),
    Group("5", matches=[Match(wm_class="Thunderbird")]),
    Group("6"),
    Group("7"),
    Group("8"),
    Group("9"),
Beispiel #20
0
    def create_shutdown_keys(self):

        shutdown = Key(SHUTDOWN_MODIFIER, SHUTDOWN, lazy.shutdown())
        restart = Key(SHUTDOWN_MODIFIER, RESTART, lazy.restart())

        self.keys += [shutdown, restart]
Beispiel #21
0
    Key("A-C-l", lazy.layout.grow_right(), desc="Grow window right"),
    Key("A-C-<Right>", lazy.layout.grow_right(), desc="Grow window right"),
    Key("A-C-j", lazy.layout.grow_down(), desc="Grow window down"),
    Key("A-C-<Down>", lazy.layout.grow_down(), desc="Grow window down"),
    Key("A-C-k", lazy.layout.grow_up(), desc="Grow window up"),
    Key("A-C-<Up>", lazy.layout.grow_up(), desc="Grow window up"),
    Key("A-C-n", lazy.layout.normalize(), desc="Reset window sizes"),
    Key("A-C-<space>",
        lazy.window.toggle_fullscreen(),
        desc="Toggle Fullscreen"),
    Key("A-C-o", lazy.layout.maximize(), desc="Toggle Fullscreen"),

    # Other system keys
    Key("A-<Tab>", lazy.next_layout(), desc="Toggle layouts"),
    Key("A-S-q", lazy.window.kill(), desc="Kill window"),
    Key("A-S-r", lazy.restart(), desc="Restart Qtile"),
    Key("A-S-e", lazy.shutdown(), desc="Shutdown Qtile"),
    Key("A-d", lazy.function(RUNPROMPT), desc="Run command"),
    Key("A-<Return>", lazy.spawn(TERMINAL()), desc="Launch terminal"),
    Key("M-l", lazy.function(LOCK), desc="Launch terminal"),

    # Multimedia keys
    Key('<XF86AudioRaiseVolume>', lazy.spawn('pmctl volume raise 10')),
    Key('<XF86AudioLowerVolume>', lazy.spawn('pmctl volume lower 10')),
    Key('<XF86AudioMute>', lazy.spawn('pmctl mute toggle')),

    # Scratchpads & Custom programs
    Key('A-S-p', lazy.group['scratch'].dropdown_toggle('python')),
    Key('A-S-m', lazy.group['scratch'].dropdown_toggle('music')),
    Key('A-S-a', lazy.group['scratch'].dropdown_toggle('volume')),
    Key('M-k', lazy.function(KANA)),
Beispiel #22
0
    Key([mod], 'grave', lazy.next_screen()),

    # Media keys
    Key([], 'XF86AudioRaiseVolume', lazy.spawn('pactl set-sink-volume 1 +5%')),
    Key([], 'XF86AudioLowerVolume', lazy.spawn('pactl set-sink-volume 1 -5%')),
    Key([], 'XF86AudioMute', lazy.spawn('pactl set-sink-mute 1 toggle')),
    Key([], 'XF86AudioPlay', lazy.spawn('playerctl play-pause')),
    Key([], 'XF86AudioNext', lazy.spawn('playerctl next')),
    Key([], 'XF86AudioPrev', lazy.spawn('playerctl 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, 'shift'], 'Return', lazy.spawncmd()),
    Key([mod], 'Return', lazy.spawn('alacritty')),
    Key([mod, 'shift'], 'f', lazy.spawn('firefox-nightly')),
    Key([mod, 'shift'], 'b', lazy.spawn('brave')),
    Key([mod], 'x', lazy.spawn('/home/giancarlo/.scripts/emoji.sh')),
    Key([mod], "space", lazy.spawn('rofi -show run')),

    # Toggle between different layouts as defined below
    Key([mod, 'shift'], 'Tab', lazy.next_layout()),
    Key([mod, 'mod1'], 'space', lazy.window.toggle_floating()),
    Key([mod], 'w', lazy.window.kill()),
    Key([mod], 'f', lazy.window.toggle_fullscreen()),
    Key([mod, 'control'], 'r', lazy.restart()),
    Key([mod, 'control'], 'q', lazy.shutdown()),
    Key([mod], 'r', lazy.spawncmd()),
]
Beispiel #23
0
def get_keys() -> List[Key]:
    """Returns a list of Key bindings"""
    my_keys = [
        # Switch between windows in current stack pane
        Key([MOD], "j", lazy.layout.down()),
        Key([MOD], "k", lazy.layout.up()),

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

        # change window size
        Key([MOD], "h", lazy.layout.grow()),
        Key([MOD], "l", lazy.layout.shrink()),

        # Toggle floating
        Key([MOD], "n", lazy.window.toggle_floating()),
        Key([MOD, 'shift'], "m", lazy.window.toggle_fullscreen()),

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

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

        # Close Windows
        Key([MOD], "q", lazy.window.kill()),

        # Restart and Shutdown Qtile
        Key([MOD, "shift"], "r", lazy.restart()),
        Key([MOD, "shift"], "q", lazy.shutdown()),

        # Screen focus
        Key([ALT], "h", lazy.to_screen(0)),
        Key([ALT], "l", lazy.to_screen(1)),

        # screen brightness
        Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight -inc 10")),
        Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -dec 10")),

        # Audio Control
        Key([], "XF86AudioRaiseVolume",
            lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +10%")),
        Key([], "XF86AudioLowerVolume",
            lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -10%")),
        Key([], "XF86AudioMute",
            lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")),
        Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause")),
        Key([], "XF86AudioNext", lazy.spawn("playerctl next")),
        Key([], "XF86AudioPrev", lazy.spawn("playerctl previous")),

        # Key bindings for applications
        Key([MOD], "Return", lazy.spawn(f"{TERM}")),
        Key([MOD], "w", lazy.spawn("firefox")),
        Key([CTRL], "space", lazy.spawn("dmenu_run -h 30")),
        Key([ALT], "Tab", lazy.spawn("rofi -show window")),
        Key([MOD], "m", lazy.spawn("spotify")),
        Key([MOD], "f", lazy.spawn("pcmanfm")),
        Key([MOD], "z", lazy.spawn(f"{TERM} -e nvim /home/ben/.zshrc")),
        Key([MOD], "F3",
            lazy.spawn(f"{TERM} -e nvim /home/ben/.config/qtile/config.py")),
        Key([MOD], "F1", lazy.spawn("sgtk-menu -f -a")),
        Key([MOD, "shift"], "l", lazy.spawn("slock")),
        Key([MOD], "p", lazy.spawn("/home/ben/scripts/power.sh")),
        Key([MOD, "shift"], "b", lazy.spawn("/home/ben/scripts/bluetooth.sh")),
        Key([MOD, "shift"], "v", lazy.spawn("/opt/cisco/anyconnect/bin/vpnui"))
    ]
    return my_keys
Beispiel #24
0
    Key([k.SUPER], "n", lazy.layout.normalize(),
        desc="Reset all window sizes"),
    # Toggle between different layouts as defined below
    Key([k.SUPER], "l", lazy.next_layout(), desc="Toggle between layouts"),

    # 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(
        [k.SUPER],
        "g",
        lazy.layout.toggle_split(),
        desc="Toggle between split and unsplit sides of stack",
    ),
    Key([k.SUPER, k.CONTROL], "F11", lazy.restart(), desc="Restart Qtile"),
    Key([k.SUPER, k.CONTROL], "F12", lazy.shutdown(), desc="Shutdown Qtile"),

    # Actions for focused windows
    # ---------------------------

    # Close an application
    Key([k.ALT], "F4", lazy.window.kill(), desc="Kill focused window"),

    # Switch between windows
    Key([k.SUPER], k.UP, lazy.layout.up(), desc="Move focus to up"),
    Key([k.SUPER], k.DOWN, lazy.layout.down(), desc="Move focus to down"),
    Key([k.SUPER], k.RIGHT, lazy.layout.right(), desc="Move focus to right"),
    Key([k.SUPER], k.LEFT, lazy.layout.left(), desc="Move focus to left"),

    # Move windows between left/right columns or move up/down in current stack.
Beispiel #25
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("urxvt")),

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

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(toggle=False)),

        # mod1 + shift + letter of group = switch to & move focused window to group
        # Key([mod, "shift"], i.name, lazy.window.togroup(i.name, switch_group=True)),
        # Or, use below if you prefer not to switch to that group.
     desc='Move window between windows in current stack pane'),
 Key([mod, "control"],
     "f",
     lazy.layout.flip(),
     desc='Move window between windows in current stack pane'),
 Key([mod],
     "space",
     lazy.layout.next(),
     desc='Switch window focus to other pane(s) of stack'),
 Key([mod],
     "Return",
     lazy.spawn(myTerm),
     desc='Launches My terminal with URXVT'),
 Key([mod], "Tab", lazy.next_layout(), desc='Toggle through layouts'),
 Key([mod], "w", lazy.window.kill(), desc='Kill active window'),
 Key([mod, "control"], "r", lazy.restart(), desc='Restart Qtile'),
 Key([mod, "control"], "q", lazy.shutdown(), desc='Shutdown Qtile'),
 Key([mod], "r", lazy.spawncmd(), desc='Run command bar'),
 Key([mod, "shift"],
     "m",
     lazy.to_screen(0),
     desc='Keyboard focus to monitor1'),
 Key([mod, "shift"],
     "n",
     lazy.to_screen(1),
     desc='Keyboard focus to monitor2'),
 Key([mod], "f", lazy.spawn(myTerm + " -e ranger"), desc='File Manager'),
 Key([mod],
     "n",
     lazy.layout.normalize(),
     desc='Normalize window size ratios'),
Beispiel #27
0
        desc="Swap panes of split stack"),
    # 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(),
        desc="Toggle between split and unsplit sides of stack",
    ),
    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
    # 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.spawncmd(),
        desc="Spawn a command using a prompt widget"),
    Key([mod], "d", lazy.run_extension(extension.DmenuRun())),
]

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

for i in groups:
    keys.extend([
        # mod1 + letter of group = switch to group
        Key(
            [mod],
Beispiel #28
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", lazy.function(window_to_previous_column_or_group)),
        Key([mod, "shift"], "Right", lazy.function(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", lazy.function(window_to_previous_screen)),
        Key([mod, "shift", "mod1"], "Right", lazy.function(window_to_next_screen)),

        Key([mod], "t", lazy.function(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, "shift"], "f", lazy.window.toggle_fullscreen()),
        Key([mod], "b", lazy.window.bring_to_front()),
        Key([mod], "s", lazy.layout.toggle_split()),

        Key([mod], "semicolon", lazy.spawn("splatmoji copypaste")),
        Key([mod], "r", lazy.spawn("rofi -show")),
        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([mod], "v", lazy.validate_config()),

        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("pactl set-sink-mute @DEFAULT_SINK@ toggle")),
        Key([mod], "Prior", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")),
        Key([mod], "Next", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -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
Beispiel #29
0
    # Main Keybindings
    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
    Key([mod, "shift"],
        "Return",
        lazy.spawn(
            "dmenu_run -m 0 -p 'Run: ' -fn 'Ubuntu Mono:bold:pixelsize=15' -nb '#{0}' -nf '#{1}' -sb '#{2}' -sf '#{3}'"
            .format(theme["color0"], theme["color7"], theme["color3"],
                    theme["color0"])),
        desc="Dmenu Launcher"),
    Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
    Key([mod], "w", lazy.window.kill(), desc="Kill focused window"),
    Key([mod, "mod1"],
        "l",
        lazy.spawn("light-locker-command -l"),
        desc="Lock the session."),
    Key([mod, "mod1"], "r", lazy.restart(), desc="Restart qtile"),
    Key([mod, "mod1"], "q", lazy.shutdown(), desc="Shutdown qtile"),

    # Switch between windows in current stack pane
    Key([mod], "j", lazy.layout.down(), desc="Move focus down in stack pane"),
    Key([mod], "k", lazy.layout.up(), desc="Move focus up in stack pane"),

    # Resize windows in current stack
    Key([mod], "h", lazy.layout.grow(), desc="Grow window"),
    Key([mod], "l", lazy.layout.shrink(), desc="Shrink window"),

    # Window Properties
    Key([mod], "n", lazy.layout.normalize(), desc="Normalize window"),
    Key([mod],
        "m",
        lazy.layout.maximize(),
Beispiel #30
0
        desc="Transplant window right"),

    # Groups
    Key("M-<Left>",
        lazy.screen.prev_group(),
        desc="Switch to the previous group"),
    Key("M-<Right>", lazy.screen.next_group(),
        desc="Switch to the next group"),

    # Layout stuff
    Key("M-m", lazy.next_layout(), desc="Switch between BSP an Max"),
    Key("M-<semicolon>", lazy.layout.toggle_split(), desc="Rotate split"),
    Key("M-S-b", lazy.layout.flip(), desc="Swap window with sibling"),
    Key("M-f", lazy.window.toggle_floating(), desc="Toggle window float"),
    Key("M-w", lazy.window.kill(), desc="Kill focused window"),
    Key("M-A-r", lazy.restart(), desc="Restart qtile"),
    Key("M-A-q", lazy.shutdown(), desc="Shutdown qtile"),
    Key("M-r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),

    # Programs
    Key("M-<Return>", lazy.spawn(terminal), desc="Launch terminal"),
    Key("M-C-<Return>",
        lazy.spawn(f'{terminal} -e {editor}'),
        desc='Run terminal editor'),
    Key("M-S-<Return>", lazy.spawn(alt_editor), desc='Run GUI editor'),
    Key("M-<F1>", lazy.spawn(browser), desc="Launch browser"),
    Key("M-S-<F1>", lazy.spawn(alt_browser),
        desc="Launch alternative browser"),
    Key("M-<F2>", lazy.spawn(player), desc="Launch music player"),
    Key("M-S-<F2>",
        lazy.spawn(alt_player),