From 3da0e800515db45639372d5615c267e584d0336d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 4 Oct 2024 01:20:35 +0100 Subject: pep8 qtile config --- skel/.config/qtile/colors.py | 394 ++++++++++++++++++----------------- skel/.config/qtile/config.py | 232 +++++++++++++-------- skel/.config/qtile/settings/theme.py | 2 - 3 files changed, 346 insertions(+), 282 deletions(-) diff --git a/skel/.config/qtile/colors.py b/skel/.config/qtile/colors.py index 2db15e7..e6747bc 100644 --- a/skel/.config/qtile/colors.py +++ b/skel/.config/qtile/colors.py @@ -1,203 +1,217 @@ -#Dracula +# Dracula def dracula(): - colors = [["#282a36", "#282a36"], #background (dark grey) [0] - ["#44475a", "#44475a"], #light grey [1] - ["#f8f8f2", "#f8f8f2"], #foreground (white) [2] - ["#6272a4", "#6272a4"], #blue/grey) [3] - ["#8be9fd", "#8be9fd"], #cyan [4] - ["#50fa7b", "#50fa7b"], #green [5] - ["#ffb86c", "#ffb86c"], #orange [6] - ["#ff79c6", "#ff79c6"], #pink [7] - ["#bd93f9", "#bd93f9"], #purple [8] - ['#ff5555', '#ff5555'], #red [9] - ["#f1fa8c", "#f1fa8c"]] #yellow [10] - - backgroundColor = "#282a36" - foregroundColor = "#f8f8f2" - workspaceColor = "#bd93f9" - foregroundColorTwo = "#44475a" - return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo - -#Everforest + colors = [["#282a36", "#282a36"], # background (dark grey) [0] + ["#44475a", "#44475a"], # light grey [1] + ["#f8f8f2", "#f8f8f2"], # foreground (white) [2] + ["#6272a4", "#6272a4"], # blue/grey) [3] + ["#8be9fd", "#8be9fd"], # cyan [4] + ["#50fa7b", "#50fa7b"], # green [5] + ["#ffb86c", "#ffb86c"], # orange [6] + ["#ff79c6", "#ff79c6"], # pink [7] + ["#bd93f9", "#bd93f9"], # purple [8] + ['#ff5555', '#ff5555'], # red [9] + ["#f1fa8c", "#f1fa8c"]] # yellow [10] + + backgroundColor = "#282a36" + foregroundColor = "#f8f8f2" + workspaceColor = "#bd93f9" + foregroundColorTwo = "#44475a" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo + +# Everforest + + def everforest(): - colors = [["#2B3339", "#2B3339"], #background (dark grey) [0] - ["#7C8377", "#7C8377"], #light grey [1] - ["#D5C9AB", "#D5C9AB"], #foreground (beige) [2] - ["#6272a4", "#6272a4"], #blue/grey) [3] - ["#7FBBB3", "#7FBBB3"], #blue [4] - ["#A7C080", "#A7C080"], #green [5] - ["#E69875", "#E69875"], #orange [6] - ["#D196B3", "#D196B3"], #pink [7] - ["#A7C080", "#A7C080"], #green [8] - ['#ED8082', '#ED8080'], #red [9] - ["#D5C9AB", "#D5C9AB"]] #beige [10] - - backgroundColor = "#2B3339" - foregroundColor = "#D5C9AB" - workspaceColor = "#A7C080" - foregroundColorTwo = "#7c8377" - return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo - -#Doom-One + colors = [["#2B3339", "#2B3339"], # background (dark grey) [0] + ["#7C8377", "#7C8377"], # light grey [1] + ["#D5C9AB", "#D5C9AB"], # foreground (beige) [2] + ["#6272a4", "#6272a4"], # blue/grey) [3] + ["#7FBBB3", "#7FBBB3"], # blue [4] + ["#A7C080", "#A7C080"], # green [5] + ["#E69875", "#E69875"], # orange [6] + ["#D196B3", "#D196B3"], # pink [7] + ["#A7C080", "#A7C080"], # green [8] + ['#ED8082', '#ED8080'], # red [9] + ["#D5C9AB", "#D5C9AB"]] # beige [10] + + backgroundColor = "#2B3339" + foregroundColor = "#D5C9AB" + workspaceColor = "#A7C080" + foregroundColorTwo = "#7c8377" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo + +# Doom-One + + def doomone(): - colors = [["#282c34", "#282c34"], #background (dark grey) [0] - ["#44475a", "#44475a"], #light grey [1] - ["#bbc2cf", "#bbc2cf"], #foreground (white) [2] - ["#3071db", "#3071db"], #dark blue) [3] - ["#51afef", "#51afef"], #blue [4] - ["#98be65", "#98be65"], #green [5] - ["#da8548", "#da8548"], #orange [6] - ["#a9a1e1", "#a9a1e1"], #pink [7] - ["#c678dd", "#c678dd"], #purple [8] - ['#ff6c6b', '#ff6c6b'], #red [9] - ["#ecbe7b", "#ecbe7b"]] #yellow [10] - - backgroundColor = "#282a36" - foregroundColor = "#bbc2cf" - workspaceColor = "#51afef" - foregroundColorTwo = "#44475a" - return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo - -#Nord + colors = [["#282c34", "#282c34"], # background (dark grey) [0] + ["#44475a", "#44475a"], # light grey [1] + ["#bbc2cf", "#bbc2cf"], # foreground (white) [2] + ["#3071db", "#3071db"], # dark blue) [3] + ["#51afef", "#51afef"], # blue [4] + ["#98be65", "#98be65"], # green [5] + ["#da8548", "#da8548"], # orange [6] + ["#a9a1e1", "#a9a1e1"], # pink [7] + ["#c678dd", "#c678dd"], # purple [8] + ['#ff6c6b', '#ff6c6b'], # red [9] + ["#ecbe7b", "#ecbe7b"]] # yellow [10] + + backgroundColor = "#282a36" + foregroundColor = "#bbc2cf" + workspaceColor = "#51afef" + foregroundColorTwo = "#44475a" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo + +# Nord + + def nord(): - colors = [["#2e3440", "#2e3440"], #background (dark grey) [0] - ["#4c556a", "#4c566a"], #grey [1] - ["#d8dee9", "#d8dee9"], #foreground (beige) [2] - ["#81a1c1", "#81a1c1"], #blue/grey) [3] - ["#88c0d0", "#88c0d0"], #blue [4] - ["#a3be8c", "#a3be8c"], #green [5] - ["#e69875", "#e69875"], #orange [6] - ["#D196B3", "#D196B3"], #pink [7] - ["#a3be8c", "#a3be8c"], #green [8] - ['#bf616a', '#bf616a'], #red [9] - ["#ebcb8b", "#ebcb8b"]] #yellow [10] - - backgroundColor = "#2e3440" - foregroundColor = "#d8dee9" - workspaceColor = "#a3be8c" - foregroundColorTwo = "#4c566a" - return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo - -#Gruvbox + colors = [["#2e3440", "#2e3440"], # background (dark grey) [0] + ["#4c556a", "#4c566a"], # grey [1] + ["#d8dee9", "#d8dee9"], # foreground (beige) [2] + ["#81a1c1", "#81a1c1"], # blue/grey) [3] + ["#88c0d0", "#88c0d0"], # blue [4] + ["#a3be8c", "#a3be8c"], # green [5] + ["#e69875", "#e69875"], # orange [6] + ["#D196B3", "#D196B3"], # pink [7] + ["#a3be8c", "#a3be8c"], # green [8] + ['#bf616a', '#bf616a'], # red [9] + ["#ebcb8b", "#ebcb8b"]] # yellow [10] + + backgroundColor = "#2e3440" + foregroundColor = "#d8dee9" + workspaceColor = "#a3be8c" + foregroundColorTwo = "#4c566a" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo + +# Gruvbox + + def gruvbox(): - colors = [["#282828", "#282828"], #background (dark grey) [0] - ["#928374", "#928374"], #light grey [1] - ["#ebdbb2", "#ebddb2"], #foreground (white) [2] - ["#458588", "#458588"], #blue) [3] - ["#83a598", "#83a598"], #light blue [4] - ["#b8bb26", "#b8bb26"], #green [5] - ["#d79921", "#d79921"], #orange [6] - ["#d3869b", "#d3869b"], #pink [7] - ["#b16286", "#b16286"], #purple [8] - ['#cc241d', '#cc241d'], #red [9] - ["#fabd2f", "#fabd2f"]] #yellow [10] - - backgroundColor = "#282828" - foregroundColor = "#ebddb2" - workspaceColor = "#b8bb26" - foregroundColorTwo = "#928375" - return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo - -#catppuccin + colors = [["#282828", "#282828"], # background (dark grey) [0] + ["#928374", "#928374"], # light grey [1] + ["#ebdbb2", "#ebddb2"], # foreground (white) [2] + ["#458588", "#458588"], # blue) [3] + ["#83a598", "#83a598"], # light blue [4] + ["#b8bb26", "#b8bb26"], # green [5] + ["#d79921", "#d79921"], # orange [6] + ["#d3869b", "#d3869b"], # pink [7] + ["#b16286", "#b16286"], # purple [8] + ['#cc241d', '#cc241d'], # red [9] + ["#fabd2f", "#fabd2f"]] # yellow [10] + + backgroundColor = "#282828" + foregroundColor = "#ebddb2" + workspaceColor = "#b8bb26" + foregroundColorTwo = "#928375" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo + +# catppuccin + + def catppuccin(): - colors = [["#232634", "#232634"], #background (dark grey) [0] - ["#51576d", "#51576d"], #light grey [1] - ["#f2d5cf", "#f2d5cf"], #foreground (white) [2] - ["#8caaee", "#8caaee"], #blue) [3] - ["#b5bfe2", "#b5bfe2"], #light blue [4] - ["#a6d189", "#a6d189"], #green [5] - ["#ef9f76", "#ef9f76"], #orange [6] - ["#f4b8e4", "#f4b8e4"], #pink [7] - ["#ca9ee6", "#ca9ee6"], #purple [8] - ['#e78284', '#e78284'], #red [9] - ["#e5c890", "#e5c890"]] #yellow [10] - - backgroundColor = "#232634" - foregroundColor = "#c6d0f5" - workspaceColor = "#e5c890" - foregroundColorTwo = "#babbf1" - return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo - -#moonfly + colors = [["#232634", "#232634"], # background (dark grey) [0] + ["#51576d", "#51576d"], # light grey [1] + ["#f2d5cf", "#f2d5cf"], # foreground (white) [2] + ["#8caaee", "#8caaee"], # blue) [3] + ["#b5bfe2", "#b5bfe2"], # light blue [4] + ["#a6d189", "#a6d189"], # green [5] + ["#ef9f76", "#ef9f76"], # orange [6] + ["#f4b8e4", "#f4b8e4"], # pink [7] + ["#ca9ee6", "#ca9ee6"], # purple [8] + ['#e78284', '#e78284'], # red [9] + ["#e5c890", "#e5c890"]] # yellow [10] + + backgroundColor = "#232634" + foregroundColor = "#c6d0f5" + workspaceColor = "#e5c890" + foregroundColorTwo = "#babbf1" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo + +# moonfly + + def moonfly(): - colors = [["#323437", "#323437"], #background (dark grey) [0] - ["#9e9e9e", "#9e9e9e"], #light grey [1] - ["#b2b2b2", "#b2b2b2"], #foreground (white) [2] - ["#80a0ff", "#80a0ff"], #blue) [3] - ["#b2ceee", "#b2ceee"], #light blue [4] - ["#8cc85f", "#8cc85f"], #green [5] - ["#ef9f76", "#ef9f76"], #orange [6] - ["#ff5189", "#ff5189"], #pink [7] - ["#d183e8", "#d183e8"], #purple [8] - ['#ff5454', '#ff5454'], #red [9] - ["#e3c78a", "#e3c78a"]] #yellow [10] - - backgroundColor = "#080808" - foregroundColor = "#b2b2b2" - workspaceColor = "#e3c78a" - foregroundColorTwo = "#9e9e9e" - return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo - -#retro + colors = [["#323437", "#323437"], # background (dark grey) [0] + ["#9e9e9e", "#9e9e9e"], # light grey [1] + ["#b2b2b2", "#b2b2b2"], # foreground (white) [2] + ["#80a0ff", "#80a0ff"], # blue) [3] + ["#b2ceee", "#b2ceee"], # light blue [4] + ["#8cc85f", "#8cc85f"], # green [5] + ["#ef9f76", "#ef9f76"], # orange [6] + ["#ff5189", "#ff5189"], # pink [7] + ["#d183e8", "#d183e8"], # purple [8] + ['#ff5454', '#ff5454'], # red [9] + ["#e3c78a", "#e3c78a"]] # yellow [10] + + backgroundColor = "#080808" + foregroundColor = "#b2b2b2" + workspaceColor = "#e3c78a" + foregroundColorTwo = "#9e9e9e" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo + +# retro + + def retro(): - colors = [["#160B00", "#160B00"], #background (dark grey) [0] - ["#663300", "#663300"], #darkorange [1] - ["#8B4500", "#8B4500"], #less dark orange (white) [2] - ["#A35100", "#A35100"], #less less dark orange [3] - ["#C26100", "#C26100"], #light orange [4] - ["#E07000", "#E07000"], #green [5] - ["#FF7F00", "#FF7F00"], #orange [6] - ["#FF8E1F", "#FF8E1F"], #pink [7] - ["#FF8E1F", "#FF8E1F"], #purple [8] - ['#FF8E1F', '#FF8E1F'], #red [9] - ["#FF8E1F", "#FF8E1F"]] #yellow [10] - - backgroundColor = "#160B00" - foregroundColor = "#DE7B1B" - workspaceColor = "#DE7B1B" - foregroundColorTwo = "#DE7B1B" - return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo - -#whitey + colors = [["#160B00", "#160B00"], # background (dark grey) [0] + ["#663300", "#663300"], # darkorange [1] + ["#8B4500", "#8B4500"], # less dark orange (white) [2] + ["#A35100", "#A35100"], # less less dark orange [3] + ["#C26100", "#C26100"], # light orange [4] + ["#E07000", "#E07000"], # green [5] + ["#FF7F00", "#FF7F00"], # orange [6] + ["#FF8E1F", "#FF8E1F"], # pink [7] + ["#FF8E1F", "#FF8E1F"], # purple [8] + ['#FF8E1F', '#FF8E1F'], # red [9] + ["#FF8E1F", "#FF8E1F"]] # yellow [10] + + backgroundColor = "#160B00" + foregroundColor = "#DE7B1B" + workspaceColor = "#DE7B1B" + foregroundColorTwo = "#DE7B1B" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo + +# whitey + + def whitey(): - colors = [["#2a2a2a", "#2a2a2a"], # black [0] - ["#A73D47", "#A73D47"], # red [1] - ["#87A357", "#87A357"], # green [2] - ["#EB973D", "#EB973D"], # yellow [3] - ["#2FA7B8", "#2FA7B8"], # cyan [4] - ["#A03946", "#A03946"], # magenta [5] - ["#1D345E", "#1D345E"], # blue [6] - ["#DBE3EC", "#DBE3EC"], # white [7] - ["#E5953E", "#E5953E"], # orange [8] - ['#A73D47', '#A73D47'], #red [9] - ["#FF8E1F", "#FF8E1F"]] #yellow [10] - - backgroundColor = "#FCFCFA" - foregroundColor = "#2a2a2a" - workspaceColor = "#66688F" - foregroundColorTwo = "#2a2a2a" - return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo - -#redcore -def redcore(): - colors = [["#31363b", "#31363b"], #breeze blue [0] - ["#7f8c8d", "#7f8c8d"], #light grey [1] - ["#3daee9", "#3daee9"], #blue [2] - ["#804453", "#804453"], #Maroon [3] - ["#2FA7B8", "#2FA7B8"], - ["#27ae60", "#27ae60"], #green [5] - ["#1D345E", "#1D345E"], - ["#bfc3c7", "#bfc3c7"], #gray [7] - ["#fdbc4b", "#fdbc4b"], #orange [8] - ['#520a0a', '#520a0a'], #red [9] - ["#eff0f1", "#eff0f1"]] #white [10] - - backgroundColor = "#eff0f1" - foregroundColor = "#31363b" - workspaceColor = "#27ae60" - foregroundColorTwo = "#2a2a2a" - return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo + colors = [["#2a2a2a", "#2a2a2a"], # black [0] + ["#A73D47", "#A73D47"], # red [1] + ["#87A357", "#87A357"], # green [2] + ["#EB973D", "#EB973D"], # yellow [3] + ["#2FA7B8", "#2FA7B8"], # cyan [4] + ["#A03946", "#A03946"], # magenta [5] + ["#1D345E", "#1D345E"], # blue [6] + ["#DBE3EC", "#DBE3EC"], # white [7] + ["#E5953E", "#E5953E"], # orange [8] + ['#A73D47', '#A73D47'], # red [9] + ["#FF8E1F", "#FF8E1F"]] # yellow [10] + backgroundColor = "#FCFCFA" + foregroundColor = "#2a2a2a" + workspaceColor = "#66688F" + foregroundColorTwo = "#2a2a2a" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo +# redcore +def redcore(): + colors = [["#31363b", "#31363b"], # breeze blue [0] + ["#7f8c8d", "#7f8c8d"], # light grey [1] + ["#3daee9", "#3daee9"], # blue [2] + ["#804453", "#804453"], # Maroon [3] + ["#2FA7B8", "#2FA7B8"], + ["#27ae60", "#27ae60"], # green [5] + ["#1D345E", "#1D345E"], + ["#bfc3c7", "#bfc3c7"], # gray [7] + ["#fdbc4b", "#fdbc4b"], # orange [8] + ['#520a0a', '#520a0a'], # red [9] + ["#eff0f1", "#eff0f1"]] # white [10] + + backgroundColor = "#eff0f1" + foregroundColor = "#31363b" + workspaceColor = "#27ae60" + foregroundColorTwo = "#2a2a2a" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo diff --git a/skel/.config/qtile/config.py b/skel/.config/qtile/config.py index 4b4fdd6..e4084b2 100644 --- a/skel/.config/qtile/config.py +++ b/skel/.config/qtile/config.py @@ -1,4 +1,4 @@ -# Qtile Config. Original concept done by Jeff Winget and Matt Weber (The Linux Cast). +# Qtile Config. Original concept done by Jeff Winget and Matt Weber (The Linux Cast). from typing import List # noqa: F401 @@ -15,22 +15,22 @@ import colors # Variables. Change mod key, terminal and app launcher here. mod = "mod4" terminal = "alacritty" -rofi="rofi -show drun -show-icons" +rofi = "rofi -show drun -show-icons" -# Alternate colors are located in colors.py. You can change your colorscheme by changing the last word to one of the available colorschemes. +# Alternate colors are located in colors.py. You can change your colorscheme by changing the last word to one of the available colorschemes. # Currently Available Colorschemes # Redcore, Dracula, Everforest, Doom-One, Nord, Gruvbox Dark, Catppuccin, moonfly, retro, whitey. colors, backgroundColor, foregroundColor, workspaceColor, chordColor = colors.redcore() keys = [ -# Open terminal + # Open terminal Key([mod], "Return", lazy.spawn(terminal)), Key([mod], "d", lazy.spawn(rofi)), -# Qtile System Actions + # Qtile System Actions Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "x", lazy.shutdown()), -# Active Window Actions + # Active Window Actions Key([mod], "f", lazy.window.toggle_fullscreen()), Key([mod], "q", lazy.window.kill()), Key([mod, "control"], "h", @@ -78,7 +78,7 @@ keys = [ lazy.layout.increase_nmaster() ), -# Window Focus (Arrows and Vim keys) + # Window Focus (Arrows and Vim keys) Key([mod], "Up", lazy.layout.up()), Key([mod], "Down", lazy.layout.down()), Key([mod], "Left", lazy.layout.left()), @@ -88,13 +88,13 @@ keys = [ Key([mod], "h", lazy.layout.left()), Key([mod], "l", lazy.layout.right()), -# Qtile Layout Actions + # Qtile Layout Actions Key([mod], "r", lazy.layout.reset()), Key([mod], "Tab", lazy.next_layout()), Key([mod, "shift"], "f", lazy.layout.flip()), Key([mod, "shift"], "space", lazy.window.toggle_floating()), -# Move windows around MonadTall/MonadWide Layouts + # Move windows around MonadTall/MonadWide Layouts Key([mod, "shift"], "Up", lazy.layout.shuffle_up()), Key([mod, "shift"], "Down", lazy.layout.shuffle_down()), Key([mod, "shift"], "Left", lazy.layout.swap_left()), @@ -103,12 +103,12 @@ keys = [ Key([mod, "shift"], "j", lazy.layout.shuffle_down()), Key([mod, "shift"], "h", lazy.layout.swap_left()), Key([mod, "shift"], "l", lazy.layout.swap_right()), - -# Switch focus to specific monitor (out of three) + + # Switch focus to specific monitor (out of three) Key([mod], "i", lazy.to_screen(0)), Key([mod], "o", lazy.to_screen(1)), -# Switch focus of monitors + # Switch focus of monitors Key([mod], "period", lazy.next_screen()), Key([mod], "comma", lazy.prev_screen()), ] @@ -116,14 +116,16 @@ keys = [ # Create labels for groups and assign them a default layout. groups = [] -group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "minus", "equal"] +group_names = ["1", "2", "3", "4", "5", "6", + "7", "8", "9", "0", "minus", "equal"] # Change out these two lines to change between icons and numbers in the workspace section of the bar. -#group_labels = ["", "", "", "", "", "", "", "", "ﭮ", "", "", "﨣"] +# group_labels = ["", "", "", "", "", "", "", "", "ﭮ", "", "", "﨣"] group_labels = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"] # Change these to change the default layout per workspace. Do not delete. -group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall"] +group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", + "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall"] # Add group names, labels, and default layouts to the groups object. for i in range(len(group_names)): @@ -137,17 +139,23 @@ for i in range(len(group_names)): # Add group specific keybindings for i in groups: keys.extend([ - Key([mod], i.name, lazy.group[i.name].toscreen(), desc="Mod + number to move to that group."), - Key(["mod1"], "Tab", lazy.screen.next_group(), desc="Move to next group."), - Key(["mod1", "shift"], "Tab", lazy.screen.prev_group(), desc="Move to previous group."), - Key([mod, "shift"], i.name, lazy.window.togroup(i.name), desc="Move focused window to new group."), + Key([mod], i.name, lazy.group[i.name].toscreen(), + desc="Mod + number to move to that group."), + Key(["mod1"], "Tab", lazy.screen.next_group(), + desc="Move to next group."), + Key(["mod1", "shift"], "Tab", lazy.screen.prev_group(), + desc="Move to previous group."), + Key([mod, "shift"], i.name, lazy.window.togroup( + i.name), desc="Move focused window to new group."), ]) # Define scratchpads. Section can be deleted if you do not intend to use scratchpads. groups.append(ScratchPad("scratchpad", [ - DropDown("term", "alacritty --class=scratch", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1), - DropDown("term2", "alacritty --class=scratch", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1), - ])) + DropDown("term", "alacritty --class=scratch", width=0.8, + height=0.8, x=0.1, y=0.1, opacity=1), + DropDown("term2", "alacritty --class=scratch", + width=0.8, height=0.8, x=0.1, y=0.1, opacity=1), +])) # Scratchpad keybindings keys.extend([ @@ -158,11 +166,11 @@ keys.extend([ # Define layouts and layout themes layout_theme = { - "margin":5, - "border_width": 2, - "border_focus": colors[9], - "border_normal": backgroundColor - } + "margin": 5, + "border_width": 2, + "border_focus": colors[9], + "border_normal": backgroundColor +} layouts = [ layout.MonadTall(**layout_theme), @@ -173,6 +181,8 @@ layouts = [ ] # Mouse callback functions + + def launch_menu(): qtile.cmd_spawn("rofi -show drun -show-icons") @@ -180,95 +190,135 @@ def launch_menu(): # Define Widgets widget_defaults = dict( font="Noto Sans", - fontsize = 14, - padding = 2, + fontsize=14, + padding=2, background=backgroundColor ) + def init_widgets_list(monitor_num): widgets_list = [ widget.GroupBox( font="Noto Sans", - fontsize = 14, - margin_y = 2, - margin_x = 4, - padding_y = 5, - padding_x = 5, - borderwidth = 2, - disable_drag = True, - active = colors[9], - inactive = foregroundColor, - hide_unused = False, - rounded = True, - this_current_screen_border = colors[9], - this_screen_border = colors[7], - other_screen_border = colors[6], - other_current_screen_border = colors[6], - urgent_alert_method = "line", - urgent_border = colors[9], - urgent_text = colors[1], - foreground = foregroundColor, - background = backgroundColor, - use_mouse_wheel = False + fontsize=14, + margin_y=2, + margin_x=4, + padding_y=5, + padding_x=5, + borderwidth=2, + disable_drag=True, + active=colors[9], + inactive=foregroundColor, + hide_unused=False, + rounded=True, + this_current_screen_border=colors[9], + this_screen_border=colors[7], + other_screen_border=colors[6], + other_current_screen_border=colors[6], + urgent_alert_method="line", + urgent_border=colors[9], + urgent_text=colors[1], + foreground=foregroundColor, + background=backgroundColor, + use_mouse_wheel=False ), widget.TaskList( - icon_size = 0, - font = "Noto Sans", - foreground = colors[10], - background = colors[9], - borderwidth = 0, - border = colors[9], - margin = 0, - padding = 10, - highlight_method = "block", - title_width_method = "uniform", - urgent_alert_method = "border", - urgent_border = colors[1], - rounded = False, - txt_floating = "🗗 ", - txt_maximized = "🗖 ", - txt_minimized = "🗕 ", + icon_size=0, + font="Noto Sans", + foreground=colors[10], + background=colors[9], + borderwidth=0, + border=colors[9], + margin=0, + padding=10, + highlight_method="block", + title_width_method="uniform", + urgent_alert_method="border", + urgent_border=colors[1], + rounded=False, + txt_floating="🗗 ", + txt_maximized="🗖 ", + txt_minimized="🗕 ", + ), + widget.CurrentLayoutIcon( + scale=0.5, + foreground=colors[9], + background=colors[9] + ), + widget.Sep( + linewidth=0, + padding=10 + ), + widget.Systray( + background=backgroundColor, + icon_size=20, + padding=10 + ), + widget.Sep( + linewidth=0, + padding=10 + ), + widget.TextBox( + text="CPU ", + fontsize=10, + font="Noto Sans", + foreground=colors[0] ), - widget.CurrentLayoutIcon(scale = 0.5, foreground = colors[9], background = colors[9]), - widget.Sep(linewidth = 0, padding = 10), - widget.Systray(background = backgroundColor, icon_size = 20, padding = 10), - widget.Sep(linewidth = 0, padding = 10), - widget.TextBox(text = "CPU ", fontsize = 10, font = "Noto Sans", foreground = colors[0]), widget.CPU( - font = "Noto Sans", - update_interval = 1.0, - format = '{freq_current}Ghz / {load_percent}%', - foreground = foregroundColor, - padding = 1 + font="Noto Sans", + update_interval=1.0, + format='{freq_current}Ghz / {load_percent}%', + foreground=foregroundColor, + padding=1 + ), + widget.Sep( + linewidth=0, + padding=10 + ), + widget.TextBox( + text="RAM", + fontsize=10, + font="Noto Sans", + foreground=colors[0] ), - widget.Sep(linewidth = 0, padding = 10), - widget.TextBox(text = "RAM", fontsize = 10, font = "Noto Sans", foreground = colors[0]), widget.Memory( - font = "Noto Sans", - foreground = foregroundColor, - format = '{MemUsed: .0f}{mm} /{MemTotal: .0f}{mm}', + font="Noto Sans", + foreground=foregroundColor, + format='{MemUsed: .0f}{mm} /{MemTotal: .0f}{mm}', measure_mem='G', - padding = 1, + padding=1, + ), + widget.Sep( + linewidth=0, + padding=10 + ), + widget.Clock( + format='%I:%M %p', + font="Noto Sans", + padding=10, + foreground=colors[0] ), - widget.Sep(linewidth = 0, padding = 10), - widget.Clock(format='%I:%M %p', font = "Noto Sans", padding = 10, foreground = colors[0]), ] return widgets_list + def init_secondary_widgets_list(monitor_num): secondary_widgets_list = init_widgets_list(monitor_num) del secondary_widgets_list[13:15] return secondary_widgets_list + widgets_list = init_widgets_list("1") secondary_widgets_list = init_secondary_widgets_list("2") # Commeont out second Screen line if you do not have second monitor screens = [ - Screen(bottom=bar.Bar(widgets=widgets_list, size=30, background=backgroundColor, margin=0, opacity=0.8),), - Screen(bottom=bar.Bar(widgets=secondary_widgets_list, size=30, background=backgroundColor, margin=0, opacity=0.8),), - ] + Screen(bottom=bar.Bar(widgets=widgets_list, size=30, + background=backgroundColor, margin=0, opacity=0.8),), + Screen(bottom=bar.Bar(widgets=secondary_widgets_list, size=30, + background=backgroundColor, margin=0, opacity=0.8),), +] # Drag floating layouts. mouse = [ @@ -279,10 +329,12 @@ mouse = [ Click([mod], "Button2", lazy.window.bring_to_front()) ] + @hook.subscribe.startup_once def autostart(): - home = os.path.expanduser('~/.config/qtile/scripts/autostart.sh') - subprocess.run([home]) + home = os.path.expanduser('~/.config/qtile/scripts/autostart.sh') + subprocess.run([home]) + dgroups_key_binder = None dgroups_app_rules = [] # type: List @@ -297,7 +349,7 @@ floating_layout = layout.Floating(float_rules=[ Match(wm_class='ssh-askpass'), # ssh-askpass Match(title='branchdialog'), # gitk Match(title='pinentry'), # GPG key password entry -], fullscreen_border_width = 0, border_width = 0) +], fullscreen_border_width=0, border_width=0) auto_fullscreen = True focus_on_window_activation = "smart" reconfigure_screens = True diff --git a/skel/.config/qtile/settings/theme.py b/skel/.config/qtile/settings/theme.py index 707b221..e31ec76 100644 --- a/skel/.config/qtile/settings/theme.py +++ b/skel/.config/qtile/settings/theme.py @@ -22,7 +22,6 @@ def load_theme(): with open(config, "w") as f: f.write(f'{{"theme": "{theme}"}}\n') - theme_file = path.join(qtile_path, "themes", f'{theme}.json') if not path.isfile(theme_file): raise Exception(f'"{theme_file}" does not exist') @@ -33,4 +32,3 @@ def load_theme(): if __name__ == "settings.theme": colors = load_theme() - -- cgit v1.2.3