# # QQQQQQQQQ tttt iiii lllllll # QQ:::::::::QQ ttt:::t i::::i l:::::l # QQ:::::::::::::QQ t:::::t iiii l:::::l # Q:::::::QQQ:::::::Q t:::::t l:::::l # Q::::::O Q::::::Qttttttt:::::ttttttt iiiiiii l::::l eeeeeeeeeeee # Q:::::O Q:::::Qt:::::::::::::::::t i:::::i l::::l ee::::::::::::ee # Q:::::O Q:::::Qt:::::::::::::::::t i::::i l::::l e::::::eeeee:::::ee # Q:::::O Q:::::Qtttttt:::::::tttttt i::::i l::::l e::::::e e:::::e # Q:::::O Q:::::Q t:::::t i::::i l::::l e:::::::eeeee::::::e # Q:::::O Q:::::Q t:::::t i::::i l::::l e:::::::::::::::::e # Q:::::O QQQQ:::::Q t:::::t i::::i l::::l e::::::eeeeeeeeeee # Q::::::O Q::::::::Q t:::::t tttttt i::::i l::::l e:::::::e # Q:::::::QQ::::::::Q t::::::tttt:::::ti::::::il::::::le::::::::e # QQ::::::::::::::Q tt::::::::::::::ti::::::il::::::l e::::::::eeeeeeee # QQ:::::::::::Q tt:::::::::::tti::::::il::::::l ee:::::::::::::e # QQQQQQQQ::::QQ ttttttttttt iiiiiiiillllllll eeeeeeeeeeeeee # Q:::::Q # QQQQQQ # ___ _ _ __ _ # / _ \ | | | / _(_) # / /_\ \_ __ ___ | | | ___ ___ ___ _ __ | |_ _ __ _ # | _ | '_ \ / _ \| | |/ _ \ / __/ _ \| '_ \| _| |/ _` | # | | | | |_) | (_) | | | (_) | | (_| (_) | | | | | | | (_| | # \_| |_/ .__/ \___/|_|_|\___/ \___\___/|_| |_|_| |_|\__, | # | | __/ | # |_| |___/ import os import subprocess from libqtile import layout, bar, widget, hook from libqtile.config import Click, Drag, Group, Key, Match, Screen, Rule from libqtile.command import lazy from libqtile.widget import Spacer from keys import MyKeys from libqtile.dgroups import simple_key_binder #from widgets import * @hook.subscribe.startup_once def start_once(): autostart_path = os.path.expanduser('~/.config/autostart/autostart.sh') subprocess.run([autostart_path]) @lazy.function def window_to_prev_group(qtile): if qtile.currentWindow is not None: i = qtile.groups.index(qtile.currentGroup) qtile.currentWindow.togroup(qtile.groups[i - 1].name) @lazy.function def window_to_next_group(qtile): if qtile.currentWindow is not None: i = qtile.groups.index(qtile.currentGroup) qtile.currentWindow.togroup(qtile.groups[i + 1].name) my_keys = MyKeys() keys = my_keys.init_keys() dgroups_key_binder = simple_key_binder("mod4") groups = [] group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0",] group_labels = ["Ⅰ", "Ⅱ", "Ⅲ", "Ⅳ", "Ⅴ", "Ⅵ", "Ⅶ", "Ⅷ", "Ⅸ", "Ⅹ",] group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall",] for i in range(len(group_names)): groups.append( Group( name=group_names[i], layout=group_layouts[i].lower(), label=group_labels[i], )) def init_layout_theme(): return {"margin":5, "border_width":2, "border_focus": "#5e81ac", "border_normal": "#4c566a" } layout_theme = init_layout_theme() layouts = [ #layout.MonadTall(margin=8, border_width=2, border_focus="#5e81ac", border_normal="#4c566a"), layout.MonadTall(**layout_theme), #layout.MonadWide(margin=8, border_width=2, border_focus="#5e81ac", border_normal="#4c566a"), # layout.MonadWide(**layout_theme), # layout.Matrix(**layout_theme), # layout.Bsp(**layout_theme), # layout.Floating(**layout_theme), # layout.RatioTile(**layout_theme), layout.Max(**layout_theme) ] def init_colors(): return [ ["#2F343F", "#2F343F"], # color 0 ["#000000", "#000000"], # black 1 ["#2F343F", "#2F343F"], # color 2 ["#c0c5ce", "#c0c5ce"], # color 3 ["#fba922", "#fba922"], # color 4 ["#3384d0", "#3384d0"], # Blue 5 ["#f3f4f5", "#f3f4f5"], # color 6 ["#cd1f3f", "#cd1f3f"], # color 7 ["#62FF00", "#62FF00"], # color 8 ["#6790eb", "#6790eb"], # color 9 ["#a9a9a9", "#a9a9a9"], # color 10 ['#ff0000', "#ff0000"], # red 11 ] colors = init_colors() # WIDGETS FOR THE BAR def init_widgets_defaults(): return dict(font="Noto Sans", fontsize = 12, padding = 2, background=colors[1]) widget_defaults = init_widgets_defaults() def init_widgets_list(): widgets_list = [ widget.Sep( linewidth = 1, padding = 6, foreground = colors[2], background = colors[1] ), widget.Image( filename = "~/.config/qtile/caduceus.jpg", scale = "True", ), widget.GroupBox( font="FontAwesome", fontsize = 20, margin_y = 3, margin_x = 0, padding_y = 6, padding_x = 5, borderwidth = 1, disable_drag = True, active = colors[5], inactive = colors[10], rounded = False, highlight_color = colors[1], highlight_method = "line", this_current_screen_border = colors[11], other_current_screen_border = colors[10], foreground = colors[2], background = colors[1], ), widget.Sep( linewidth = 1, padding = 10, foreground = colors[2], background = colors[1] ), widget.CurrentLayout( font = "Noto Sans Bold", foreground = colors[4], background = colors[1] ), widget.Sep( linewidth = 1, padding = 10, foreground = colors[2], background = colors[1] ), widget.WindowName(font="Noto Sans", fontsize = 12, foreground = colors[8], background = colors[1], ), # widget.Sep( # linewidth = 1, # padding = 10, # foreground = colors[2], # background = colors[1] # ), # widget.Net( # format='{interface}: U {up} D {down} T {total}' # ), widget.Sep( linewidth = 1, padding = 10, foreground = colors[2], background = colors[1] ), # widget.Image( # filename='~/Pictures/arch/qwe_download.png', # scale = "True", # ), widget.TextBox( font="FontAwesome", text= '|' + str(subprocess.check_output("uname -r", shell=True).strip()).replace('b','') + '|', foreground=colors[5], background=colors[1], padding = 0, fontsize=14 ), widget.Sep( linewidth = 1, padding = 10, foreground = colors[2], background = colors[1] ), widget.Memory( measure_mem="G", fontsize=15, graph_color = colors[11] ), widget.MemoryGraph( type='box' ), widget.Sep( linewidth = 1, padding = 10, foreground = colors[2], background = colors[1] ), widget.ThermalSensor( format='{tag}: {temp:.Of}{unit}', threshold=50, fontsize=15, ), widget.CPUGraph( type='box', graph_color = colors[5] ), widget.Sep( linewidth = 1, padding = 10, foreground = colors[2], background = colors[1] ), widget.TextBox( font="FontAwesome", text="  ", foreground=colors[5], background=colors[1], padding = 0, fontsize=18 ), widget.Clock( font='Mono', foreground = colors[3], background = colors[1], fontsize = 18, format="%d-%m-%Y | %H:%M" ), widget.Sep( linewidth = 1, padding = 3, foreground = colors[2], background = colors[1] ), widget.Systray( background=colors[1], icon_size=21, padding = 10 ), widget.Sep( linewidth = 1, padding = 20, foreground = colors[2], background = colors[1] ), ] return widgets_list widgets_list = init_widgets_list() def init_widgets_screen1(): widgets_screen1 = init_widgets_list() return widgets_screen1 def init_widgets_screen2(): widgets_screen2 = init_widgets_list() return widgets_screen2[:-2] widgets_screen1 = init_widgets_screen1() widgets_screen2 = init_widgets_screen2() def init_screens(): return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), size=33, opacity=0.8)), Screen(top=bar.Bar(widgets=init_widgets_screen2(), size=26, opacity=0.8))] screens = init_screens() follow_mouse_focus = True bring_front_click = False cursor_warp = False auto_fullscreen = True focus_on_window_activation = "focus" # or smart wmname = "Qtile-Apo11o"