Пример #1
0
    "#2E3440",  # 0  Background
    "#434C5E",  # 1  current line/lighter_black
    "#ECEFF4",  # 2  foreground
    "#434C5E",  # 3  comment/dark_grey
    "#88C0D0",  # 4  cyan
    "#A3BE8C",  # 5  green
    "#D08770",  # 6  orange
    "#B48EAD",  # 7  magenta
    "#5D80AE",  # 8  violet
    "#BF616A",  # 9  red
    "#EBCB8B",  # 10 yellow
]

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

    # shufle windows
    Key([mod, "control"], "j", lazy.layout.shuffle_down()),
    Key([mod, "control"], "k", lazy.layout.shuffle_up()),
    Key([mod, "control"], "h", lazy.layout.shuffle_left()),
    Key([mod, "control"], "l", lazy.layout.shuffle_right()),

    # resize windows
    Key([mod, "shift"], "h", lazy.layout.shrink()),
    Key([mod, "shift"], "l", lazy.layout.grow()),
    Key([mod, "shift"], "m", lazy.layout.maximize()),
    Key([mod, "shift"], "n", lazy.layout.normalize()),
Пример #2
0
def init_keys(config):
    # Key bindings
    mod = config['mod']
    keys = [
        # WM control
        Key([mod, 'control'], 'r', lazy.restart()),
        Key([mod, 'control'], 'q', lazy.shutdown()),
        Key([mod], 'r', lazy.spawncmd()),
        Key([mod, 'shift'], 'c', lazy.window.kill()),

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

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

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

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

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

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

    return keys
Пример #3
0
import os

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


def env(name, default):
    return os.environ.get(name, default)


mod = "mod4"

keys = [
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "Return", lazy.spawn("xterm")),
    Key([mod], "Left", lazy.layout.left()),
    Key([mod], "Right", lazy.layout.right()),
    Key([mod], "Up", lazy.layout.up()),
    Key([mod], "Down", lazy.layout.down()),
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod, "shift"], "Tab", lazy.prev_layout()),
]

border_focus = env("BORDER_FOCUS", "#ff0000")
border_normal = env("BORDER_NORMAL", "#000000")
border_width = int(env("BORDER_WIDTH", 8))
margin = int(env("MARGIN", 10))
borders = dict(border_focus=border_focus,
               border_normal=border_normal,
               border_width=border_width)
Пример #4
0
# Qtile workspaces

from libqtile.config import Key, Group
from libqtile.command import lazy
from settings.keys import mod, keys

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))
    ])
Пример #5
0
from libqtile.config import Key
from libqtile.command import lazy

mod = "mod4"
myTerm = "alacritty"

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()),
    ([mod, "shift"], "Tab", lazy.prev_layout()),
Пример #6
0
from libqtile import layout, bar, widget, hook
from libqtile.log_utils import logger
from libqtile.command.client import CommandClient
c = CommandClient()

from typing import List  # noqa: F401

logger.warning(f"WOW LOG::: {layout.__name__}")
logger.warning(dir(c))
logger.warning(f"lazy dir is useless{dir(lazy)}")


modkey = mod = "mod4"

