This commit is contained in:
godot 2024-08-27 21:13:52 +02:00
parent 30cf92b879
commit 484cd6c2b3
4 changed files with 45 additions and 53 deletions

14
bar.py
View File

@ -1,7 +1,7 @@
from libqtile import bar, layout, widget
from libqtile import bar, layout, widget, hook
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
from libqtile.utils import guess_terminal, send_notification
widget_defaults = dict(
font="sans",
@ -37,7 +37,14 @@ screens = [
},
name_transform=lambda name: name.upper(),
),
widget.KeyboardLayout(
configured_keyboards=['us', 'cz qwerty'],
display_map={'us':'US', 'cz qwerty':'CZ'},
),
widget.Battery(
format="{char}{percent:2.0%} {hour:d}:{min:02d}"
),
widget.Clock(format="%Y-%m-%d %a %H:%M"),
],
30,
@ -48,3 +55,4 @@ screens = [
),
]

View File

@ -19,49 +19,6 @@ terminal = "alacritty"
# home os.path.expanduser("~/.config/qtile/autostart.sh")
# subprocess.run([home])
#keys = [
# # A list of available commands that can be bound to keys can be found
# # at https://docs.qtile.org/en/latest/manual/config/lazy.html
# # 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"], "l", lazy.layout.shuffle_right(), desc="Move window to the right"),
# Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
# Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
# # Grow windows. If current window is on the edge of screen and direction
# # will be to screen edge - window would shrink.
# Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"),
# Key([mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"),
# Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"),
# Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"),
# Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
# # Toggle between split and unsplit sides of stack.
# # Split = all windows displayed
# # Unsplit = 1 window displayed, like Max layout, but still with
# # multiple stack panes
# Key(
# [mod, "shift"],
# "Return",
# lazy.layout.toggle_split(),
# desc="Toggle between split and unsplit sides of stack",
# ),
# Key([mod], "Return", lazy.spawn('alacritty -o "window.opacity=0.9"'), desc="Launch terminal"),
# Key([mod], "w", lazy.spawn("firefox"), desc="Launch firefox"),
# # 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.reload_config(), desc="Reload the config"),
# Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
# Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
#]
groups = [Group(i) for i in "123456"]
for i in groups:
@ -188,6 +145,14 @@ auto_minimize = True
# When using the Wayland backend, this can be used to configure input devices.
wl_input_rules = None
# Hooks for groupebox
#@hook.subscribe.setgroup
#def setgroup():
# for i in range(0, 9):
# qtile.groups[i].label = "○"
# qtile.current_group.label = "◉"
# Gasp! We're lying here. In fact, nobody really uses or cares about this
# string besides java UI toolkits; you can see several discussions on the
# mailing lists, GitHub issues, and other WM documentation that suggest setting

12
keys.py
View File

@ -44,13 +44,19 @@ keys = [
desc="Toggle between split and unsplit sides of stack",
),
Key([mod], "Return", lazy.spawn('alacritty'), desc="Launch terminal"),
Key([mod], "s", lazy.spawn('rofi -show ssh'), desc="Spawn rofi SSH"),
Key([mod], "Return", lazy.spawn('alacritty'), desc="Launch terminal"),
Key([mod], "w", lazy.spawn("firefox"), desc="Launch firefox"),
Key([mod], "b", lazy.spawn("betterbird"), desc="Launch betterbird"),
Key([mod], "s", lazy.spawn('rofi -show ssh'), desc="Spawn rofi SSH"),
Key([mod], "r", lazy.spawn("rofi -show drun"), desc="Spawn rofi drun"),
# Change keyboard leyout
Key([mod], "k", lazy.widget["keyboardlayout"].next_keyboard(), desc="Next keyboard layout"),
# Toggle between different layouts as defined below
Key([mod], "space", lazy.spawn("swaylock -C /home/godot/.config/swaylock/swaylock.conf"), desc="Launch firefox"),
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.reload_config(), desc="Reload the config"),
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
Key([mod], "r", lazy.spawn("rofi -show drun"), desc="Spawn rofi drun"),
]

View File

@ -7,10 +7,23 @@ layouts = [
border_focus_stack=["#ffffff", "#000000"],
border_width=4,
),
layout.Max(
border_width=4,
border_focus=["ffffff", "ffffff", "ffffff", "ffffff"]
),
#layout.Max(
# border_width=4,
# border_focus=["ffffff", "ffffff", "ffffff", "ffffff"]
# ),
# Try more layouts by unleashing below layouts.
# layout.Stack(num_stacks=2),
# layout.Bsp(),
# layout.Max( ),
# layout.Matrix(),
# layout.MonadTall(),
# layout.MonadWide(),
# layout.RatioTile(),
# layout.Tile(),
# layout.TreeTab(),
# layout.VerticalTile(),
# layout.Zoomy(),
]
floating_layout = layout.Floating(