extend qtile config

This commit is contained in:
Andreas Zweili 2021-11-19 11:14:01 +01:00
parent 4fe16edc65
commit 7d6d8c1809
1 changed files with 10 additions and 45 deletions

View File

@ -1,29 +1,3 @@
# Copyright (c) 2010 Aldo Cortesi
# Copyright (c) 2010, 2014 dequis
# Copyright (c) 2012 Randall Ma
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2012 Craig Barnes
# Copyright (c) 2013 horsik
# Copyright (c) 2013 Tao Sauvage
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# 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 typing import List # noqa: F401
from libqtile import bar, layout, widget
@ -36,16 +10,16 @@ terminal = guess_terminal()
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], "k", lazy.layout.down()),
Key([mod], "j", 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, "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 "),
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()),
# Switch window focus to other pane(s) of stack
Key([mod], "space", lazy.layout.next(),
@ -73,7 +47,7 @@ keys = [
desc="Spawn a command using a prompt widget"),
]
groups = [Group(i) for i in "asdfuiop"]
groups = [Group(i) for i in "1234567890"]
for i in groups:
keys.extend([
@ -94,7 +68,7 @@ layouts = [
layout.Max(),
layout.Stack(num_stacks=2),
# Try more layouts by unleashing below layouts.
# layout.Bsp(),
layout.Bsp(),
# layout.Columns(),
# layout.Matrix(),
# layout.MonadTall(),
@ -121,17 +95,8 @@ screens = [
widget.GroupBox(),
widget.Prompt(),
widget.WindowName(),
widget.Chord(
chords_colors={
'launch': ("#ff0000", "#ffffff"),
},
name_transform=lambda name: name.upper(),
),
widget.TextBox("default config", name="default"),
widget.TextBox("Press <M-r> to spawn", foreground="#d75f5f"),
widget.Systray(),
widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
widget.QuickExit(),
],
24,
),