diff --git a/.config/qtile/colors.py b/.config/qtile/colors.py index a9f4385..2a36984 100644 --- a/.config/qtile/colors.py +++ b/.config/qtile/colors.py @@ -1,47 +1,47 @@ # color definitions seiun = { - 'bg': '#202020', - 'fg': '#dfdfdf', - 'dark-red': '#ea7171', - 'red': '#ed8682', - 'dark-green': '#96a171', - 'green': '#b1d094', - 'dark-yellow': '#e7a55f', - 'yellow': '#ecb983', - 'dark-blue': '#7196a1', - 'blue': '#9fb8bf', - 'dark-magenta': '#c28490', - 'magenta': '#d7adb5', - 'dark-cyan': '#80ab96', - 'cyan': '#9fbfaf', - 'dark-gray': '#3d3d3d', - 'gray': '#666666', + "bg": "#202020", + "fg": "#dfdfdf", + "dark-red": "#ea7171", + "red": "#ed8682", + "dark-green": "#96a171", + "green": "#b1d094", + "dark-yellow": "#e7a55f", + "yellow": "#ecb983", + "dark-blue": "#7196a1", + "blue": "#9fb8bf", + "dark-magenta": "#c28490", + "magenta": "#d7adb5", + "dark-cyan": "#80ab96", + "cyan": "#9fbfaf", + "dark-gray": "#3d3d3d", + "gray": "#666666", } -# gruvbox = { -# 'bg': '#282828', -# 'bg0_h': '#1d2021', -# 'bg1': '#3c3836', -# 'bg2': '#504945', -# 'bg3': '#665c45', -# 'bg4': '#7c6f64', -# 'gray': '#928374', -# 'dark-grey': '#a89984', - -# 'fg0': '#fbf1c7', -# 'fg': '#ebdbb2', -# 'dark-red': '#cc241d', -# 'light-red': '#fb4934', -# 'dark-green': '#98971a', -# 'light-green': '#b8bb26', -# 'dark-yellow': '#d79921', -# 'light-yellow': '#fabd2f', -# 'dark-blue': '#458588', -# 'light-blue': '#83a598', -# 'dark-purple': '#b16286', -# 'light-purple': '#d3869b', -# 'dark-aqua': '#689d6a', -# 'light-aqua': '#8ec07c', -# } - +gruvbox = { + "bg": "#282828", + "bg0_h": "#1d2021", + "bg1": "#3c3836", + "bg2": "#504945", + "bg3": "#665c45", + "bg4": "#7c6f64", + "gray": "#928374", + "dark-grey": "#a89984", + "fg0": "#fbf1c7", + "fg": "#ebdbb2", + "dark-red": "#cc241d", + "light-red": "#fb4934", + "dark-green": "#98971a", + "light-green": "#b8bb26", + "dark-yellow": "#d79921", + "light-yellow": "#fabd2f", + "dark-blue": "#458588", + "light-blue": "#83a598", + "dark-purple": "#b16286", + "light-purple": "#d3869b", + "dark-aqua": "#689d6a", + "light-aqua": "#8ec07c", + "dark-orange": "#d65d0e", + "light-orange": "#fe8019", +} diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 8f0a76e..1c5ff1f 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -29,6 +29,7 @@ import os import re import socket import subprocess +import colors from typing import List # noqa: F401 from libqtile import layout, bar, widget, hook, qtile from libqtile.config import Click, Drag, Group, Key, Match, Screen, Rule @@ -57,7 +58,7 @@ def window_to_next_group(qtile): qtile.currentWindow.togroup(qtile.groups[i + 1].name) -myTerm = "alacritty" # My terminal of choice +myTerm = "kitty" # My terminal of choice keys = [ # SUPER + FUNCTION KEYS @@ -65,7 +66,8 @@ keys = [ Key([mod], "q", lazy.window.kill()), Key([mod], "t", lazy.spawn("xterm")), Key([mod], "v", lazy.spawn("pavucontrol")), - Key([mod], "s", lazy.spawn("nwggrid -p -o 0.4")), + # Key([mod], "s", lazy.spawn("nwggrid -p -o 0.4")), + Key([mod], "s", lazy.spawn("albert toggle")), Key([mod], "Escape", lazy.spawn("xkill")), Key([mod], "Return", lazy.spawn("kitty")), Key([mod], "KP_Enter", lazy.spawn("kitty")), @@ -310,12 +312,15 @@ for i in groups: ) +colors = colors.gruvbox + + def init_layout_theme(): return { "margin": 10, "border_width": 2, - "border_focus": "#ff00ff", - "border_normal": "#f4c2c2", + "border_focus": colors["gray"], + "border_normal": colors["dark-aqua"], } @@ -324,10 +329,16 @@ layout_theme = init_layout_theme() layouts = [ layout.MonadTall( - margin=16, border_width=2, border_focus="#ff00ff", border_normal="#f4c2c2" + margin=16, + border_width=2, + border_focus=colors["gray"], + border_normal=colors["dark-aqua"], ), layout.MonadWide( - margin=16, border_width=2, border_focus="#ff00ff", border_normal="#f4c2c2" + margin=16, + border_width=2, + border_focus=colors["gray"], + border_normal=colors["dark-aqua"], ), layout.Matrix(**layout_theme), layout.Bsp(**layout_theme), @@ -339,9 +350,9 @@ layouts = [ layout.Tile(**layout_theme), layout.TreeTab( sections=["FIRST", "SECOND"], - bg_color="#141414", - active_bg="#0000ff", - inactive_bg="#1e90ff", + bg_color=colors["bg1"], + active_bg=colors["dark-blue"], + inactive_bg=colors["light-blue"], padding_y=5, section_top=10, panel_width=280, @@ -353,47 +364,15 @@ layouts = [ # COLORS FOR THE BAR -def init_colors(): - return [ - ["#2F343F", "#2F343F"], # color 0 - ["#2F343F", "#2F343F"], # color 1 - ["#c0c5ce", "#c0c5ce"], # color 2 - ["#e75480", "#e75480"], # color 3 - ["#f4c2c2", "#f4c2c2"], # color 4 - ["#ffffff", "#ffffff"], # color 5 - ["#ff0000", "#ff0000"], # color 6 - ["#62FF00", "#62FF00"], # color 7 - ["#000000", "#000000"], # color 8 - ["#c40234", "#c40234"], # color 9 - ["#6790eb", "#6790eb"], # color 10 - ["#ff00ff", "#ff00ff"], # 11 - ["#4c566a", "#4c566a"], # 12 - ["#282c34", "#282c34"], # 13 - ["#212121", "#212121"], # 14 - ["#98c379", "#98c379"], # 15 - ["#b48ead", "#b48ead"], # 16 - ["#abb2bf", "#abb2bf"], # color 17 - ["#81a1c1", "#81a1c1"], # 18 - ["#56b6c2", "#56b6c2"], # 19 - ["#c678dd", "#c678dd"], # 20 - ["#e06c75", "#e06c75"], # 21 - ["#fb9f7f", "#fb9f7f"], # 22 - ["#ffd47e", "#ffd47e"], - ] # 23 - - -colors = init_colors() - - def base(fg="text", bg="dark"): - return {"foreground": colors[14], "background": colors[15]} + return {"foreground": colors["fg"], "background": colors["bg"]} # WIDGETS FOR THE BAR def init_widgets_defaults(): - return dict(font="Noto Sans", fontsize=9, padding=2, background=colors[1]) + return dict(font="Noto Sans", fontsize=9, padding=2, background=colors["bg1"]) widget_defaults = init_widgets_defaults() @@ -403,16 +382,16 @@ def init_widgets_list(): prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname()) widgets_list = [ widget.Sep( - linewidth=1, padding=10, foreground=colors[15], background=colors[15] + linewidth=1, padding=10, foreground=colors["bg1"], background=colors["bg1"] ), # widget.Image( - filename="~/.config/qtile/icons/garuda-red.png", + filename="~/.config/qtile/icons/qtilelogo.png", iconsize=9, - background=colors[15], + background=colors["bg1"], mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("jgmenu_run")}, ), widget.GroupBox( - **base(bg=colors[15]), + **base(bg=colors["bg1"]), font="UbuntuMono Nerd Font", fontsize=11, margin_y=3, @@ -420,16 +399,16 @@ def init_widgets_list(): padding_y=5, padding_x=4, borderwidth=3, - active=colors[5], + active=colors["fg"], inactive=colors[6], rounded=True, highlight_method="block", urgent_alert_method="block", - urgent_border=colors[16], - this_current_screen_border=colors[20], - this_screen_border=colors[17], - other_current_screen_border=colors[13], - other_screen_border=colors[17], + urgent_border=colors["dark-red"], + this_current_screen_border=colors["dark-aqua"], + this_screen_border=colors["gray"], + other_current_screen_border=colors["bg0_h"], + other_screen_border=colors["gray"], disable_drag=True ), widget.TaskList( @@ -441,27 +420,27 @@ def init_widgets_list(): padding_y=0, margin_y=0, fontsize=14, - border=colors[7], - foreground=colors[9], + border=colors["light-green"], + foreground=colors["dark-red"], margin=2, txt_floating="🗗", txt_minimized=">_ ", borderwidth=1, - background=colors[20], + background=colors["light-purple"], # unfocused_border = 'border' ), widget.CurrentLayoutIcon( custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")], - foreground=colors[5], - background=colors[3], + foreground=colors["fg"], + background=colors["light-red"], padding=0, scale=0.7, ), widget.CurrentLayout( font="Noto Sans Bold", fontsize=12, - foreground=colors[5], - background=colors[3], + foreground=colors["fg"], + background=colors["light-red"], ), widget.Net( font="Noto Sans", @@ -469,8 +448,8 @@ def init_widgets_list(): # Here enter your network name interface=["wlp6s0"], format="{down} ↓↑ {up}", - foreground=colors[5], - background=colors[19], + foreground=colors["fg"], + background=colors["light-blue"], padding=0, ), widget.CPU( @@ -478,8 +457,8 @@ def init_widgets_list(): # format = '{MemUsed}M/{MemTotal}M', update_interval=1, fontsize=12, - foreground=colors[5], - background=colors[22], + foreground=colors["fg"], + background=colors["light-orange"], mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(myTerm + " -e htop")}, ), widget.Memory( @@ -488,17 +467,17 @@ def init_widgets_list(): update_interval=1, fontsize=12, measure_mem="M", - foreground=colors[5], - background=colors[16], + foreground=colors["fg"], + background=colors["gray"], mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(myTerm + " -e htop")}, ), widget.Clock( - foreground=colors[9], - background=colors[23], + foreground=colors["light-red"], + background=colors["light-yellow"], fontsize=12, format="%Y-%m-%d %H:%M", ), - widget.Systray(background=colors[10], icon_size=20, padding=4), + widget.Systray(background=colors["dark-blue"], icon_size=20, padding=4), ] return widgets_list