Пример #1
0
    group_names = init_group_names()
    groups = init_groups()
    floating_layout = init_floating_layout()
    layout_theme = init_layout_theme()
    border_args = init_border_args()
    layouts = init_layouts()
    screens = init_screens()
    widget_defaults = init_widgets_defaults()
    widgets_list = init_widgets_list()
    widgets_screen1 = init_widgets_screen1()
    widgets_screen2 = init_widgets_screen2()

##### SETS GROUPS KEYBINDINGS #####

for i, (name, kwargs) in enumerate(group_names, 1):
    keys.append(Key([mod], str(i),
                    lazy.group[name].toscreen()))  # Switch to another group
    keys.append(
        Key([mod, "shift"], str(i),
            lazy.window.togroup(name)))  # Send current window to another group

##### STARTUP APPLICATIONS #####


@hook.subscribe.startup_once
def start_once():
    home = os.path.expanduser('~')
    # subprocess.call([home + '/.config/qtile/autostart.sh'])


##### NEEDED FOR SOME JAVA APPS #####
Пример #2
0
import psutil
from libqtile import bar, layout, widget, extension, hook, qtile
from libqtile.config import Click, Drag, Group, Key, KeyChord, Match, Screen, ScratchPad, DropDown
from libqtile.lazy import lazy

term = 'st'
colors = {'black': '#000000', 'white': '#ffffff'}

