Exemple #1
0
def __launcher():
    from shutil import which
    import os

    return (lazy.run_extension(
        extension.DmenuRun(
            dmenu_prompt="run> ",
            background="black",
            # background="#000000",
            selected_background="#808080",
            selected_foreground="black",
            # selected_foreground="#000000",
            dmenu_lines=10,
        )) if which("dmenu", os.X_OK) else lazy.spawncmd())
Exemple #2
0
    Key([win], "h", lazy.layout.left()),
    Key([win], "l", lazy.layout.right()),
    Key([win], "Tab", iWinSwap()),
    Key([win], "f", lazy.window.bring_to_front()),

    # Lunch useful softwares
    Key([mod, "control"], "t", lazy.spawn('localTerm')),
    Key([mod, "control"], "w", lazy.spawn('brave')),
    Key([mod, "control"], "m", lazy.spawn('thunderbird')),
    Key([mod, "control"], "f", lazy.spawn('exploreLocal')),
    Key([mod, "control"], "n", lazy.spawn('nm-connection-editor')),
    Key([mod, "control"], "Return",
        lazy.run_extension(
            extension.DmenuRun(
                dmenu_prompt=" ➜ ",
                dmenu_font="Ubuntu",
                background=colors[5],
                selected_background=colors[3],
            ))),
    # lazy.spawn("dmenu_run -i -fn %s -p dmenu: "
    # %('Ubuntu'))
    Key([mod], "p", lazy.spawn('snapShot')),
    Key([mod], "v", lazy.spawn('recordClipBoard')),
    Key([mod], "F4", lazy.window.kill()),
    # Brightness control
    Key([mod], 'k', lazy.spawn('xbacklight -inc 8')),
    Key([mod], 'j', lazy.spawn('xbacklight -dec 8')),
    # Sound control
    Key([mod], 'l', lazy.spawn("pulseaudio-ctl up")),
    Key([mod], 'h', lazy.spawn("pulseaudio-ctl down")),
    Key([mod, "control"], "x", lazy.window.kill()),
    Key([mod, "control"], "r", lazy.restart()),
Exemple #3
0
    # Toggle Floating
    Key([mod, "shift"],
        "space",
        lazy.window.toggle_floating(),
        desc='toggle floating'),

    # Toggle Fullscreen
    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("st")),
    Key([mod], "d", lazy.run_extension(extension.DmenuRun())),
    Key([mod], "F1", lazy.spawn("atom")),
    Key([mod], "F2", lazy.spawn("brave")),
    Key([mod], "F3", lazy.spawn("thunar")),
    Key([mod], "F4", lazy.spawn("spotify")),
    Key([mod], "z", lazy.spawn("rofimenu")),
    Key([mod, "shift"], "d",
        lazy.spawn("rofi -modi 'window,run,ssh,drun' -show run")),
    Key([], "XF86AudioNext",
        lazy.spawn(
            "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /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"
        )),
Exemple #4
0
# Function Keys

    Key([], "Print", lazy.spawn("flameshot gui")),
    Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set 5%+")),
    Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 5%-")),
    Key([], "XF86AudioMute", lazy.spawn("amixer -q sset Master toggle")),
    Key([], "XF86AudioLowerVolume", lazy.spawn("amixer sset Master playback 5%-")),
    Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer sset Master playback 5%+")),
    Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause")),
    Key([], "XF86AudioStop", lazy.spawn("playerctl stop")),
    Key([], "XF86AudioPrev", lazy.spawn("playerctl previous")),
    Key([], "XF86AudioNext", lazy.spawn("playerctl next")),

