This commit is contained in:
paul-loedige
2021-02-01 14:32:39 +01:00
3 changed files with 88 additions and 2 deletions
+9 -1
View File
@@ -2,7 +2,7 @@ from libqtile import widget, bar
from defines import base_color
from defines import blue_color
from Widgets import Left_widgets, volume_widget, System_widgets, end_widgets
from Widgets import Left_widgets, volume_widget, System_widgets, end_widgets, Laptop_widgets
widget_defaults = dict(
background=base_color,
@@ -25,6 +25,14 @@ main_bar = bar.Bar([
*end_widgets(blue_color,main_bar_height,main_bar_fontsize),
],main_bar_height)
laptop_bar = bar.Bar([
*Left_widgets(main_bar_height,main_bar_fontsize,True),
widget.Systray(fontsize=main_bar_fontsize),
*volume_widget(base_color,blue_color,main_bar_height,main_bar_fontsize),
*Laptop_widgets(blue_color,blue_color,main_bar_height,main_bar_fontsize),
*end_widgets(blue_color,main_bar_height,main_bar_fontsize),
],main_bar_height)
#left bar
left_bar = bar.Bar([
*Left_widgets(secondary_bar_height,secondary_bar_fontsize),
+65
View File
@@ -189,4 +189,69 @@ def end_widgets(prev_color,size,fontsize):
format='%H:%M'
),
]
#endregion
#region Laptop widgets
def Laptop_widgets(prev_color,last_color,size,fontsize):
return [
*powerline_arrow('l',prev_color,red_color,size),
widget.Battery(
foreground=dark_foreground_color,
background=red_color,
fontsize=fontsize,
update_interval=1,
format="{percent:2.0%}",
),
*powerline_arrow('l',red_color,green_color,size),
widget.Image(
filename='~/.config/qtile/icons/cpu.png',
margin=5,
background=green_color,
mouse_callbacks = launch_htop,
),
widget.CPU(
foreground=dark_foreground_color,
background=green_color,
fontsize=fontsize,
format='{load_percent}%',
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',green_color,orange_color,size),
widget.Image(
filename='~/.config/qtile/icons/ram.png',
background=orange_color,
margin=-10,
mouse_callbacks = launch_htop,
),
MemoryC(
foreground=dark_foreground_color,
background=orange_color,
fontsize=fontsize,
format=" {MemUsed}GB | {SwapUsed}GB",
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',orange_color,last_color,size),
widget.Image(
filename='~/.config/qtile/icons/network.png',
background=blue_color,
margin=5,
mouse_callbacks = launch_htop,
),
widget.Net(
background=last_color,
foreground=dark_foreground_color,
fontsize=fontsize,
fmt='{:.9}',
format='{down}',
mouse_callbacks = launch_htop,
),
widget.Net(
background=last_color,
foreground=dark_foreground_color,
fontsize=fontsize,
fmt='{:.9}',
format='{up}',
mouse_callbacks = launch_htop,
),
]
#endregion
+14 -1
View File
@@ -1,7 +1,7 @@
import os
import sys
from libqtile import layout, bar, widget
from libqtile import layout, bar, widget, hook
from libqtile.config import Key, Drag, Click, Group, Screen, ScratchPad, DropDown
from libqtile.command import lazy
@@ -14,6 +14,19 @@ from Layouts import layouts, floating_layout
from Bars import top_bar, left_bar, main_bar, widget_defaults, extension_defaults
from Screens import screens
#region Hooks
@hook.subscribe.startup_once
def autostart():
processes = [
['nitrogen','--restore'],
['dunst'],
['nextcloud'],
['redshift-gtk'],
['udiskie']
]
for process in processes:
subprocess.Popen(process)
#region miscelanious
dgroups_key_binder = None
dgroups_app_rules = [] # type: List