mod = 'mod4'
keys = [
    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.shuffle_left()),
    Key([mod, 'shift'], 'j', lazy.layout.shuffle_down()),
    Key([mod, 'shift'], 'k', lazy.layout.shuffle_up()),
    Key([mod, 'shift'], 'l', lazy.layout.shuffle_right()),
    Key([mod], 'Left', lazy.window.move_floating(-20, 0)),
    Key([mod], 'Down', lazy.window.move_floating(0, 20)),
    Key([mod], 'Up', lazy.window.move_floating(0, -20)),
    Key([mod], 'Right', lazy.window.move_floating(20, 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()),
Пример #3
0
mod = "mod4"
mod1 = "alt"
mod2 = "control"
myBrowser = "firefox"
myTerm = "termite"  # xfce4-terminal
home = os.path.expanduser('~')
myConfig = os.path.expanduser(
    "~/.config/qtile/config.py")  # The Qtile config file location
autostart = '~/dotfiles/.config/qtile/scripts/autostart.sh'
screenshot = "bash -c \"" + os.path.expanduser(
    "~/dotfiles/screenshot.sh") + " full\""

##### KEYBINDINGS #####
keys = [
    ### The essentials
    Key([mod], "Return", lazy.spawn(myTerm), desc='Launches Terminal'),
    Key([mod], "f", lazy.spawn(myBrowser), desc='Launches favorite browser'),
    Key([mod], "v", lazy.spawn(myTerm + " -e vifm"), desc='Vifm filemanager'),
    Key([mod],
        "r",
        lazy.spawn(myTerm + " -e ranger"),
        desc='Ranger filemanager'),
    Key([mod], "Tab", lazy.next_layout(), desc='Toggle through layouts'),
    Key([mod], "q", lazy.window.kill(), desc='Kill active window'),
    # Key(
    #     ["mod1", "control"], "q",
    #     lazy.shutdown(),
    #     desc='Shutdown Qtile'
    #     ),
    Key([mod], "x", lazy.window.kill(), desc='Kill active window'),
    Key([mod], "c", lazy.window.kill(), desc='Kill active window'),
Пример #4
0
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook

mod = "mod4"

keys = [
    # 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], "h", lazy.layout.previous()),

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

    # Switch window focus to other pane(s) of stack
    Key([mod, 'shift'], "h", lazy.layout.client_to_previous()),
Пример #5
0
    if qtile.currentWindow is not None:
        i = qtile.groups.index(qtile.currentGroup)
        qtile.currentWindow.togroup(qtile.groups[i - 1].name)


@lazy.function
def window_to_next_group(qtile):
    if qtile.currentWindow is not None:
        i = qtile.groups.index(qtile.currentGroup)
        qtile.currentWindow.togroup(qtile.groups[i + 1].name)


keys = [

    # FUNCTION KEYS
    Key([], "F12", lazy.spawn('xfce4-terminal --drop-down')),

    # SUPER + FUNCTION KEYS
    Key([mod], "e", lazy.spawn('rofi -show window')),
    Key([mod], "c", lazy.spawn('conky-toggle')),
    Key([mod], "f", lazy.window.toggle_fullscreen()),
    Key([mod], "m", lazy.spawn('pragha')),
    Key([mod], "x", lazy.window.kill()),
    Key([mod], "s", lazy.spawn('rofi -show drun')),
    Key([mod], "t", lazy.spawn('urxvt')),
    Key([mod], "v", lazy.spawn('pavucontrol')),
    Key([mod], "w", lazy.spawn('vivaldi-stable')),
    Key([mod], "q", lazy.spawn('arcolinux-logout')),
    Key([mod], "Escape", lazy.spawn('xkill')),
    Key([mod], "Return", lazy.spawn('termite')),
    Key([mod], "KP_Enter", lazy.spawn('termite')),
Пример #6
0
terminal = "alacritty"  # Set default terminal emulator
browser = "firefox"  # Set default webbrowser
home = "/home/robin/"  # Path to home directory


def latest_group(qtile):
    qtile.current_screen.set_group(qtile.current_screen.previous_group)


def next_group(qtile):
    qtile.current_screen.set_group(qtile.current_screen.next_group)


keys = [
    # Switch between windows
    Key([mod], "Left", lazy.layout.left(), desc="Move focus to left"),
    Key([mod], "Right", lazy.layout.right(), desc="Move focus to right"),
    Key([mod], "Down", lazy.layout.down(), desc="Move focus down"),
    Key([mod], "Up", lazy.layout.up(), desc="Move focus up"),

    # 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"],
        "Left",
        lazy.layout.shuffle_left(),
        desc="Move window to the left"),
    Key([mod, "shift"],
        "Right",
        lazy.layout.shuffle_right(),
        desc="Move window to the right"),
    Key([mod, "shift"],
Пример #7
0
import socket
import subprocess


from typing import List  # noqa: F401

from libqtile import bar, layout, widget, hook
from libqtile.config import Click, Drag, Group, Key, Screen
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal

mod = "mod4"
myTerm = "alacritty"

keys = [
	Key([mod, "shift"], "f",lazy.window.toggle_floating(),
        desc='toggle floating'),

    # Switch between windows in current stack pane
    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"),

    # Move windows up or down in current stack
    Key([mod, "control"], "k", lazy.layout.shuffle_down(),
        desc="Move window down in current stack "),
    Key([mod, "control"], "j", lazy.layout.shuffle_up(),
        desc="Move window up in current stack "),
    
    #move current pane to the other stack
    Key([mod, "control"], "space", lazy.layout.client_to_next(),
Пример #8
0
from libqtile import bar, layout, widget, hook
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy

# Config depandency library
from os import getenv
import subprocess

mod = "mod4"            # Windows key as mod key
home = getenv("HOME")   # Set Home directory
terminal = "alacritty"      # Set terminal emulator
shell = " -e fish"      # Set Shell

keys = [
    # 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'),

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

    # Move windows between left/right columns or up/down
    Key([mod, "shift"], "h", lazy.layout.shuffle_left(),
        desc="Move window to the left"),
    Key([mod, "shift"], "l", lazy.layout.shuffle_right(),
Пример #9
0
def home_or_end(qtile, kk):
    from pynput.keyboard import Key, Controller
    import time

    keyboard = Controller()

    # Press and release  delay
    time.sleep(0.2)

    k = getattr(Key, kk)
    keyboard.press(k)
    keyboard.release(k)

keys = [
    # Move
    Key([mod], left, lazy.layout.left()),
    Key([mod], down, lazy.layout.down()),
    Key([mod], up, lazy.layout.up()),
    Key([mod], right, lazy.layout.right()),

    # Shuffle
    Key([mod, shift], left, lazy.layout.shuffle_left()),
    Key([mod, shift], down, lazy.layout.shuffle_down()),
    Key([mod, shift], up, lazy.layout.shuffle_up()),
    Key([mod, shift], right, lazy.layout.shuffle_right()),

    # Size
    Key([mod, control], left, lazy.layout.grow_left()),
    Key([mod, control], down, lazy.layout.grow_down()),
    Key([mod, control], up, lazy.layout.grow_up()),
    Key([mod, control], right, lazy.layout.grow_right()),
Пример #10
0
    " --insidevercolor=00000000" \
    " --insidewrongcolor=00000000" \
    " --insidecolor=00000000" \
    " --ringvercolor='" + colorscheme["blue"] + "ff'" \
    " --ringwrongcolor='" + colorscheme["red"] + "ff'" \
    " --ringcolor='" + colorscheme["arc_darker"] + "ff'" \
    " --linecolor=00000000" \
    " --separatorcolor=00000000" \
    " --textcolor='" + colorscheme["white"] + "ff'" \
    " --keyhlcolor='" + colorscheme["blue"] + "ff'" \
    " --bshlcolor='" + colorscheme["blue"] + "ff'" \

rofi = "rofi -show %%s -terminal %s -ssh-command '{terminal} -e \"{ssh-client} {host}\"'" % terminal

keys = [
    Key([mod], "j", lazy.layout.down()),
    Key([mod], "k", lazy.layout.up()),
    Key([mod], "h", lazy.layout.left()),
    Key([mod], "l", lazy.layout.right()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
    Key([mod, "shift"], "h", lazy.layout.shuffle_left()),
    Key([mod, "shift"], "l", lazy.layout.shuffle_right()),
    Key([mod, "control"], "j", lazy.layout.grow_down()),
    Key([mod, "control"], "k", lazy.layout.grow_up()),
    Key([mod, "control"], "h", lazy.layout.grow_left()),
    Key([mod, "control"], "l", lazy.layout.grow_right()),
    Key([mod], "s", lazy.layout.toggle_split()),
    Key([mod], "n", lazy.layout.normalize()),
    Key([mod], "Escape", lazy.screen.toggle_group()),
    Key([mod], "Right", lazy.screen.next_group()),
Пример #11
0
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal

mod = "mod4"
terminal = "kitty"
launcher = "rofi -show drun"
browser = "brave"
guifm = "nautilus"
#clifm = "lf"
editor = "subl"
ide = "code"
chrm = "chromium"

keys = [
    # Switch between windows in current stack pane
    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"),

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

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

    # Swap panes of split stack
    Key([mod, "shift"], "space", lazy.layout.rotate(),
Пример #12
0
from libqtile import bar, hook, layout, widget
from libqtile.command import lazy
from libqtile.config import Click, Drag, Group, Key, Screen

##### DEFINING SOME VARIABLES #####

mod = "mod4"  # Sets mod key to SUPER/WINDOWS
myTerm = "xfce4-terminal"  # My terminal of choice
myConfig = "/home/william/.config/qtile/config.py"  # The Qtile config file location

##### KEYBINDINGS #####
keys = [

    ### The essentials

    Key([mod], "Return", lazy.spawn(myTerm)),  # Open terminal
    Key([mod, "shift"], "Return", lazy.spawn("dmenu_run")),  # Dmenu 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

    ### 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], "k", lazy.layout.down()),  # Switch between windows in current stack pane
    Key([mod], "j", lazy.layout.up()),  # Switch between windows in current stack pane
from libqtile.config import Key, Group
from libqtile.command import lazy
from settings.keys import mod, keys


# Get the icons at https://www.nerdfonts.com/cheat-sheet (you need a Nerd Font)
# Icons: 
# nf-fa-firefox, 
# nf-fae-python, 
# nf-dev-terminal, 
# nf-fa-code, 
# nf-seti-config, 
# nf-mdi-folder, 
# nf-mdi-image, 
# nf-fa-video_camera, 
# nf-mdi-layers

groups = [Group(i) for i in [
    "   ", "   ", "   ", "   ", " 漣  ", " ﱮ  ",
]]

for i, group in enumerate(groups):
    actual_key = str(i + 1)
    keys.extend([
        # Switch to workspace N
        Key([mod], actual_key, lazy.group[group.name].toscreen()),
        # Send window to workspace N
        Key([mod, "shift"], actual_key, lazy.window.togroup(group.name))
    ])
Пример #14
0
def init_keys():
    keys = [
        Key([mod], "Return", lazy.spawn(myTerm)),  # open terminal
        Key([mod], "t", lazy.spawn("notify-send asd")),  # open terminal
        Key([mod], "Tab", lazy.next_layout()),  # next layouy
        Key([mod], "q", lazy.window.kill()),  # kill window
        Key([mod, "shift"], "r", lazy.restart()),  # restart qtile
        Key([mod, "shift"], "q", lazy.shutdown()),  # quit qtile

        ### Window controls
        Key([mod], "j", lazy.layout.down()),  # Go to window down
        Key([mod], "k", lazy.layout.up()),  # Go to window up
        Key([mod, "shift"], "j", lazy.layout.shuffle_down()),  # Switch windows
        Key([mod, "shift"], "k", lazy.layout.shuffle_up()),  # Switch windows
        Key(
            [mod, "shift"],
            "l",
            lazy.layout.grow(),
            # increase size of window (XmonadTall)
            lazy.layout.increase_nmaster()),
        # Increase number in master pane (Tile)
        Key(
            [mod, "shift"],
            "h",
            lazy.layout.shrink(),
            # Shrink size of window (XmonadTall)
            lazy.layout.decrease_nmaster()),
        # Decrease number in master pane (Tile)
        Key(
            [mod],
            "z",
            lazy.to_screen(0)  # Keyboard focus to screen(0)
        ),
        Key(
            [mod],
            "x",
            lazy.to_screen(1)  # Keyboard focus to screen(1)
        ),
        Key(
            [mod],
            "n",
            lazy.layout.normalize(
            )  # Restore all windows to default size ratios
        ),
        Key(
            [mod],
            "m",
            lazy.layout.maximize(
            )  # Toggle a window between minimum and maximum sizes
        ),
        Key(
            [mod],
            "f",
            lazy.window.toggle_floating()  # Toggle floating
        ),
        Key(
            [mod, "shift"],
            "space",
            lazy.layout.rotate(),  # Swap panes of split stack (Stack)
            lazy.layout.flip(
            )  # Switch which side main pane occupies (XmonadTall)
        ),
        ### Stack controls
        Key(
            [mod],
            "space",
            lazy.layout.next()  # Switch window focus to other pane(s) of stack
        ),
        Key(
            [mod, "control"],
            "Return",
            lazy.layout.toggle_split(
            )  # Toggle between split and unsplit sides of stack
        ),

        ### Dmenu Run Launcher
        Key([mod, "shift"], "Return",
            lazy.spawn(
                "dmenu_run -fn 'Ubuntu Mono Nerd Font:size=10' -nb {0} -nf '#ffffff' -sb {1} -sf '#ffffff' -p 'dmenu:'"
                .format(colors[0][0], colors[5][0]))),
        # Key([mod, "control"], "o", lazy.spawn("librewolf")),
        # Key([mod, "control"], "i", lazy.spawn("midori")),
        Key([mod, "control"], "p", lazy.spawn("firefox")),
        Key([mod, "control"], "k", lazy.spawn("atom")),
        Key([mod, "control"], "b", lazy.spawn("alacritty -e pulsemixer")),
        Key([mod, "control"], "z", lazy.spawncmd()),  # open terminal
        Key([mod, "control"], "l", lazy.spawn("nautilus")),
        Key([mod, "control"], "m",
            lazy.spawn("kwrite /home/igg/git/wiki_me/wiki_me.md")),
        Key([mod, "control"], "n",
            lazy.spawn("kwrite /home/igg/git/wiki_me/to_do.md")),
        Key([mod, "mod1"], "e", lazy.spawn(myTerm + " -e neomutt")),
        Key([mod, "mod1"], "m",
            lazy.spawn(myTerm + " -e sh ./scripts/toot.sh")),
        Key([mod, "mod1"], "t",
            lazy.spawn(myTerm + " -e sh ./scripts/tig-script.sh")),
        Key([mod, "mod1"], "f",
            lazy.spawn(myTerm + " -e sh ./.config/vifm/scripts/vifmrun")),
        Key([mod, "mod1"], "j", lazy.spawn(myTerm + " -e joplin")),
        Key([mod, "mod1"], "c", lazy.spawn(myTerm + " -e cmus")),
        Key([mod, "mod1"], "i", lazy.spawn(myTerm + " -e irssi")),
        Key([mod, "mod1"], "y", lazy.spawn(myTerm + " -e htop")),
        Key([mod, "mod1"], "a", lazy.spawn(myTerm + " -e ncpamixer")),
        Key([], "XF86AudioLowerVolume",
            lazy.spawn(" /home/igg/git/configs/custom_scripts/vol_down")),
        Key([], "XF86AudioRaiseVolume",
            lazy.spawn("/home/igg/git/configs/custom_scripts/vol_up")),
        Key(
            [],
            "XF86AudioMute",
            lazy.spawn("/home/igg/git/configs/custom_scripts/vol_mute"),
        ),
        Key(
            [],
            "XF86AudioMicMute",
            lazy.spawn("pactl set-source-mute @DEFAULT_SOURCE@ toggle"),
        ),
        Key([], "XF86MonBrightnessUp", lazy.spawn("light -A 15")),
        Key([], "XF86MonBrightnessDown", lazy.spawn("light -U 15"))
    ]
    return keys
Пример #15
0
# SOFTWARE.

import os
import json
import subprocess
from typing import List  # noqa: F401

from libqtile import bar, layout, widget, hook
from libqtile.config import Click, Drag, Group, Key, Screen
from libqtile.lazy import lazy

mod = "mod4"

keys = [
    # Switch between windows in current stack pane
    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"),

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

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

    # Swap panes of split stack
    Key([mod, "shift"], "space", lazy.layout.rotate(),
Пример #16
0
from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
from typing import List  # noqa: F401

##### DEFINING SOME VARIABLES #####
mod = "mod4"                                     # Sets mod key to SUPER/WINDOWS
myTerm = "alacritty"                             # My terminal of choice
myConfig = "$HOME/.config/qtile/config.py"    # The Qtile config file location

##### KEYBINDINGS #####
keys = [
         ### The essentials
         Key(
             [mod], "Return",
             lazy.spawn(myTerm),
             desc='Launches Terminal'
             ),
         Key(
             [mod], "d",
             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(),
Пример #17
0
import os
import subprocess

from typing import List  # noqa: F401

from libqtile import bar, layout, widget, hook
from libqtile.config import Click, Drag, Group, Key, Screen
from libqtile.lazy import lazy

#xephyr mod
mod = "mod1"
#mod = "mod4"

keys = [
    # Switch between windows in current stack pane
    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()),
    Key([mod], "l", lazy.layout.right()),

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

    # Switch window focus to other pane(s) of stack
Пример #18
0
        'name': '7',
        'matches': [Match(wm_class=['qemu']),],
    },
    {
        'label': FA_ICONS['random'],
        'name': '0',
        'matches': [Match(wm_class=['google-chrome', 'pavucontrol']),]
    }
]

groups = [Group(name=i['name'], label=i['label'], matches=i['matches']) for i in groups_data]

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)),
    ])

widget_defaults = dict(
    font='sans',
    fontsize=12,
    padding=3,
)
extension_defaults = widget_defaults.copy()

screens = [
    Screen(
        bottom=bar.Bar(
Пример #19
0
from typing import List

from libqtile import qtile
from libqtile import bar, layout, widget, hook
from libqtile.config import Click, Drag, Group, Key, Screen
from libqtile.lazy import lazy

import os, subprocess

mod = "mod4"
terminal = "alacritty"

keys = [
    # System Controls
    Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"),
    Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown qtile"),
    Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
    Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),

    # monadtall Bindings
    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],
        "l",
        lazy.layout.grow(),
Пример #20
0
        qtile.moveToGroup(othergroup)


# future use: udev code
def __x():
    import pyudev
    context = pyudev.Context()
    monitor = pyudev.Monitor.from_netlink(context)
    monitor.filter_by('drm')
    monitor.enable_receiving()
    observer = pyudev.MonitorObserver(monitor, setup_monitors)
    observer.start()


keys = [
    Key([mod], 'Tab', lazy.layout.down()),
    Key([mod, 'shift'], 'Tab', lazy.layout.up()),
    Key([mod, 'mod1'], 'Tab', lazy.layout.shuffle_down()),
    Key([mod, 'mod1', 'shift'], 'Tab', lazy.layout.shuffle_up()),
    Key([mod, 'control'], 'Tab', lazy.layout.next()),
    Key([mod, 'control', 'shift'], 'Tab', lazy.layout.prev()),
    Key([mod], 'e', lazy.layout.down()),
    Key([mod], 'n', lazy.layout.up()),
    Key([mod], 'Return', lazy.spawn('x-terminal-emulator')),
    Key([mod], 'l', lazy.spawn('xlock')),
    Key([], 'XF86MonBrightnessUp', lazy.spawn('xbacklight -inc 20')),
    Key([], 'XF86MonBrightnessDown', lazy.spawn('xbacklight -dec 20')),
    Key([], 'XF86AudioMute', lazy.spawn('pactl set-sink-mute 0 toggle')),
    Key([], 'XF86AudioRaiseVolume', lazy.spawn('pactl set-sink-volume 0 +5%')),
    Key([], 'XF86AudioLowerVolume', lazy.spawn('pactl set-sink-volume 0 -5%')),
    Key([mod], 'space', lazy.next_layout()),
Пример #21
0
#Alex108-lab
# Qtile keybindings

from libqtile.config import Key
from libqtile.command import lazy

mod = "mod4"

keys = [
    Key(key[0], key[1], *key[2:]) for key in [
        # ------------ Window Configs ------------

        # Switch between windows in current stack pane
        ([mod], "j", lazy.layout.down()),
        ([mod], "k", lazy.layout.up()),
        ([mod], "h", lazy.layout.left()),
        ([mod], "l", lazy.layout.right()),

        # Change window sizes (MonadTall)
        ([mod, "shift"], "l", lazy.layout.grow()),
        ([mod, "shift"], "h", lazy.layout.shrink()),

        # Toggle floating
        ([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()),
Пример #22
0
## Modified at:   Thu Oct  3 21:14:28 2013
## Description:   qtile配置文件
##
######################################################################

from libqtile.config import Key, Screen, Group
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook

# you can run xmodmap to show what is mod4
mod = "mod4"

# 定义快捷键
keys = [
    # 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()),

    # 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
Пример #23
0
from libqtile import bar, layout, qtile, widget
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy

mod = "mod4"
terminal = "st"

keys = [
    Key([mod], "p", lazy.spawn("dmenu_run -p 'Run:'")),
    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], "space", lazy.layout.next()),
    Key([mod], "f", lazy.window.toggle_fullscreen()),
    Key([mod], "t", lazy.window.toggle_floating()),
    Key([mod, "shift"], "h", lazy.layout.shuffle_left()),
    Key([mod, "shift"], "l", lazy.layout.shuffle_right()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
    Key([mod, "control"], "h", lazy.layout.grow_left()),
    Key([mod, "control"], "l", lazy.layout.grow_right()),
    Key([mod, "control"], "j", lazy.layout.grow_down()),
    Key([mod, "control"], "k", lazy.layout.grow_up()),
    Key([mod], "n", lazy.layout.normalize()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    Key([mod], "Return", lazy.spawn(terminal)),
    Key([mod], "b", lazy.spawn("brave")),
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod], "q", lazy.window.kill()),
    Key([mod, "shift"], "r", lazy.restart()),
Пример #24
0
alt = 'mod1'
mod = 'mod4'
ctrl = 'control'
shift = 'shift'

terminal = 'urxvt'
#editor = os.getenv('EDITOR', 'subl3')
# editor_cmd = '%s -e %s' % (terminal, editor)
webbrowser = 'chromium'

logger = logging.getLogger('qtile')

keys = [
    # Switch between windows in current stack pane
    # FIXME What is this?
    Key([mod], 'k', lazy.layout.down()),
    Key([mod, shift], 'j', lazy.layout.up()),

    # Move windows up or down in current stack
    # FIXME What is this?
    Key([mod, ctrl], 'k', lazy.layout.shuffle_down()),
    Key([mod, ctrl], 'j', lazy.layout.shuffle_up()),

    # Switch window focus to other pane(s) of stack
    Key([alt], 'Tab', lazy.layout.next()),

    # Swap panes of split stack
    Key([alt, shift], 'Tab', lazy.layout.rotate()),

    # Switch active screen
    # Key([mod], 'Tab',
Пример #25
0
    i = qtile.screens.index(qtile.current_screen)
    if i + 1 != len(qtile.screens):
        group = qtile.screens[i + 1].group.name
        qtile.current_window.togroup(group)


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


keys = [

    # Launch terminal, kill window, restart and exit Qtile
    Key([mod], "Return", lazy.spawn(myTerm)),
    Key([mod], "w", lazy.window.kill()),
    Key([mod], "Escape", lazy.spawn('xkill')),
    Key([mod, "shift"], "r", lazy.restart()),
    Key([mod, "shift"], "q", lazy.shutdown()),
    Key([mod], "x", lazy.spawn("powerspec")),

    # Dmenu, Rofi and Gmrun
    Key([mod, "mod1"], "d", lazy.spawn("dmenu_run")),
    Key([mod, "mod1"], "n", lazy.spawn("networkmanager_dmenu")),
    Key([mod, "mod1"], "r", lazy.spawn("dmenufm")),
    Key([mod, "mod1"], "space",
        lazy.spawn("rofi -modi drun -show drun -show-icons")),
    Key([mod, "mod1"], "c", lazy.spawn("rofi -show emoji -modi emoji")),
    Key([mod, "mod1"], "v", lazy.spawn("rofi-locate")),
    Key([mod, "mod1"], "z", lazy.spawn("gmrun")),
Пример #26
0
from typing import List
from libqtile.layout import MonadTall, MonadWide, Max, Floating, bsp
from libqtile import bar, layout, widget
from libqtile.config import Click, Drag, Group, Key, Screen, Match
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
from libqtile import hook

mod = "mod4"
terminal = "alacritty"
browser = "chromium"

keys = [
    # launch and kill programs
    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
    Key([mod], "b", lazy.spawn(browser), desc="Launch browser"),
    Key([mod], "f", lazy.spawn("nemo"), desc="Launch filemanager"),
    Key([mod],
        "p",
        lazy.spawn("pavucontrol"),
        desc="Launch pulseaudio manager"),
    Key([mod], "q", lazy.window.kill(), desc="Kill focused windows"),

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

    # run prompts
    Key([mod],
        "d",
Пример #27
0
# SOFTWARE.

from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget

try:
    from typing import List  # noqa: F401
except ImportError:
    pass

mod = "mod4"

keys = [
    # 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, "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, "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
Пример #28
0
import os
import re
import socket
import subprocess
from libqtile.config import KeyChord, Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
from libqtile.lazy import lazy
from typing import List  # noqa: F401

mod = "mod4"  # Sets mod key to SUPER/WINDOWS
myTerm = "alacritty"  # My terminal of choice

keys = [
    ### The essentials
    Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'),
    Key([mod, "shift"],
        "Return",
        lazy.spawn("rofi -show drun"),
        desc='Dmenu Run Launcher'),
    Key([mod], "Tab", lazy.next_layout(), desc='Toggle through layouts'),
    Key([mod, "shift"], "q", lazy.window.kill(), desc='Kill active window'),
    Key([mod, "shift"], "r", lazy.restart(), desc='Restart Qtile'),
    Key([mod, "shift"], "e", lazy.shutdown(), desc='Shutdown Qtile'),
    Key(["control", "shift"],
        "e",
        lazy.spawn("emacsclient -c -a emacs"),
        desc='Doom Emacs'),
    Key(["control", "shift"],
        "i",
        lazy.spawn("qutebrowser"),
Пример #29
0
colors = pywal_colors.colors

mod = "mod1"
terminal = guess_terminal()

keys = [
    # 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, "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, "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("termite")),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod], "w", lazy.window.kill()),
Пример #30
0
from settings import COLS, FONT_PARAMS, WITH_SYS_TRAY

from typing import List  # noqa: F401
from widgets import ShellScript

import json
import os
pycolors = os.path.expanduser('~/.cache/wal/colors.json')
colors = json.loads(open(pycolors).read())

mod = "mod4"

keys = [
    # 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, "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, "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