reduce qtile config to XFCE

This commit is contained in:
Daniel Mevec 2024-09-30 22:36:00 +02:00
parent 9fc9f17117
commit c07794a6f4

View file

@ -20,17 +20,10 @@ from qutils import get_num_screens, get_network_interface, get_batteries, Colors
mod = "mod4" # Sets mod key to SUPER/WINDOWS mod = "mod4" # Sets mod key to SUPER/WINDOWS
myTerm = "alacritty" myTerm = "alacritty"
myBrowser = "firefox" myBrowser = "firefox"
{{ if eq .chezmoi.hostname "t450s" }}
myExplorer = "thunar" myExplorer = "thunar"
sound_ctrl = "pavucontrol" sound_ctrl = "pavucontrol"
update_distro_key = "Arch"
bt_ctrl = "blueman-manager"
{{ else }}
myExplorer = "nemo"
sound_ctrl = "cinnamon-settings sound"
update_distro_key = "Ubuntu" update_distro_key = "Ubuntu"
bt_ctrl = "blueberry" bt_ctrl = "blueman-manager"
{{ end }}
keys = [ keys = [
@ -38,7 +31,7 @@ keys = [
Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'), Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'),
Key([mod], "space", lazy.spawn("rofi -show run"), desc='Run Launcher'), Key([mod], "space", lazy.spawn("rofi -show run"), desc='Run Launcher'),
Key([mod], "b", lazy.spawn(myBrowser), desc='Qutebrowser'), Key([mod], "b", lazy.spawn(myBrowser), desc='Qutebrowser'),
Key([mod], "l", lazy.spawn("cinnamon-screensaver-command -a"), desc='Qutebrowser'), Key([mod], "l", lazy.spawn("xflock4"), desc='Screen Lock'),
Key([mod], "Tab", lazy.next_layout(), desc='Toggle through layouts'), Key([mod], "Tab", lazy.next_layout(), desc='Toggle through layouts'),
Key([mod, "shift"], "c", lazy.window.kill(), desc='Kill active window'), Key([mod, "shift"], "c", lazy.window.kill(), desc='Kill active window'),
Key([mod, "shift"], "r", lazy.restart(), desc='Restart Qtile'), Key([mod, "shift"], "r", lazy.restart(), desc='Restart Qtile'),
@ -246,14 +239,14 @@ def init_widgets_list():
foreground=Colors.bg, foreground=Colors.bg,
background=Colors.orange, background=Colors.orange,
threshold=90, threshold=90,
fmt='\uf8c7 {}', fmt='T {}',
**powerline, **powerline,
), ),
widget.CheckUpdates( widget.CheckUpdates(
update_interval=1800, update_interval=1800,
distro=update_distro_key, distro=update_distro_key,
markup=False, markup=False,
display_format="\uf546 {updates}", display_format="apt {updates}",
foreground=Colors.bg, foreground=Colors.bg,
colour_have_updates=Colors.bg, colour_have_updates=Colors.bg,
colour_no_updates=Colors.bg, colour_no_updates=Colors.bg,
@ -265,19 +258,19 @@ def init_widgets_list():
background=Colors.purple, background=Colors.purple,
mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')}, mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
fmt='{}', fmt='{}',
format='\uf85a{MemPercent:5.1f} %', format='M {MemPercent:5.1f}%',
**powerline, **powerline,
), ),
widget.CPU( widget.CPU(
foreground=Colors.bg, foreground=Colors.bg,
background=Colors.blue, background=Colors.blue,
fmt='{}', fmt='{}',
format='\ufb19{load_percent:5.1f}%', format='C {load_percent:5.1f}',
**powerline, **powerline,
), ),
widget.Net( widget.Net(
interface=get_network_interface(), interface=get_network_interface(),
format='{down} ↓↑ {up}', format='{down:6.2f} ↓↑ {up:6.2f}',
prefix='M', prefix='M',
foreground=Colors.bg, foreground=Colors.bg,
background=Colors.aqua, background=Colors.aqua,