keys = [
    Key([mod, "shift"], "c",       lazy.window.kill()),
    
    # 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.focus_next()),
    Key([mod, "control"], "j",     lazy.layout.focus_previous()),
    #  # increase or decrease size "ratio"
    #  Key([mod, "control"], "h",     lazy.layout.decrease_ratio()),
    #  Key([mod, "control"], "l",     lazy.layout.increase_ratio()),
    #  Key([mod],            "h",     lazy.layout.shrink()),
    #  Key([mod],            "l",     lazy.layout.grow()),

    # Switch window focus to other pane(s) of stack Key([mod], "space", lazy.layout.next()),
Пример #7
0
browser = "chromium"
editor = "nvim"
filemanager = "thunar"


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


keys = [
    # essential programs
    Key([mod], "d",
        lazy.spawn(
            "rofi -modi run,drun,window -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3"
        )),
    # 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 move up/down in current stack.
    # Moving out of range in Columns layout will create new column.
    Key([mod, "shift"],
        "h",
Пример #8
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/dav/.config/qtile/config.py"  # The Qtile config file location

myBrowser = "/usr/bin/brave-browser"

##### KEYBINDINGS #####
keys = [
    ### The essentials
    Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'),
    Key([mod],
        "p",
        lazy.spawn("rofi -modi drun -show drun -show-icons"),
        desc='Dmenu Run Launcher'),
    Key([mod, "shift"],
        "Return",
        lazy.spawn(myBrowser),
        desc='Launchers Web Browser'),
    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'),
    ### Switch focus to specific monitor (out of three)
    Key([mod], "w", lazy.to_screen(0), desc='Keyboard focus to monitor 1'),
    Key([mod], "e", lazy.to_screen(1), desc='Keyboard focus to monitor 2'),
Пример #9
0
        widget.Clock('%Y-%m-%d %a %I:%M %p'),
    ], 30)) # our bar is 30px high
]

# Super_L (the Windows key) is typically bound to mod4 by default, so we use
# that here.
mod = "mod4"

