diff options
author | Matthew Weber <mtwb47@gmail.com> | 2023-04-19 21:52:18 -0400 |
---|---|---|
committer | Matthew Weber <mtwb47@gmail.com> | 2023-04-19 21:52:18 -0400 |
commit | 3e713d0906d488da390dc4bbf477a388643e19d0 (patch) | |
tree | fa1d38026d8e867e1df6ecd6de5dde6275d6c0ce | |
parent | 107ca66579d51c20678a7e330ba08045891ea300 (diff) |
added qtile config and readme
-rw-r--r-- | skel/.config/qtile/README.md | 41 | ||||
-rw-r--r-- | skel/.config/qtile/__pycache__/bar.cpython-310.pyc | bin | 0 -> 3071 bytes | |||
-rw-r--r-- | skel/.config/qtile/__pycache__/colors.cpython-310.pyc | bin | 0 -> 3199 bytes | |||
-rw-r--r-- | skel/.config/qtile/__pycache__/config.cpython-310.pyc | bin | 0 -> 7136 bytes | |||
-rw-r--r-- | skel/.config/qtile/__pycache__/dracula.cpython-310.pyc | bin | 0 -> 533 bytes | |||
-rw-r--r-- | skel/.config/qtile/colors.py | 203 | ||||
-rw-r--r-- | skel/.config/qtile/config.py | 308 | ||||
-rwxr-xr-x | skel/.config/qtile/scripts/autostart.sh | 17 | ||||
-rw-r--r-- | skel/.config/qtile/settings/__pycache__/path.cpython-310.pyc | bin | 0 -> 236 bytes | |||
-rw-r--r-- | skel/.config/qtile/settings/__pycache__/theme.cpython-310.pyc | bin | 0 -> 854 bytes | |||
-rw-r--r-- | skel/.config/qtile/settings/path.py | 3 | ||||
-rw-r--r-- | skel/.config/qtile/settings/theme.py | 36 | ||||
-rw-r--r-- | skel/.config/qtile/settings/widgets.py | 180 |
13 files changed, 788 insertions, 0 deletions
diff --git a/skel/.config/qtile/README.md b/skel/.config/qtile/README.md new file mode 100644 index 0000000..b1dd96c --- /dev/null +++ b/skel/.config/qtile/README.md @@ -0,0 +1,41 @@ +# Redcore's Qtile Config + +## Dependencies +* Qtile +* rofi +* Alacritty +* JetBrainsMono Nerd Font +* Kvantum and QT5CT for applying themes to QT applications +* lxappearance for applying themes to GTK applications + +## Changing Themes +The current configuration comes with several pre-installed color schemes. The default theme is the Redcore theme. These are also included: +* Dracula +* Everforest +* Doom-One +* Nord +* Gruvbox Dark +* Catppuccin +* moonfly +* retro +* whitey + +To change a theme, locate the line below in your $HOME/.config/qtile/config.py file: + +```colors, backgroundColor, foregroundColor, workspaceColor, chordColor = colors.redcore()``` + +Change the last word in that line to the color scheme you'd like to use. + +## Changing the bar position + +You can easily change the bar position by changing the word bottom to the word top in this line: + +```Screen(bottom=bar.Bar(widgets=widgets_list, size=30, background=backgroundColor, margin=0, opacity=0.8),),``` + + +# Credits + +* Contributed by Matt Weber AKA [The Linux Cast](https://youtube.com/thelinuxcast). +* Original Design inspiration from Jeff Winget. +* Fonts from Nerd Fonts + diff --git a/skel/.config/qtile/__pycache__/bar.cpython-310.pyc b/skel/.config/qtile/__pycache__/bar.cpython-310.pyc Binary files differnew file mode 100644 index 0000000..1ed2c0c --- /dev/null +++ b/skel/.config/qtile/__pycache__/bar.cpython-310.pyc diff --git a/skel/.config/qtile/__pycache__/colors.cpython-310.pyc b/skel/.config/qtile/__pycache__/colors.cpython-310.pyc Binary files differnew file mode 100644 index 0000000..187284f --- /dev/null +++ b/skel/.config/qtile/__pycache__/colors.cpython-310.pyc diff --git a/skel/.config/qtile/__pycache__/config.cpython-310.pyc b/skel/.config/qtile/__pycache__/config.cpython-310.pyc Binary files differnew file mode 100644 index 0000000..ea052aa --- /dev/null +++ b/skel/.config/qtile/__pycache__/config.cpython-310.pyc diff --git a/skel/.config/qtile/__pycache__/dracula.cpython-310.pyc b/skel/.config/qtile/__pycache__/dracula.cpython-310.pyc Binary files differnew file mode 100644 index 0000000..8a3eeb5 --- /dev/null +++ b/skel/.config/qtile/__pycache__/dracula.cpython-310.pyc diff --git a/skel/.config/qtile/colors.py b/skel/.config/qtile/colors.py new file mode 100644 index 0000000..4a255e2 --- /dev/null +++ b/skel/.config/qtile/colors.py @@ -0,0 +1,203 @@ +#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 +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 +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 +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 +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 +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 +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 +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 +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 = "#31363b" + foregroundColor = "#eff0f1" + workspaceColor = "#27ae60" + foregroundColorTwo = "#2a2a2a" + return colors, backgroundColor, foregroundColor, workspaceColor, foregroundColorTwo + + + + diff --git a/skel/.config/qtile/config.py b/skel/.config/qtile/config.py new file mode 100644 index 0000000..5e209b8 --- /dev/null +++ b/skel/.config/qtile/config.py @@ -0,0 +1,308 @@ +# Qtile Config. Original concept done by Jeff Winget and Matt Weber (The Linux Cast). + + +from typing import List # noqa: F401 +import os +import subprocess +from os import path + +from libqtile import bar, layout, widget, hook, qtile +from libqtile.config import Click, Drag, Group, ScratchPad, DropDown, Key, Match, Screen +from libqtile.lazy import lazy +from settings.path import qtile_path +import colors + +# Variables. Change mod key, terminal and app launcher here. +mod = "mod4" +terminal = "alacritty" +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. +# 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 + Key([mod], "Return", lazy.spawn(terminal)), + Key([mod], "d", lazy.spawn(rofi)), +# Qtile System Actions + Key([mod, "shift"], "r", lazy.restart()), + Key([mod, "shift"], "x", lazy.shutdown()), +# Active Window Actions + Key([mod], "f", lazy.window.toggle_fullscreen()), + Key([mod], "q", lazy.window.kill()), + Key([mod, "control"], "h", + lazy.layout.grow_right(), + lazy.layout.grow(), + lazy.layout.increase_ratio(), + lazy.layout.delete() + ), + Key([mod, "control"], "Right", + lazy.layout.grow_right(), + lazy.layout.grow(), + lazy.layout.increase_ratio(), + lazy.layout.delete() + ), + Key([mod, "control"], "l", + lazy.layout.grow_left(), + lazy.layout.shrink(), + lazy.layout.decrease_ratio(), + lazy.layout.add() + ), + Key([mod, "control"], "Left", + lazy.layout.grow_left(), + lazy.layout.shrink(), + lazy.layout.decrease_ratio(), + lazy.layout.add() + ), + Key([mod, "control"], "k", + lazy.layout.grow_up(), + lazy.layout.grow(), + lazy.layout.decrease_nmaster() + ), + Key([mod, "control"], "Up", + lazy.layout.grow_up(), + lazy.layout.grow(), + lazy.layout.decrease_nmaster() + ), + Key([mod, "control"], "j", + lazy.layout.grow_down(), + lazy.layout.shrink(), + lazy.layout.increase_nmaster() + ), + Key([mod, "control"], "Down", + lazy.layout.grow_down(), + lazy.layout.shrink(), + lazy.layout.increase_nmaster() + ), + +# Window Focus (Arrows and Vim keys) + Key([mod], "Up", lazy.layout.up()), + Key([mod], "Down", lazy.layout.down()), + Key([mod], "Left", lazy.layout.left()), + Key([mod], "Right", lazy.layout.right()), + Key([mod], "k", lazy.layout.up()), + Key([mod], "j", lazy.layout.down()), + Key([mod], "h", lazy.layout.left()), + Key([mod], "l", lazy.layout.right()), + +# 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 + Key([mod, "shift"], "Up", lazy.layout.shuffle_up()), + Key([mod, "shift"], "Down", lazy.layout.shuffle_down()), + Key([mod, "shift"], "Left", lazy.layout.swap_left()), + Key([mod, "shift"], "Right", lazy.layout.swap_right()), + Key([mod, "shift"], "k", lazy.layout.shuffle_up()), + 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) + Key([mod], "i", lazy.to_screen(0)), + Key([mod], "o", lazy.to_screen(1)), + +# Switch focus of monitors + Key([mod], "period", lazy.next_screen()), + Key([mod], "comma", lazy.prev_screen()), +] + +# 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"] + +# Change out these two lines to change between icons and numbers in the workspace section of the bar. +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"] + +# Add group names, labels, and default layouts to the groups object. +for i in range(len(group_names)): + groups.append( + Group( + name=group_names[i], + layout=group_layouts[i].lower(), + label=group_labels[i], + )) + +# 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."), + ]) + +# 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), + ])) + +# Scratchpad keybindings +keys.extend([ + Key([mod], "n", lazy.group['scratchpad'].dropdown_toggle('term')), + Key([mod, "shift"], "n", lazy.group['scratchpad'].dropdown_toggle('term2')), +]) + + +# Define layouts and layout themes +layout_theme = { + "margin":5, + "border_width": 4, + "border_focus": colors[2], + "border_normal": backgroundColor + } + +layouts = [ + layout.MonadTall(**layout_theme), + layout.MonadWide(**layout_theme), + layout.Floating(**layout_theme), + layout.RatioTile(**layout_theme), + layout.Max(**layout_theme) +] + +# Mouse callback functions +def launch_menu(): + qtile.cmd_spawn("rofi -show drun -show-icons") + + +# Define Widgets +widget_defaults = dict( + font="JetBrainsMono Nerd Font", + fontsize = 12, + padding = 2, + background=backgroundColor +) + +def init_widgets_list(monitor_num): + widgets_list = [ + widget.GroupBox( + font="JetBrainsMono Nerd Font", + fontsize = 16, + margin_y = 2, + margin_x = 4, + padding_y = 6, + padding_x = 6, + borderwidth = 2, + disable_drag = True, + active = colors[4], + inactive = foregroundColor, + hide_unused = False, + rounded = False, + highlight_method = "line", + highlight_color = [backgroundColor, backgroundColor], + this_current_screen_border = colors[5], + 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 = "JetBrainsMono Nerd Font", + foreground = colors[10], + background = colors[2], + borderwidth = 0, + border = colors[6], + margin = 0, + padding = 8, + highlight_method = "block", + title_width_method = "uniform", + urgent_alert_method = "border", + urgent_border = colors[1], + rounded = False, + txt_floating = "🗗 ", + txt_maximized = "🗖 ", + txt_minimized = "🗕 ", + ), + widget.Sep(linewidth = 0, padding = 10), + widget.TextBox(text = " ", fontsize = 14, font = "JetBrainsMono Nerd Font", foreground = colors[7]), + widget.CPU( + font = "JetBrainsMono Nerd Font", + update_interval = 1.0, + format = '{load_percent}%', + foreground = foregroundColor, + padding = 5 + ), + widget.Sep(linewidth = 0, padding = 10), + widget.TextBox(text = "", fontsize = 14, font = "JetBrainsMono Nerd Font", foreground = colors[3]), + widget.Memory( + font = "JetBrainsMonoNerdFont", + foreground = foregroundColor, + format = '{MemUsed: .0f}{mm} /{MemTotal: .0f}{mm}', + measure_mem='G', + padding = 5, + ), + widget.Sep(linewidth = 0, padding = 10), + widget.TextBox(text = " ", fontsize = 14, font = "JetBrainsMono Nerd Font", foreground = colors[10]), + widget.Clock(format='%I:%M %p', font = "JetBrainsMono Nerd Font", padding = 10, foreground = foregroundColor), + widget.Systray(background = backgroundColor, icon_size = 20, padding = 4), + widget.CurrentLayoutIcon(scale = 0.5, foreground = colors[6], background = colors[6]), + ] + + 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),), + ] + +# Drag floating layouts. +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()), + 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]) + +dgroups_key_binder = None +dgroups_app_rules = [] # type: List +follow_mouse_focus = True +bring_front_click = False +cursor_warp = False +floating_layout = layout.Floating(float_rules=[ + *layout.Floating.default_float_rules, + Match(wm_class='confirmreset'), # gitk + Match(wm_class='makebranch'), # gitk + Match(wm_class='maketag'), # gitk + 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) +auto_fullscreen = True +focus_on_window_activation = "smart" +reconfigure_screens = True + +auto_minimize = True +wmname = "Qtile 0.21.0" diff --git a/skel/.config/qtile/scripts/autostart.sh b/skel/.config/qtile/scripts/autostart.sh new file mode 100755 index 0000000..4cf5b6c --- /dev/null +++ b/skel/.config/qtile/scripts/autostart.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +function run { + if ! pgrep $1 ; + then + $@& + fi +} + + +dunst & + +#starting utility applications at boot time +picom --vsync & +/usr/libexec/polkit-gnome-autentication-agent-1 & +#/usr/lib/xfce4/notifyd/xfce4-notifyd & +~/.fehbg & diff --git a/skel/.config/qtile/settings/__pycache__/path.cpython-310.pyc b/skel/.config/qtile/settings/__pycache__/path.cpython-310.pyc Binary files differnew file mode 100644 index 0000000..f0bb009 --- /dev/null +++ b/skel/.config/qtile/settings/__pycache__/path.cpython-310.pyc diff --git a/skel/.config/qtile/settings/__pycache__/theme.cpython-310.pyc b/skel/.config/qtile/settings/__pycache__/theme.cpython-310.pyc Binary files differnew file mode 100644 index 0000000..2ad6115 --- /dev/null +++ b/skel/.config/qtile/settings/__pycache__/theme.cpython-310.pyc diff --git a/skel/.config/qtile/settings/path.py b/skel/.config/qtile/settings/path.py new file mode 100644 index 0000000..730d101 --- /dev/null +++ b/skel/.config/qtile/settings/path.py @@ -0,0 +1,3 @@ +from os import path + +qtile_path = path.join(path.expanduser('~'), ".config", "qtile") diff --git a/skel/.config/qtile/settings/theme.py b/skel/.config/qtile/settings/theme.py new file mode 100644 index 0000000..707b221 --- /dev/null +++ b/skel/.config/qtile/settings/theme.py @@ -0,0 +1,36 @@ +# Antonio Sarosi +# https://youtube.com/c/antoniosarosi +# https://github.com/antoniosarosi/dotfiles + +# Theming for Qtile + +from os import path +import subprocess +import json + +from settings.path import qtile_path + + +def load_theme(): + theme = "arc" + + config = path.join(qtile_path, "config.json") + if path.isfile(config): + with open(config) as f: + theme = json.load(f)["theme"] + else: + 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') + + with open(path.join(theme_file)) as f: + return json.load(f) + + +if __name__ == "settings.theme": + colors = load_theme() + diff --git a/skel/.config/qtile/settings/widgets.py b/skel/.config/qtile/settings/widgets.py new file mode 100644 index 0000000..6178abd --- /dev/null +++ b/skel/.config/qtile/settings/widgets.py @@ -0,0 +1,180 @@ +from libqtile import widget +from .theme import colors + + +# Define Widgets +widget_defaults = dict( + font="JetBrainsMono Nerd Font", + fontsize = 12, + padding = 2, + background=bg +) + +def init_widgets_list(monitor_num): + widgets_list = [ + widget.GroupBox( + font="JetBrainsMono Nerd Font", + fontsize = 16, + margin_y = 2, + margin_x = 4, + padding_y = 6, + padding_x = 6, + borderwidth = 2, + disable_drag = True, + active = color2, + inactive = fg, + hide_unused = False, + rounded = False, + highlight_method = "line", + highlight_color = [bg, bg], + this_current_screen_border = color2, + this_screen_border = color4, + other_screen_border = color3, + other_current_screen_border = color3, + urgent_alert_method = "line", + urgent_border = color1, + urgent_text = color1, + foreground = fg, + background = bg, + use_mouse_wheel = False + ), + widget.TaskList( + icon_size = 0, + font = "JetBrainsMono Nerd Font", + foreground = fg, + background = bg, + borderwidth = 1, + border = color2, + margin = 0, + padding = 10, + highlight_method = "block", + title_width_method = "uniform", + urgent_alert_method = "border", + urgent_border = color1, + rounded = False, + txt_floating = "🗗 ", + txt_maximized = "🗖 ", + txt_minimized = "🗕 ", + ), + widget.Sep( + linewidth = 1, + padding = 10, + foreground = color2, + background = bg + ), + widget.OpenWeather( + app_key = "4cf3731a25d1d1f4e4a00207afd451a2", + cityid = "4997193", + format = '{icon} {main_temp}°', + metric = False, + font = "JetBrainsMono Nerd Font", + foreground = fg, + ), +# widget.GenPollText( +# name = "weather", +# fmt = " {} ", update_interval = 3600, +# foreground = fg, +# func = lambda: subprocess.check_output("/usr/local/bin/weather.py").decode("utf-8"), +# margin = 10 +# ), +# widget.Sep( +# linewidth = 0, +# padding = 10 +# ), + widget.Sep( + linewidth = 0, + padding = 10 + ), + widget.TextBox( + text = "ﮮ", + fontsize = 14, + font = "JetBrainsMono Nerd Font", + foreground = color6, + ), + widget.CheckUpdates( + distro = 'Fedora', + display_format = '{updates} updates', + font = "JetBrainsMono Nerd Font", + no_update_string = 'No Updates', + update_interval = 3600 + ), + widget.Sep( + linewidth = 0, + padding = 10 + ), + widget.TextBox( + text = "", + fontsize = 14, + font = "JetBrainsMono Nerd Font", + foreground = color1, + ), + widget.CPU( + font = "JetBrainsMono Nerd Font", + update_interval = 1.0, + format = '{load_percent}%', + foreground = fg, + padding = 5 + ), + widget.Sep( + linewidth = 0, + padding = 10 + ), + widget.TextBox( + text = "", + fontsize = 14, + font = "JetBrainsMono Nerd Font", + foreground = color3, + ), + widget.Memory( + font = "JetBrainsMonoNerdFont", + foreground = fg, + format = '{MemUsed: .0f}{mm} /{MemTotal: .0f}{mm}', + measure_mem='G', + padding = 5, + ), + widget.Sep( + linewidth = 0, + padding = 10 + ), + widget.TextBox( + text = "", + fontsize = 14, + font = "JetBrainsMono Nerd Font", + foreground = color5, + ), + widget.Clock( + format='%I:%M %p', + font = "JetBrainsMono Nerd Font", + padding = 10, + foreground = fg + ), + widget.Systray( + background = bg, + icon_size = 20, + padding = 4, + ), + widget.Sep( + linewidth = 1, + padding = 10, + foreground = color2, + background = bg + ), + widget.CurrentLayoutIcon( + scale = 0.5, + foreground = fg, + background = bg + ), + ] + + return widgets_list + +def init_secondary_widgets_list(monitor_num): + secondary_widgets_list = init_widgets_list(monitor_num) + del secondary_widgets_list[16:17] + return secondary_widgets_list + +widgets_list = init_widgets_list("1") +secondary_widgets_list = init_secondary_widgets_list("2") +secondary_widgets_list_2 = init_secondary_widgets_list("3") + + |