diff options
Diffstat (limited to '.config/qtile')
-rw-r--r-- | .config/qtile/config.py | 202 |
1 files changed, 26 insertions, 176 deletions
diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 88dcf24..b0f7fe8 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -43,7 +43,6 @@ from libqtile.widget import Spacer mod = "mod4" mod1 = "alt" mod2 = "control" -home = os.path.expanduser('~') image = '~/Pictures/symbols/arch-linux.png' @lazy.function @@ -168,10 +167,6 @@ keys = [ lazy.layout.flip(), desc='Switch which side main pane occupies (XmonadTall)' ), - Key([mod], "space", - lazy.layout.next(), - desc='Switch window focus to other pane(s) of stack' - ), Key([mod, "shift"], "space", lazy.layout.toggle_split(), desc='Toggle between split and unsplit sides of stack' @@ -205,20 +200,12 @@ def window_to_next_screen(qtile, switch_group=False, switch_screen=False): if switch_screen == True: qtile.cmd_to_screen(i + 1) -# keys.extend([ -# # MOVE WINDOW TO NEXT SCREEN -# Key([mod,"shift"], "Right", lazy.function(window_to_next_screen, switch_screen=True)), -# Key([mod,"shift"], "Left", lazy.function(window_to_previous_screen, switch_screen=True)), -# ]) groups = [] # FOR QWERTY KEYBOARDS group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0",] -# FOR AZERTY KEYBOARDS -#group_names = ["ampersand", "eacute", "quotedbl", "apostrophe", "parenleft", "section", "egrave", "exclam", "ccedilla", "agrave",] - #group_labels = ["1 ", "2 ", "3 ", "4 ", "5 ", "6 ", "7 ", "8 ", "9 ", "0",] group_labels = ["Ⅰ", "Ⅱ", "Ⅲ", "Ⅳ", "Ⅴ", "Ⅵ", "Ⅶ", "Ⅷ", "Ⅸ", "Ⅹ",] @@ -238,13 +225,10 @@ for i in groups: #CHANGE WORKSPACES Key([mod], i.name, lazy.group[i.name].toscreen()), -# Key([mod], "Tab", lazy.screen.next_group()), -# Key([mod, "shift" ], "Tab", lazy.screen.prev_group()), -# Key(["mod1"], "Tab", lazy.screen.next_group()), -# Key(["mod1", "shift"], "Tab", lazy.screen.prev_group()), # MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND STAY ON WORKSPACE Key([mod, "shift"], i.name, lazy.window.togroup(i.name)), + # MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND FOLLOW MOVED WINDOW TO WORKSPACE # Key([mod, "shift"], i.name, lazy.window.togroup(i.name) , lazy.group[i.name].toscreen()), ]) @@ -305,21 +289,21 @@ def init_widgets_defaults(): widget_defaults = init_widgets_defaults() def init_widgets_list(): - prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname()) widgets_list = [ - widget.Sep( - linewidth = 1, - padding = 6, - foreground = colors[2], - background = colors[1] - ), + + widget.Sep( + linewidth = 1, + padding = 6, + foreground = colors[2], + background = colors[1] + ), widget.Image( filename = image, - scale = "False", + scale = "True", mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm)} ), widget.GroupBox(font="FontAwesome", - fontsize = 16, + fontsize = 20, margin_y = 3, margin_x = 0, padding_y = 6, @@ -333,10 +317,8 @@ def init_widgets_list(): highlight_method = "line", this_current_screen_border = colors[11], other_current_screen_border = colors[10], - #this_screen_border = colors [5], - #other_screen_border = colors[9], foreground = colors[2], - background = colors[1] + background = colors[1], ), widget.Sep( linewidth = 1, @@ -360,135 +342,22 @@ def init_widgets_list(): foreground = colors[8], background = colors[1], ), - # widget.Net( - # font="Noto Sans", - # fontsize=12, - # interface="enp0s31f6", - # foreground=colors[2], - # background=colors[1], - # padding = 0, - # ), - # widget.Sep( - # linewidth = 1, - # padding = 10, - # foreground = colors[2], - # background = colors[1] - # ), - # widget.NetGraph( - # font="Noto Sans", - # fontsize=12, - # bandwidth="down", - # interface="auto", - # fill_color = colors[8], - # foreground=colors[2], - # background=colors[1], - # graph_color = colors[8], - # border_color = colors[2], - # padding = 0, - # border_width = 1, - # line_width = 1, - # ), - # widget.Sep( - # linewidth = 1, - # padding = 10, - # foreground = colors[2], - # background = colors[1] - # ), - # # do not activate in Virtualbox - will break qtile - # widget.ThermalSensor( - # foreground = colors[5], - # foreground_alert = colors[6], - # background = colors[1], - # metric = True, - # padding = 3, - # threshold = 80 - # ), - # - # widget.Sep( - # linewidth = 1, - # padding = 10, - # foreground = colors[2], - # background = colors[1] - # ), - # widget.Sep( - # linewidth = 1, - # padding = 10, - # foreground = colors[2], - # background = colors[1] - # ), - # widget.Battery( - # font="Noto Sans", - # update_interval = 10, - # fontsize = 12, - # foreground = colors[5], - # background = colors[1], - # ), - # widget.Sep( - # linewidth = 1, - # padding = 10, - # foreground = colors[2], - # background = colors[1] - # ), - # widget.TextBox( - # font="FontAwesome", - # text=" ", - # foreground=colors[6], - # background=colors[1], - # padding = 0, - # fontsize=16 - # ), - # widget.CPUGraph( - # border_color = colors[2], - # fill_color = colors[8], - # graph_color = colors[8], - # background=colors[1], - # border_width = 1, - # line_width = 1, - # core = "all", - # type = "box" - # ), - # widget.ThermalSensor( - # foreground = colors[6], - # backgroumd = colors[3], - # padding = 0, - # fontsize = 13, - # ), - # widget.Sep( - # linewidth = 1, - # padding = 10, - # foreground = colors[2], - # background = colors[1] - # ), + widget.Sep( + linewidth = 1, + padding = 10, + foreground = colors[2], + background = colors[1] + ), # widget.TextBox( # font="FontAwesome", - # text=" ", + # text=" ", # foreground=colors[4], # background=colors[1], # padding = 0, - # fontsize=16 + # fontsize=18 # ), - # widget.Memory( - # foreground = colors[3], - # background = colors[1], - # mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')}, - # fmt = 'Mem: {}', - # padding = 5 - # ), - widget.Sep( - linewidth = 1, - padding = 10, - foreground = colors[2], - background = colors[1] - ), - widget.TextBox( - font="FontAwesome", - text=" ", - foreground=colors[4], - background=colors[1], - padding = 0, - fontsize=18 - ), widget.Clock( + font='Mono', foreground = colors[3], background = colors[1], fontsize = 18, @@ -513,50 +382,31 @@ widgets_list = init_widgets_list() def init_widgets_screen1(): widgets_screen1 = init_widgets_list() - return widgets_screen1[:-2] + return widgets_screen1 def init_widgets_screen2(): widgets_screen2 = init_widgets_list() - return widgets_screen2 + return widgets_screen2[:-1] widgets_screen1 = init_widgets_screen1() widgets_screen2 = init_widgets_screen2() def init_screens(): - return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), size=26, opacity=0.8)), - Screen(top=bar.Bar(widgets=init_widgets_screen2(), size=30, opacity=0.8))] + 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() -# MOUSE CONFIGURATION -mouse = [ - Drag([mod], "Button1", lazy.window.set_position_floating(), - start=lazy.window.get_position()), - Drag([mod], "Button3", lazy.window.set_size_floating(), - start=lazy.window.get_size()) -] - -dgroups_key_binder = None -dgroups_app_rules = [] - @hook.subscribe.startup_once def start_once(): - home = os.path.expanduser('~') - subprocess.call([home + '/.config/autostart/setup.sh']) - - -def set_floating(window): - if (window.window.get_wm_transient_for() - or window.window.get_wm_type() in floating_types): - window.floating = True + autostart_path = os.path.expanduser('~/.config/autostart/setup.sh') + subprocess.run([autostart_path]) -floating_types = ["notification", "toolbar", "splash", "dialog"] follow_mouse_focus = True |