diff options
Diffstat (limited to '.config/qtile/config.py')
-rw-r--r-- | .config/qtile/config.py | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 522629c..2a30214 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -1,36 +1,39 @@ import os import subprocess from libqtile import layout, bar, widget, hook -from libqtile.config import Click, Drag, Group, Match, Screen, Rule -from libqtile.command import lazy +from libqtile.config import Group, Screen from keys import MyKeys from libqtile.dgroups import simple_key_binder -from colors import gruvbox, nord_fox, my_colors, dracula -#from spotify_widget import Spotify +from colors import dracula @hook.subscribe.startup_once def start_once(): + """Set your autostart script.""" autostart_path = os.path.expanduser('~/.config/autostart/autostart.sh') subprocess.run([autostart_path]) # Keybindings my_keys = MyKeys(mod="mod4", - browser="qutebrowser", + browser="firefox", term="alacritty", editor="emacsclient -c -a 'emacs'") keys = my_keys.init_keys() + +# Use this to change between workspaces dgroups_key_binder = simple_key_binder("mod4") + mouse = my_keys.init_mouse() + # Groups and layouts 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", ] + "monadtall", "treetab", ] for i in range(len(group_names)): groups.append( @@ -42,6 +45,7 @@ for i in range(len(group_names)): def init_layout_theme(): + """Layout default theme.""" return {"margin": 5, "border_width": 2, "border_focus": dracula["cyan"], @@ -56,27 +60,29 @@ layouts = [ layout.MonadTall(**layout_theme), # layout.MonadWide(**layout_theme), # layout.Matrix(**layout_theme), - #layout.Bsp(**layout_theme), + # layout.Bsp(**layout_theme), layout.Floating(**layout_theme), # layout.RatioTile(**layout_theme), - #layout.Max(**layout_theme), - #layout.Spiral(**layout_theme), + # layout.Max(**layout_theme), + # layout.Spiral(**layout_theme), layout.TreeTab(bg_color=dracula["bg"], - fontshadow=dracula["green"], active_bg=dracula["purple"], - active_fg=dracula["cyan"], + active_fg=dracula["fg"], inactive_fg=dracula["fg"], inactive_bg=dracula["bg"], font="JetBrains Mono", - section_fontsize=14), - #layout.Zoomy(**layout_theme), + fontshadow=None, + section_fontsize=14, + panel_width=135,), + # layout.Zoomy(**layout_theme), ] # Widgets def init_widgets_defaults(): - return dict(font="Noto Sans", + """Set widget default settings.""" + return dict(font="JetBrains Mono", fontsize=12, padding=2, foreground=dracula["fg"], @@ -88,6 +94,7 @@ widget_defaults = init_widgets_defaults() def init_widgets_list(): + """My widget list.""" widgets_list = [ widget.Spacer( length=7, @@ -253,11 +260,13 @@ widgets_list = init_widgets_list() def init_widgets_screen1(): + """Init every widget for primary screen.""" widgets_screen1 = init_widgets_list() return widgets_screen1 def init_widgets_screen2(): + """Remove systray and spacer for second screen.""" widgets_screen2 = init_widgets_list() return widgets_screen2[:-2] @@ -267,18 +276,17 @@ widgets_screen2 = init_widgets_screen2() def init_screens(): - return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), size=33, margin=11),), - Screen(top=bar.Bar(widgets=init_widgets_screen2(), size=28, margin=7))] + """Panel settings.""" + return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), size=33, + margin=11),), + Screen(top=bar.Bar(widgets=init_widgets_screen2(), size=28, + margin=7))] screens = init_screens() - follow_mouse_focus = True bring_front_click = False cursor_warp = True auto_fullscreen = True - -focus_on_window_activation = "smart" # or smart - - +focus_on_window_activation = "smart" # or focus wmname = "Qtile-Apo11o" |