# Apps and scripts

    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
    Key([mod], "r", lazy.run_extension(extension.DmenuRun(fontsize=11))),

    Key([mod], "F4", lazy.spawn(os.environ["HOME"] + "/Escritorio/scripts/dmenu-togglescreenlayout.sh")),
    Key([mod], "F5", lazy.spawn(os.environ["HOME"] + "/Escritorio/scripts/dmenu-audiosettings.sh")),
    Key([mod], "b", lazy.spawn("brave --new-window")),
    Key([mod], "d", lazy.spawn("dolphin")),
    Key([mod], "n", lazy.spawn("brave --new-window https://www.netflix.com/browse")),
    Key([mod], "o", lazy.spawn("okular")),
    Key([mod], "s", lazy.spawn("spotify")),
    Key([mod], "w", lazy.spawn("brave --new-window https://web.whatsapp.com/")),
    Key([mod], "x", lazy.spawn("slock")),
    Key([mod], "z", lazy.spawn(os.environ["HOME"] + "/Escritorio/scripts/dmenu-powersettings.sh")),
]
Exemple #5
0
    # 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, "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], "r", lazy.run_extension(extension.DmenuRun(
        dmenu_prompt="Ejecuta",
        dmenu_font="Cantarell-18",
        background=back,
        foreground=color_light,
        selected_background=color,
        selected_foregorund="#ddd",
        ))),
    Key([mod], "l", lazy.layout.grow()),
    Key([mod], "h", lazy.layout.shrink()),

    Key([mod], "f", lazy.window.toggle_floating()),
]

__groups = {
    1: Group("TER"),
    2: Group("WWW", matches=[Match(wm_class=["firefox"])]),
    3: Group("DEV"),
    0: Group("MUS"),
}
Exemple #6
0
@lazy.function
def resize_down(qtile):
    resize(qtile, "down")


keys = [
    # Launching dmenu with custom settings
    # 'dmenu_height' package from aur needed for 'dmenu_height' argument
    Key([mod], "d",
        lazy.run_extension(
            extension.DmenuRun(
                dmenu_prompt="  >",
                dmenu_font="FiraCode Nerd Font-14",
                dmenu_height=38,
                background="#2e3440",
                foreground="#88c0d0",
                selected_background="#3f4758",
                selected_foreground="#88c0d0",
            ))),
    Key(
        [mod],
        "Return",
        lazy.spawn(terminal),
        desc="Launch terminal",
    ),
    Key(
        [mod],
        "Tab",
        lazy.next_layout(),
        desc="Toggle through layouts",
Exemple #7
0
    Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
    Key([mod], "i", lazy.layout.grow()),
    Key([mod], "m", lazy.layout.shrink()),
    Key([mod], "o", lazy.layout.maximize()),
    Key([mod], "n", lazy.layout.normalize()),
    Key([mod, "shift"], "space", lazy.layout.flip()),

    # my menu/run prompt.
    Key(['mod4'], 'p',
        lazy.run_extension(
            extension.DmenuRun(
                dmenu_prompt="RUN ->",
                dmenu_font="GohuFont",
                background=bg,
                foreground=fg,
                selected_background=blue,
                selected_foreground=bg,
                dmenu_ignorecase=False,
                dmenu_height=21,
            ))),

    # launch my terminal.
    Key([mod, "shift"], "Return", lazy.spawn(term)),

    # launch my editor.
    Key([mod, "control"], "e", lazy.spawn(editor)),

    # launch normiecord.
    Key([mod, "control"], "d", lazy.spawn("/usr/bin/discord --no-sandbox")),

    # launch pcmanfm.
Exemple #8
0
    # Switch between windows
    Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
    Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
    Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
    Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
    Key([mod],
        "space",
        lazy.layout.next(),
        desc="Move window focus to other window"),

    # App launcher
    Key([mod], 'd',
        lazy.run_extension(
            extension.DmenuRun(
                dmenu_font=font + "-11",
                dmenu_prompt=">",
                dmenu_command="dmenu_run -i",
            ))),
    Key([mod], "p", lazy.spawn("dmenu_run -i")),
    # Switch monitor focus
    Key([mod], "period", lazy.next_screen(),
        desc="Move focus to next monitor"),
    # Move windows between left/right columns or move up/down in current stack.
    # Moving out of range in Columns layout will create new column.
    Key([mod, "shift"],
        "h",
        lazy.layout.shuffle_left(),
        desc="Move window to the left"),
    Key([mod, "shift"],
        "l",
        lazy.layout.shuffle_right(),
Exemple #9
0
    # 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.run_extension(
            extension.DmenuRun(command="dmenu_run", dmenu_prompt="Command:")),
        desc="Spawn a command using a prompt widget"),

    # Callers
    Key([mod], "e", lazy.spawn('nautilus'), desc="Run File manager"),
]

