updated qtile config
This commit is contained in:
144
qtile/config.py
144
qtile/config.py
@@ -32,6 +32,7 @@ from qtile_extras import widget
|
||||
from qtile_extras.widget.decorations import PowerLineDecoration
|
||||
import subprocess
|
||||
import os
|
||||
import logging
|
||||
from libqtile import hook
|
||||
|
||||
@hook.subscribe.startup
|
||||
@@ -54,7 +55,19 @@ browser = "flatpak run com.microsoft.Edge"
|
||||
|
||||
@hook.subscribe.startup_once
|
||||
def autostart_once():
|
||||
subprocess.run('$HOME/.config/qtile/autostart.sh')
|
||||
subprocess.run('/home/danmac/.config/qtile/autostart.sh')
|
||||
|
||||
@hook.subscribe.startup
|
||||
def autostart():
|
||||
subprocess.run('/home/danmac/.config/qtile/refresh.sh')
|
||||
|
||||
colors = {
|
||||
"orange": "F8954F",
|
||||
"teal": "34C2D4",
|
||||
"purple": "6659AA",
|
||||
"blue": "3E86BC",
|
||||
"red": "EB6286",
|
||||
}
|
||||
|
||||
keys = [
|
||||
# A list of available commands that can be bound to keys can be found
|
||||
@@ -65,6 +78,13 @@ keys = [
|
||||
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"),
|
||||
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"),
|
||||
Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window"),
|
||||
Key([mod, "shift"], "Left", lazy.next_screen(), desc="Move to next screen"),
|
||||
Key([mod, "shift"], "Right", lazy.prev_screen(), desc="Move to previous screen"),
|
||||
# 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"),
|
||||
@@ -78,6 +98,7 @@ keys = [
|
||||
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"),
|
||||
Key([mod], "f", lazy.window.toggle_floating(), desc="Toggle floating"),
|
||||
# Toggle between split and unsplit sides of stack.
|
||||
# Split = all windows displayed
|
||||
# Unsplit = 1 window displayed, like Max layout, but still with
|
||||
@@ -88,9 +109,18 @@ keys = [
|
||||
lazy.layout.toggle_split(),
|
||||
desc="Toggle between split and unsplit sides of stack",
|
||||
),
|
||||
# launch things
|
||||
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
||||
Key([mod], "b", lazy.spawn(browser), desc="Launch Browser"),
|
||||
Key([mod], "f", lazy.spawn("firefox"), desc="Launch Firefox"),
|
||||
Key([mod, "control"], "b", lazy.spawn(browser), desc="Launch Browser"),
|
||||
Key([mod, "control"], "f", lazy.spawn("firefox"), desc="Launch Firefox"),
|
||||
Key([mod, "control"], "t", lazy.spawn("gtk-launch com.microsoft.Edge.flextop.msedge-cifhbcnohmdccbgoicgdjpfamggdegmo-Default.desktop"), desc="Launch Teams"),
|
||||
Key([mod, "control"], "w", lazy.spawn("VirtualBoxVM --startvm rnet-windows"), desc="Launch Windows VM"),
|
||||
Key([mod, "control"], "y", lazy.spawn("gtk-launch arch-FFPWA-01H62W1P23FQGJ1KW173SWKGX5.desktop"), desc="Launch YouTube"),
|
||||
Key([mod, "control"], "p", lazy.spawn("gtk-launch arch-FFPWA-01HA11SJ7BT86K183EGJNBV6DS.desktop"), desc="Launch Pocketcasts"),
|
||||
Key([mod, "control"], "v", lazy.spawn("VirtualBox"), desc="Launch VirtualBox"),
|
||||
Key([mod, "control"], "c", lazy.spawn("gtk launch arch-codium.dekstop"), desc="Launch VSCodium"),
|
||||
Key([mod, "control"], "j", lazy.spawn("gtk-launch arch-jetbrains-pycharm-43d13f8e-7346-4852-a7fd-0d05261a1dc0.desktop"), desc="Launch PyCharm"),
|
||||
Key([], "Print", lazy.spawn("org.flameshot.Flameshot gui"), desc="Screenshot"),
|
||||
# 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"),
|
||||
@@ -98,8 +128,6 @@ keys = [
|
||||
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
|
||||
Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
|
||||
Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause"), desc="Play Pause media"),
|
||||
Key([], "XF86AudioNext", lazy.spawn("playerctl next"), desc="Skip to next track"),
|
||||
Key([], "XF86AudioPrev", lazy.spawn("playerctl prev"), desc="Skip to previous track"),
|
||||
Key([], "XF86AudioMute", lazy.spawn("amixer set Master 1+ toggle"), desc="Mute sound"),
|
||||
Key([], "XF86AudioLowerVolume", lazy.spawn("amixer set Master 5%-"), desc="Reduce volume"),
|
||||
Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer set Master 5%+"), desc="Increase volume"),
|
||||
@@ -133,31 +161,64 @@ for i in groups:
|
||||
]
|
||||
)
|
||||
|
||||
layout_defaults = {
|
||||
"border_width": 2,
|
||||
"margin": 8,
|
||||
"border_focus": colors["red"],
|
||||
}
|
||||
|
||||
layouts = [
|
||||
layout.Columns(border_focus_stack=["#3333cc", "#3366ff"], border_width=4, margin=8, border_focus="#99b3ff"),
|
||||
layout.Columns(border_focus_stack=["#3333cc", "#3366ff"], **layout_defaults),
|
||||
layout.Max(),
|
||||
# Try more layouts by unleashing below layouts.
|
||||
# layout.Stack(num_stacks=2),
|
||||
# layout.Bsp(),
|
||||
# layout.Matrix(),
|
||||
# layout.MonadTall(),
|
||||
layout.MonadTall(ratio=0.75, **layout_defaults),
|
||||
# layout.MonadThreeCol(margin=8),
|
||||
# layout.MonadWide(),
|
||||
# layout.RatioTile(),
|
||||
# layout.Tile(),
|
||||
layout.Tile(**layout_defaults),
|
||||
# layout.TreeTab(),
|
||||
# layout.VerticalTile(),
|
||||
# layout.Zoomy(),
|
||||
]
|
||||
|
||||
# defaults for groups
|
||||
groups[0].layout = "monadtall"
|
||||
# groups[1].spawn = "flatpak run com.microsoft.Edge"
|
||||
|
||||
powerline = {
|
||||
"decorations": [
|
||||
PowerLineDecoration()
|
||||
]
|
||||
}
|
||||
|
||||
lb_progs = [
|
||||
("com.microsoft.Edge","flatpak run com.microsoft.Edge","Launch Micorosoft Edge"),
|
||||
("msedge-cifhbcnohmdccbgoicgdjpfamggdegmo-Default", "gtk-launch com.microsoft.Edge.flextop.msedge-cifhbcnohmdccbgoicgdjpfamggdegmo-Default.desktop", "Launch Microsoft Teams"),
|
||||
("teams.png", "gtk-launch com.microsoft.Edge.flextop.msedge-cifhbcnohmdccbgoicgdjpfamggdegmo-Profile_1.desktop", "Launch Microsoft Teams"),
|
||||
# ("FFPWA-01H62W1P23FQGJ1KW173SWKGX5", "gtk-launch arch-FFPWA-01H62W1P23FQGJ1KW173SWKGX5.desktop",""),
|
||||
("firefox.png", "firefox", "Launch Firefox"),
|
||||
("virtualbox.png", "VirtualBox", "Launch VirtualBox"),
|
||||
("PyCharm_Icon.svg.png", "gtk-launch arch-jetbrains-pycharm-43d13f8e-7346-4852-a7fd-0d05261a1dc0.desktop", "Launch PyCharm"),
|
||||
("/home/danmac/.local/share/icons/org.gnome.Nautilus.png", "nautilus", "Launch Files"),
|
||||
("vscodium.png", "gtk-launch arch-codium.desktop", "Launch Codium"),
|
||||
("FFPWA-01HA11SJ7BT86K183EGJNBV6DS", "gtk-launch arch-FFPWA-01HA11SJ7BT86K183EGJNBV6DS.desktop",""),
|
||||
("🔊", "pavucontrol", "Launch pavucontrol"),
|
||||
]
|
||||
|
||||
app_launcher = widget.WidgetBox(
|
||||
widgets=[widget.LaunchBar(scale=0.7,progs=lb_progs, padding=12, background=colors["red"])],
|
||||
background=colors["red"],
|
||||
text_closed=" ▶ ",
|
||||
text_open=" ◀ ",
|
||||
**powerline
|
||||
)
|
||||
|
||||
|
||||
shutdown_progs = [
|
||||
("reboot", "systemctl reboot", "Reboot"),
|
||||
("shutdown", "systemctl shutdown", "Shutdown"),
|
||||
]
|
||||
|
||||
widget_defaults = dict(
|
||||
@@ -167,20 +228,15 @@ widget_defaults = dict(
|
||||
)
|
||||
extension_defaults = widget_defaults.copy()
|
||||
|
||||
powerline = {
|
||||
"decorations": [
|
||||
PowerLineDecoration()
|
||||
]
|
||||
}
|
||||
|
||||
screens = [
|
||||
Screen(
|
||||
top=bar.Bar(
|
||||
[
|
||||
widget.CurrentLayoutIcon(padding=14, background="000000", **powerline),
|
||||
widget.GroupBox(background="333333", **powerline),
|
||||
widget.CurrentLayoutIcon(scale=0.7, padding=14, background=colors["teal"], **powerline),
|
||||
widget.GroupBox(background=colors["purple"], this_current_screen_border="ffffff", this_screen_border="ffffff", **powerline),
|
||||
# widget.Prompt(background="333333", **powerline),
|
||||
widget.WindowName(background="666666", **powerline),
|
||||
widget.WindowName(background=colors["blue"], **powerline),
|
||||
widget.Chord(
|
||||
chords_colors={
|
||||
"launch": ("#ff0000", "#ffffff"),
|
||||
@@ -191,10 +247,30 @@ screens = [
|
||||
# widget.TextBox("Press <M-r> to spawn", foreground="#d75f5f"),
|
||||
# NB Systray is incompatible with Wayland, consider using StatusNotifier instead
|
||||
# widget.StatusNotifier(),
|
||||
widget.LaunchBar(progs=lb_progs, padding=12, background="999999"),
|
||||
# app_launcher,
|
||||
widget.WidgetBox(
|
||||
widgets=[widget.LaunchBar(progs=lb_progs, padding=12, background=colors["red"]),],
|
||||
background=colors["red"],
|
||||
text_closed=" ▶ ",
|
||||
text_open=" ◀ ",
|
||||
**powerline
|
||||
),
|
||||
widget.Systray(background=colors["red"], **powerline),
|
||||
# widget.Spacer(background=colors["red"], length=2, **powerline),
|
||||
# widget.pulse_volume(),
|
||||
widget.Clock(format="%Y-%m-%d %a %I:%M %p", background="999999"),
|
||||
widget.PulseVolume(background=colors["purple"], **powerline),
|
||||
widget.UPowerWidget(background=colors["purple"], **powerline),
|
||||
widget.NvidiaSensors(background=colors["purple"], threshold=85, **powerline),
|
||||
widget.Clock(format="%a %d %b %Y %I:%M %p", background=colors["orange"], **powerline),
|
||||
# widget.QuickExit(),
|
||||
widget.WidgetBox(
|
||||
widgets=[
|
||||
widget.LaunchBar(padding=12, background=colors["teal"], progs=shutdown_progs),
|
||||
],
|
||||
background=colors["teal"],
|
||||
text_closed=" ⏻ ▶ ",
|
||||
text_open=" ⏻ ◀ ",
|
||||
),
|
||||
],
|
||||
32,
|
||||
# border_width=[2, 0, 2, 0], # Draw top and bottom borders
|
||||
@@ -206,26 +282,32 @@ screens = [
|
||||
Screen(
|
||||
top=bar.Bar(
|
||||
[
|
||||
widget.CurrentLayoutIcon(padding=14, background="000000", **powerline),
|
||||
widget.GroupBox(background="333333", **powerline),
|
||||
widget.Prompt(background="333333", **powerline),
|
||||
widget.WindowName(background="666666", **powerline),
|
||||
widget.CurrentLayoutIcon(scale=0.7,padding=14, background=colors["teal"], **powerline),
|
||||
widget.GroupBox(background=colors["purple"], this_current_screen_border="ffffff", this_screen_border="ffffff", **powerline),
|
||||
widget.Prompt(background=colors["purple"], **powerline),
|
||||
widget.WindowName(background=colors["blue"], **powerline),
|
||||
widget.Chord(
|
||||
chords_colors={
|
||||
"launch": ("#ff0000", "#ffffff"),
|
||||
},
|
||||
name_transform=lambda name: name.upper(),
|
||||
),
|
||||
widget.LaunchBar(progs=lb_progs, padding=12, background="999999"),
|
||||
# widget.TextBox("default config", name="default"),
|
||||
# widget.TextBox("Press <M-r> to spawn", foreground="#d75f5f"),
|
||||
# NB Systray is incompatible with Wayland, consider using StatusNotifier instead
|
||||
# widget.StatusNotifier(background="999999"),
|
||||
widget.Systray(background="999999"),
|
||||
# app_launcher,
|
||||
widget.WidgetBox(
|
||||
widgets=[widget.LaunchBar(progs=lb_progs, padding=12, background=colors["red"]),],
|
||||
background=colors["red"],
|
||||
text_closed=" ▶",
|
||||
text_open=" ◀",
|
||||
**powerline
|
||||
),
|
||||
# widget.Systray(background=colors["red"]),
|
||||
# widget.ALSAWidget(background="999999", mode="both"),
|
||||
widget.PulseVolume(background="999999", emoji=True),
|
||||
widget.UPowerWidget(background="999999"),
|
||||
widget.Clock(format="%Y-%m-%d %a %I:%M %p", background="999999"),
|
||||
# widget.Spacer(length=2, background=colors["red"], **powerline),
|
||||
widget.Clock(format="%a %d %b %Y %I:%M %p", background=colors["orange"]),
|
||||
],
|
||||
32,
|
||||
# border_width=[2, 0, 2, 0], # Draw top and bottom borders
|
||||
@@ -249,6 +331,7 @@ follow_mouse_focus = True
|
||||
bring_front_click = False
|
||||
cursor_warp = False
|
||||
floating_layout = layout.Floating(
|
||||
border_width=0,
|
||||
float_rules=[
|
||||
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||
*layout.Floating.default_float_rules,
|
||||
@@ -258,8 +341,9 @@ floating_layout = layout.Floating(
|
||||
Match(wm_class="ssh-askpass"), # ssh-askpass
|
||||
Match(title="branchdialog"), # gitk
|
||||
Match(title="pinentry"), # GPG key password entry
|
||||
Match(title="Sticky Notes"), # GPG key password entry
|
||||
Match(wm_class="xpad"), # GPG key password entry
|
||||
Match(title="Sticky Notes"),
|
||||
Match(wm_class="xpad"),
|
||||
Match(wm_class="gnome-calculator"),
|
||||
]
|
||||
)
|
||||
auto_fullscreen = True
|
||||
|
||||
Reference in New Issue
Block a user