# The keys variable contains a list of all of the keybindings that qtile will
# look through each time there is a key pressed.
keys = [
    # Log out; note that this doesn't use mod4: that's intentional in case mod4
    # gets hosed (which happens if you unplug and replug your usb keyboard
    # sometimes, or on system upgrades). This way you can still log back out
    # and in gracefully.
    Key(["shift", "mod1"], "q",  lazy.shutdown()),

    Key([mod], "k",              lazy.layout.down()),
    Key([mod], "j",              lazy.layout.up()),
    Key([mod], "h",              lazy.layout.previous()),
    Key([mod], "l",              lazy.layout.previous()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return",lazy.layout.toggle_split()),
    Key(["mod1"], "Tab",         lazy.nextlayout()),
    Key([mod], "x",              lazy.window.kill()),

    # interact with prompts
    Key([mod], "r",              lazy.spawncmd()),
    Key([mod], "g",              lazy.switchgroup()),

    # start specific apps
Пример #10
0
    # layout.Stack(stacks=2, **layout_theme),
    # layout.Columns(**layout_theme),
    # layout.RatioTile(**layout_theme),
    # layout.VerticalTile(**layout_theme),
    # layout.Matrix(**layout_theme),
    # layout.Zoomy(**layout_theme),
    default_tall,
    default_max,
    # layout.Tile(shift_windows=True, **layout_theme),
    # layout.Stack(num_stacks=2),
    # layout.Floating(**layout_theme)
]

keys = [
    ### The essentials
    Key([mod], "Return", lazy.spawn(my_term), desc="Launches Terminal"),
    Key([mod], "space", lazy.spawn("rofi -show drun"), desc="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], "e", lazy.spawn("emacs"), desc="Doom Emacs"),
    ### Switch focus to specific monitor (out of three)
    Key([mod], "z", lazy.to_screen(0), desc="Keyboard focus to monitor 1"),
    Key([mod], "x", lazy.to_screen(1), desc="Keyboard focus to monitor 2"),
    Key([mod], "c", lazy.to_screen(2), desc="Keyboard focus to monitor 3"),
    ### Window controls
    Key([mod],
        "j",
        lazy.layout.down(),
        desc="Move focus down in current stack pane"),
    Key([mod],
Пример #11
0
import re
import socket
import subprocess
from libqtile import qtile
from libqtile.config import Click, Drag, Group, KeyChord, Key, Match, Screen
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"
terminal = "alacritty"

keys = [
    # 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],
        "Tab",
        lazy.layout.down(),
        desc="Use the tab key to cycle through windows."),
    #Key([mod], "Tab", lazy.layout.next(), desc="Move window focus to other window"),

    # Move windows
    Key([mod, "control"],
        "h",
        lazy.layout.shuffle_left(),
        desc="Move window to the left"),
    Key([mod, "control"],
Пример #12
0
    if qtile.currentWindow is not None:
        i = qtile.groups.index(qtile.currentGroup)
        qtile.currentWindow.togroup(qtile.groups[i - 1].name)


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 = [

    # Launch terminal, kill window, restart and exit Qtile

    Key([mod], "Return", lazy.spawn(myTerm)),
    Key([mod], "x", lazy.window.kill()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod, "control"], "s", lazy.spawn("powerspec.sh")),

    # Toggle layouts

    Key([mod], "n", lazy.layout.normalize()),
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod, "shift"], "space", lazy.window.toggle_floating()),

    # Change window focus

    Key([mod], "Up", lazy.layout.up()),
    Key([mod], "Down", lazy.layout.down()),
Пример #13
0
    pass

mod = "mod4"


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


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

    # Move windows up or down in current stack
    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()),

    # Resize windows
    Key([mod], "i", lazy.layout.grow()),
    Key([mod], "m", lazy.layout.shrink()),
    Key([mod], "n", lazy.layout.normalize()),
Пример #14
0
 # Key([mod, alt], 'h', lazy.layout.integrate_left()),
 # Key([mod, alt], 'j', lazy.layout.integrate_down()),
 # Key([mod, alt], 'k', lazy.layout.integrate_up()),
 # Key([mod, alt], 'l', lazy.layout.integrate_right()),
 # Key([mod], 'd', lazy.layout.mode_horizontal()),
 # Key([mod], 'v', lazy.layout.mode_vertical()),
 # Key([mod, 'shift'], 'd', lazy.layout.mode_horizontal_split()),
 # Key([mod, 'shift'], 'v', lazy.layout.mode_vertical_split()),
 # Key([mod], 'a', lazy.layout.grow_width(30)),
 # Key([mod], 'x', lazy.layout.grow_width(-30)),
 # Key([mod, 'shift'], 'a', lazy.layout.grow_height(30)),
 # Key([mod, 'shift'], 'x', lazy.layout.grow_height(-30)),
 # # Key([mod], 'C-5', lazy.layout.size(500)),
 # # Key([mod], 'C-8', lazy.layout.size(800)),
 # Key([mod], 'n', lazy.layout.reset_size()),
 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, "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], "Return", lazy.layout.toggle_split()),
 Key([mod], "n", lazy.layout.normalize()),
 Key([mod, "shift"], "j", lazy.layout.shuffle_down(),
     lazy.function(update_widget, 'stackitems')),
 Key([mod, "shift"], "k", lazy.layout.shuffle_up(),
     lazy.function(update_widget, 'stackitems')),
 Key([mod, "shift"], "h", lazy.layout.shuffle_left(),
     lazy.function(update_widget, 'stackitems')),
Пример #15
0
from keys import init_keys
from widgets import init_widget_defaults, init_widget_list

########################################

mod = "mod4"
myTerm = "urxvtc"

keys = init_keys(mod, myTerm)

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

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

########################################
## => LAYOUTS
########################################

layout_theme = {
    "border_width": 3,
    "margin": 3,
    "border_focus": "5E0000",
    "border_normal": "1D2330"
}
Пример #16
0
    sock = socket.socket()
    sock.connect(("localhost", 61155))
    #data = json.loads(sock.recv(1024))
    #print data
    msg = json.dumps({"to": "fireipc/fijango", "command": command})
    sock.send(msg + "\n0")
    sock.close()


#   Key Bindings
# ----------------

mod = 'mod4'
keys = [
    # Movement
    Key([mod], "h", lazy.screen.prevgroup(skip_managed=True)),
    Key([mod], "l", lazy.screen.nextgroup(skip_managed=True)),
    Key([mod], "k", lazy.layout.down()),
    Key([mod], "j", lazy.layout.up()),

    Key([mod, "shift"], "k", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_up()),

    Key([mod], "i", lazy.layout.grow()),
    Key([mod], "m", lazy.layout.shrink()),

    Key([mod], "n", lazy.layout.normalize()),
    Key([mod], "o", lazy.layout.maximize()),

    Key([mod, "shift"], "space", lazy.layout.flip()),
    #Key([mod, "shift"], "space", lazy.layout.rotate()),
Пример #17
0
mod = "mod4"
mod1 = "alt"
mod2 = "control"
home = os.path.expanduser('~')
myTerm = "termite"
myBrowser = "brave"
myFileManager = "nemo"
myTextEditor = "atom"
myOfficeSuite = "libreoffice"
# myLaTeXEditor = "gnome-latex"
myMusicPlayer = "spotify"
myConfig = "/home/adrian/.config/qtile/config.py"

keys = [
    ### Qtile Controls
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "x", lazy.spawn('arcolinux-logout')),
    # Key([mod, "shift"], "x", lazy.shutdown()),

    ### The Essentials
    Key([mod], "Return", lazy.spawn(myTerm + " -e zsh")),
    Key([mod], "d", lazy.spawn(myFileManager)),
    Key([mod], "e", lazy.spawn(myTextEditor)),
    #    Key([mod], "d",
    #       lazy.spawn("dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn 'NotoMonoRegular:bold:pixelsize=18'")),
    Key([mod], "b", lazy.spawn(myBrowser)),
    Key([mod], "v", lazy.spawn('pavucontrol')),
    Key([mod], "q", lazy.window.kill()),
    # Key([mod], "c", lazy.spawn('conky-toggle')),
Пример #18
0
from libqtile.command import lazy
from libqtile.config import Click, Drag, Key
from groups import groups
from misc import mod

keys = [
    # Bsp layout recommended shortcuts
    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, 'mod1'], 'j', lazy.layout.flip_down()),
    Key([mod, 'mod1'], 'k', lazy.layout.flip_up()),
    Key([mod, 'mod1'], 'h', lazy.layout.flip_left()),
    Key([mod, 'mod1'], 'l', lazy.layout.flip_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, 'shift'], 'n', lazy.layout.normalize()),

    # Inherited from default configuration
    Key([mod], 'space', lazy.layout.next()),
    Key([mod, 'shift'], 'space', lazy.layout.rotate()),
    Key([mod, 'shift'], 'Return', lazy.layout.toggle_split()),
    Key([mod], 'Tab', lazy.next_layout()),
    Key([mod], 'w', lazy.window.kill()),
Пример #19
0
@hook.subscribe.startup
def autostart():

    try:
        home = os.path.expanduser('~')
        subprocess.Popen([home + '/.config/qtile/autostart.sh'])
    except:
        print("Error")


mod = "mod4"
terminal = guess_terminal()

keys = [
    # 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 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"],
Пример #20
0
#!/usr/bin/env python
# coding: utf-8

from threading import Thread
from time import sleep
import subprocess

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, "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()),
    Key([mod], "F11", lazy.window.toggle_fullscreen()),

    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
Пример #21
0

def backlightdown(qtile):
    qtile.cmd_spawn("sudo light -U 10")


def backlightdown_fine(qtile):
    qtile.cmd_spawn("sudo light -U 5")


# Map keybindings
keys = [
    # Logout and restart
    Key(
        [mod, "control"], "r",
        lazy.restart(),
        desc="Refresh Qtile"
    ),
    Key(
        [mod, "shift"], "q",
        lazy.shutdown(),
        desc="Log out of session"
    ),
    Key(
        ["shift", "mod1"], "q",
        lazy.shutdown(),
        desc="From tych0: logout keybinding in case mod4 gets hosed"
    ),

    # Spawn and kill
    Key(
Пример #22
0
### MISC FUNCTIONS ###
# Brings all floating windows to the front
@lazy.function
def float_to_front(qtile):
    logging.info("bring floating windows to front")
    for group in qtile.groups:
        for window in group.windows:
            if window.floating:
                window.cmd_bring_to_front()


### KEYBINDS ###
keys = [
    # General Keybinds
    Key([mod], "Return", lazy.spawn(term)),
    Key([mod], "d", lazy.spawn("rofi -show drun")),
    Key([mod], "q", lazy.spawn("nautilus")),
    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()),
    # 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], "h", lazy.layout.left(),),
    Key([mod], "l", lazy.layout.right(),),
    Key(
        [mod, "shift"],
        "k",
        lazy.layout.shuffle_down(),
Пример #23
0
from libqtile import bar, layout, widget, hook
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy

# Main key set to "Windows key", aka "super"
mod = "mod4"
# Useful if we want alt
alt = "mod1"
# Set the terminal program here
terminal = os.path.expanduser("~/.local/bin/alacritty")

#### Key Maps ####

keys = [
    ### The essentials
    Key([mod], "Return", lazy.spawn(terminal), desc='Launches My Terminal'),
    Key(
        [mod, "shift"],
        "Return",
        lazy.spawn(
            "rofi -show drun -config ~/.config/rofi/themes/center.rasi -display-drun" +
            " \"Run: \" -drun-display-format \"{name}\""
        ),
        desc='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"], "v", lazy.spawn("code ."), desc='Open VS Code here'),
    Key(["control", "shift"], "e", lazy.spawn("vim ."), desc='Open vim here'),
Пример #24
0
    qtile.cmd_restart()


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

####################################################################################################

# Key Bindings

keys = [

    # 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 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"],
Пример #25
0
from libqtile.layout.stack import Stack
from libqtile.layout.xmonad import MonadTall
from libqtile.lazy import lazy

from my_widgets import MyWidgets

# Mod key
mod = "mod4"

# Browser
browser = "brave"

# ============ Basic Behavior ============
keys = [
    # Close window
    Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
    # Restart qtile
    Key([mod, "shift"], "r", lazy.restart(), desc="Restart qtile"),
    # Lock screen
    Key([mod, "shift"],
        "x",
        lazy.spawn("betterlockscreen -l blur"),
        desc="Lock screen."),
    # Exit qtile
    KeyChord(
        [mod, "shift"],
        "e",
        [
            Key([], "l", lazy.shutdown(), desc="Log off"),
            Key([], "r", lazy.spawn("systemctl reboot"), desc="Reboot PC"),
            Key([], "p", lazy.spawn("systemctl poweroff"), desc="Shutdown"),
Пример #26
0
        side = qtile.current_layout._slice.window
        if qtile.current_window is side:
            qtile.current_group.cmd_focus_back()
        else:
            qtile.current_group.focus(side)
    elif qtile.current_layout.name == 'columns':
        if direction == 'left':
            qtile.current_layout.cmd_left()
        elif direction == 'right':
            qtile.current_layout.cmd_right()
    else:
        qtile.current_layout.cmd_next()


keys = [
    Key([mod], 'j', lazy.layout.down()),
    Key([mod], 'k', lazy.layout.up()),
    Key([mod], 'h', lazy.function(custom_focus, 'left')),
    Key([mod], 'l', lazy.function(custom_focus, 'right')),
    Key([mod], 'w', lazy.to_screen(1)),
    Key([mod], 'e', lazy.to_screen(0)),
    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], 'Return', lazy.layout.toggle_split()),
    Key([mod], 'n', lazy.layout.normalize()),
    Key([mod, 'shift'], 'j', lazy.layout.shuffle_down(),
        lazy.function(update_widget, 'stackitems')),
    Key([mod, 'shift'], 'k', lazy.layout.shuffle_up(),
        lazy.function(update_widget, 'stackitems')),
Пример #27
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 = "st"  # My terminal of choice
myConfig = "/home/lutherus/.config/qtile/config.py"  # The Qtile config file location

##### KEYBINDINGS #####
keys = [
    ### The essentials
    Key(
        [mod],
        "Return",
        lazy.spawn(myTerm)  # Open terminal
    ),
    Key(
        [mod],
        "v",  # Dmenu Run Launcher
        lazy.spawn("dmenu_run -p 'Run: '")),
    Key(
        [mod],
        "Tab",
        lazy.next_layout()  # Toggle through layouts
    ),
    Key(
        [mod, "shift"],
        "c",
        lazy.window.kill()  # Kill active window
Пример #28
0
from typing import List  # noqa: F401
import os
from libqtile import bar, layout, widget
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal

mod = "mod4"
Terminal = guess_terminal()
vol = "/home/sophos/volume-notification-dunst/volume.sh"
keys = [
    Key([], "XF86AudioRaiseVolume", lazy.spawn(f"{vol} up")),
    Key([], "XF86AudioLowerVolume", lazy.spawn(f"{vol} down")),
    Key([], "XF86AudioMute", lazy.spawn(f"{vol} mute")),

    Key([mod], "Return", lazy.spawn(Terminal), desc='Launches My Terminal'),
    Key([mod, "shift"], "Return", lazy.spawn("dmenu_run -p 'Run: '"), desc='Run Launcher'),

    Key([mod], "w",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([mod], "j", lazy.layout.down(), desc='Move focus down in current stack pane'),
    Key([mod], "k", lazy.layout.up(), desc='Move focus up in current stack pane'),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc='Move windows down in current stack'),
    Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc='Move windows up in current stack'),
    Key([mod], "h", lazy.layout.grow(), desc='Expand window (MonadTall)'),
    Key([mod], "l", lazy.layout.shrink(), desc='Shrink window (MonadTall)'),
    Key([mod, "shift"], "f", lazy.window.toggle_floating(), desc='toggle floating'),
    Key([mod], "space", lazy.layout.next(), desc='Switch window focus to other pane(s) of stack'),
    Key([mod], "Tab", lazy.next_layout(), desc="Toggle through layouts"),
Пример #29
0
def check_notifications_status():
    # is_paused = qtile.cmd_spawn('dunstctl is-paused')
    is_paused = subprocess.check_output('dunstctl is-paused',
                                        shell=True).decode().strip("\n")
    if is_paused == 'true':
        return "\uf59a"  # nf-mdi-bell_off
    else:
        return "\uf599"  # nf-mdi-bell


# }}}

# {{{ Keys
keys = [
    # 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.spawn("rofi -modi \"drun,calc,filebrowser\" -show drun"),
        desc="Show rofi"),
    # Key([mod, "ctrl"], "space",
    #     lazy.spawn("ulauncher"),
    #     desc="Show Ulauncher"),
    Key(["mod1"],
        "Tab",
        lazy.spawn("rofi -show window"),
        desc="Switch to a window"),
    Key([mod],
Пример #30
0
def window_to_prev_group(qtile):
    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('atom')),
    Key([mod], "c", lazy.spawn('conky-toggle')),
    Key([mod], "f", lazy.window.toggle_fullscreen()),
    Key([mod], "m", lazy.spawn('pragha')),
    Key([mod], "q", lazy.window.kill()),
    Key([mod], "r", lazy.spawn('rofi-theme-selector')),
    Key([mod], "t", lazy.spawn('urxvt')),
    Key([mod], "v", lazy.spawn('pavucontrol')),
    Key([mod], "w", lazy.spawn('vivaldi-stable')),
    Key([mod], "x", lazy.spawn('oblogout')),
    Key([mod], "Escape", lazy.spawn('xkill')),
    Key([mod], "Return", lazy.spawn('termite')),