# groups = [Group(i) for i in "123456789"]
#
groups = [
    Group(name="1",
          label="terminal",
          matches=['terminator'],
          init=True,
          spawn=["terminator"],
          layout="column"),
Exemple #10
0
    # 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], "q", lazy.window.kill(), desc="Kill focused window"),

    # Restart and Quit
    Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"),
    Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),

    # Dmenu
    Key([mod], "d", lazy.run_extension(extension.DmenuRun(dmenu_prompt=">")),
        desc="Spawn Dmenu"),

    # Brave
    Key([mod], "b", lazy.spawn("brave"), desc="Spawn Brave"),

    # Bar
    Key([mod, "shift"], "b", lazy.hide_show_bar("top"), desc="Toggle Bar"),
]

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(),
Exemple #11
0
    # Media keys
    Key([], "XF86AudioRaiseVolume", lazy.spawn("pamixer -i 5")),
    Key([], "XF86AudioLowerVolume", lazy.spawn("pamixer -d 5")),
    Key([], "XF86AudioMute", lazy.spawn("pamixer -t")),
    Key([], "XF86AudioNext", lazy.spawn("playerctl --all-players next")),
    Key([], "XF86AudioPrev", lazy.spawn("playerctl --all-players previous")),
    Key([], "XF86AudioPlay", lazy.spawn("playerctl --all-players play-pause")),

    # Program hotkeys
    # Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
    Key([mod], "r", lazy.spawn("rofi -show run"),
        desc="Spawn a rofi app menu"),
    Key([mod, "shift"],
        "r",
        lazy.run_extension(extension.DmenuRun(dmenu_prompt="> ")),
        desc="Spawn a dmenu"),
    Key([mod], "F1", lazy.spawn([terminal, "-e", "htop"]), desc="Open htop"),
    Key([mod], "F2", lazy.spawn("librewolf"), desc="Open firefox"),
    Key([mod], "F3", lazy.spawn("pcmanfm"), desc="Open file manager"),
    Key([mod, "control"],
        "m",
        lazy.spawn("pavucontrol"),
        desc="Open volume mixer"),

    # Shutdown
    Key([mod],
        "0",
        lazy.spawn([
            'rofi', '-show', 'powermenu', '-modi', 'powermenu:rofi-power-menu',
            '-font', 'Symbols Nerd Font 14'
Exemple #12
0
    Key([mod], "d", 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],
        'm',
        lazy.run_extension(
            extension.DmenuRun(
                dmenu_prompt=">",
                dmenu_font="Andika-8",
                background="#15181a",
                foreground="#00ff00",
                selected_background="#079822",
                selected_foreground="#fff",
                #dmenu_height=24,  # Only supported by some dmenu forks
            ))),
    Key([mod], "u", lazy.to_screen(0), desc='Keyboard focus to monitor 1'),
    Key([mod], "i", lazy.to_screen(1), desc='Keyboard focus to monitor 2'),
    Key([mod], "period", lazy.next_screen(),
        desc='Move focus to next monitor'),
    Key([mod], "comma", lazy.prev_screen(), desc='Move focus to prev monitor'),

    # Apps
    Key([mod], "b", lazy.spawn(browser)),
    Key([mod], "f", lazy.spawn(files)),
]
Exemple #13
0
    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
    Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
    Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"),
    Key([mod, "control"], "w", 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(
                dmenu_prompt="",
                dmenu_font="Ubuntu Bold",
                background="#282a36",
                foreground="#434758",
                selected_background="#ffb612",
                selected_foreground="#fff",
            ))),
    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
]


# Bar Colors
def init_colors():
    return [["#282a36", "#282a36"], ["#434758", "#434758"],
            ["#282a36", "#282a36"], ["#282a36", "#282a36"],
            ["#282a36", "#282a36"]]


# Workspaces and names
Exemple #14
0
    # 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.run_extension(
            extension.DmenuRun(dmenu_font="Hack:pixelsize=18",
                               dmenu_ignorecase=True)),
        desc="Spawn a command using a prompt widget"),
    Key([mod],
        "t",
        lazy.run_extension(
            extension.WindowList(
                dmenu_font="Hack:pixelsize=18",
                dmenu_ignorecase=True,
            )),
        desc="Swap window"),
    Key([mod, "control"],
        "space",
        lazy.spawn("toggle_keyboard"),
        desc="Toggle keyboard layout"),
    Key([mod, "shift"],
        "z",
Exemple #15
0
    # 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"),

    # Key([mod], "p", lazy.spawn("dmenu_run"), desc="Launch dmenu"),
    Key([mod], 'p',
        lazy.run_extension(
            extension.DmenuRun(
                dmenu_prompt=">",
                dmenu_font="sans",
                dmenu_fontsize=10,
                background="#000000",
                foreground="#fff",
                selected_background="#000000",
                selected_foreground="#215578",
            ))),

    #Audio Keybindings
    Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c 1 sset Master 1- unmute")),
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 1 sset Master 1+ unmute")),

    #Brightness Keybindings
    Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl s 1+")),
    Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl s 1-")),
Exemple #16
0
    Key([mod], "Tab", lazy.next_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], "p", lazy.spawn("dmenu_run")),
    Key(
        [mod],
        "p",
        lazy.run_extension(
            extension.DmenuRun(
                dmenu_prompt="",
                dmenu_font=None,
                fontsize=16,
                background="#0a0a0a",
                foreground="#8b3626",
                selected_background="#8b3626",
                selected_foreground="#fff",
                # dmenu_height=24, funktioniert nicht
                dmenu_ignorecase=True,
                dmenu_lines=20,
            )),
    ),
    Key([mod], "o", lazy.spawn("my-menu.sh")),
    Key([mod], "f", lazy.window.toggle_floating()),
    # Toggle "monocle" mode (fullscreen)
    Key([mod], "m", lazy.window.toggle_fullscreen()),
    Key([mod, "mod1"], "h", lazy.spawn("st -e htop")),
    Key([mod, "mod1"], "f", lazy.spawn("st -e lf")),
    # Key('M-<Up>', lazy.spawn("my-menu.sh")),
    Key([], "Print", lazy.spawn("scrot")),
]
Exemple #17
0
    Key('<XF86AudioMute>', lazy.spawn(Commands.volume_toggle)),
    Key('<XF86AudioMicMute>', lazy.spawn(Commands.mic_toggle)),

    # Other FN keys
    Key('<XF86MonBrightnessUp>', lazy.spawn(Commands.brightness_up)),
    Key('<XF86MonBrightnessDown>', lazy.spawn(Commands.brightness_down)),
    Key('<XF86Display>', lazy.spawn('arandr')),
    Key('<XF86Favorites>', lazy.spawn('touchpad_toggle')),

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

    # DMENU
    Key("M-r", lazy.run_extension(extension.DmenuRun())),
    Key("M-A-w", lazy.run_extension(extension.WindowList(
        item_format="{group}: {window}",
        foreground=BLUE,
        selected_background=BLUE))),
    Key("M-C-c", lazy.run_extension(extension.Dmenu(
        dmenu_command="clipmenu",
        foreground=YELLOW,
        selected_background=YELLOW))),
    Key("M-A-p", lazy.run_extension(extension.Dmenu(
        dmenu_command="passmenu",
        foreground=RED,
        selected_background=RED))),
    Key("M-A-n", lazy.run_extension(extension.Dmenu(
        dmenu_command="networkmanager_dmenu",
        foreground=RED,
Exemple #18
0
        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.run_extension(
            extension.DmenuRun(
                dmenu_prompt=":",
                background="#15181a",
                dmenu_font="sans-11",
                foreground="#88ADBA",
                selected_background="#617981",
                selected_foreground="#fff",
                dmenu_ignorecase=True,
            ))),

    # 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%")),