Compare commits

...

2 Commits

Author SHA1 Message Date
cd5565cb50 Added for ref, may not keep 2021-09-30 18:54:44 -04:00
846256b630 Fixed some bindings & paths 2021-09-30 18:54:18 -04:00
2 changed files with 434 additions and 324 deletions

47
.config/qtile/colors.py Normal file
View File

@ -0,0 +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',
}
# 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',
# }

View File

@ -36,11 +36,11 @@ from libqtile.command import lazy
from libqtile.widget import Spacer from libqtile.widget import Spacer
#mod4 or mod = super key # mod4 or mod = super key
mod = "mod4" mod = "mod4"
mod1 = "alt" mod1 = "alt"
mod2 = "control" mod2 = "control"
home = os.path.expanduser('~') home = os.path.expanduser("~")
@lazy.function @lazy.function
@ -49,92 +49,84 @@ def window_to_prev_group(qtile):
i = qtile.groups.index(qtile.currentGroup) i = qtile.groups.index(qtile.currentGroup)
qtile.currentWindow.togroup(qtile.groups[i - 1].name) qtile.currentWindow.togroup(qtile.groups[i - 1].name)
@lazy.function @lazy.function
def window_to_next_group(qtile): def window_to_next_group(qtile):
if qtile.currentWindow is not None: if qtile.currentWindow is not None:
i = qtile.groups.index(qtile.currentGroup) i = qtile.groups.index(qtile.currentGroup)
qtile.currentWindow.togroup(qtile.groups[i + 1].name) qtile.currentWindow.togroup(qtile.groups[i + 1].name)
myTerm = "alacritty" # My terminal of choice myTerm = "alacritty" # My terminal of choice
keys = [ keys = [
# SUPER + FUNCTION KEYS
# SUPER + FUNCTION KEYS
Key([mod], "f", lazy.window.toggle_fullscreen()), Key([mod], "f", lazy.window.toggle_fullscreen()),
Key([mod], "q", lazy.window.kill()), Key([mod], "q", lazy.window.kill()),
Key([mod], "t", lazy.spawn('xterm')), Key([mod], "t", lazy.spawn("xterm")),
Key([mod], "v", lazy.spawn('pavucontrol')), Key([mod], "v", lazy.spawn("pavucontrol")),
Key([mod], "d", lazy.spawn('nwggrid -p -o 0.4')), Key([mod], "s", lazy.spawn("nwggrid -p -o 0.4")),
Key([mod], "Escape", lazy.spawn('xkill')), Key([mod], "Escape", lazy.spawn("xkill")),
Key([mod], "Return", lazy.spawn('kitty')), Key([mod], "Return", lazy.spawn("kitty")),
Key([mod], "KP_Enter", lazy.spawn('kitty')), Key([mod], "KP_Enter", lazy.spawn("kitty")),
Key([mod], "x", lazy.shutdown()), Key([mod], "x", lazy.shutdown()),
# SUPER + SHIFT KEYS
# SUPER + SHIFT KEYS Key([mod, "shift"], "Return", lazy.spawn("pcmanfm")),
Key(
Key([mod, "shift"], "Return", lazy.spawn('pcmanfm')), [mod, "shift"],
Key([mod, "shift"], "d", lazy.spawn("dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn 'NotoMonoRegular:bold:pixelsize=14'")), "d",
# Key([mod, "shift"], "d", lazy.spawn(home + '/.config/qtile/scripts/dmenu.sh')), lazy.spawn(
"dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn 'NotoMonoRegular:bold:pixelsize=14'"
),
),
# Key([mod, "shift"], "d", lazy.spawn(home + '/.config/qtile/scripts/dmenu.sh')),
Key([mod, "shift"], "q", lazy.window.kill()), Key([mod, "shift"], "q", lazy.window.kill()),
Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "r", lazy.restart()),
Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "r", lazy.restart()),
Key([mod, "shift"], "x", lazy.shutdown()), Key([mod, "shift"], "x", lazy.shutdown()),
# CONTROL + ALT KEYS
# CONTROL + ALT KEYS Key(
["mod1", "control"],
Key(["mod1", "control"], "o", lazy.spawn(home + '/.config/qtile/scripts/picom-toggle.sh')), "o",
Key(["mod1", "control"], "t", lazy.spawn('xterm')), lazy.spawn(home + "/.config/qtile/scripts/picom-toggle.sh"),
Key(["mod1", "control"], "u", lazy.spawn('pavucontrol')), ),
Key(["mod1", "control"], "t", lazy.spawn("xterm")),
# ALT + ... KEYS Key(["mod1", "control"], "u", lazy.spawn("pavucontrol")),
# ALT + ... KEYS
Key(["mod1"], "p", lazy.spawn("pamac-manager")),
Key(["mod1"], "p", lazy.spawn('pamac-manager')), Key(["mod1"], "f", lazy.spawn("waterfox-g3")),
Key(["mod1"], "f", lazy.spawn('waterfox-g3')), Key(["mod1"], "m", lazy.spawn("pcmanfm")),
Key(["mod1"], "m", lazy.spawn('pcmanfm')), Key(["mod1"], "w", lazy.spawn("garuda-welcome")),
Key(["mod1"], "w", lazy.spawn('garuda-welcome')), # CONTROL + SHIFT KEYS
Key([mod2, "shift"], "Escape", lazy.spawn("lxtask")),
# SCREENSHOTS
# CONTROL + SHIFT KEYS Key([], "Print", lazy.spawn("flameshot full -p " + home + "/Pictures/Screenshots")),
Key(
Key([mod2, "shift"], "Escape", lazy.spawn('lxtask')), [mod2],
"Print",
lazy.spawn("flameshot full -p " + home + "/Pictures/Screenshots"),
# SCREENSHOTS ),
# Key([mod2, "shift"], "Print", lazy.spawn('gnome-screenshot -i')),
Key([], "Print", lazy.spawn('flameshot full -p ' + home + '/Pictures')), # MULTIMEDIA KEYS
Key([mod2], "Print", lazy.spawn('flameshot full -p ' + home + '/Pictures')), # INCREASE/DECREASE BRIGHTNESS
# Key([mod2, "shift"], "Print", lazy.spawn('gnome-screenshot -i')),
# MULTIMEDIA KEYS
# INCREASE/DECREASE BRIGHTNESS
Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight -inc 5")), Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight -inc 5")),
Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -dec 5")), Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -dec 5")),
# INCREASE/DECREASE/MUTE VOLUME
# INCREASE/DECREASE/MUTE VOLUME
Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")), Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")),
Key([], "XF86AudioLowerVolume", lazy.spawn("amixer -q set Master 5%-")), Key([], "XF86AudioLowerVolume", lazy.spawn("amixer -q set Master 5%-")),
Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer -q set Master 5%+")), Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer -q set Master 5%+")),
Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause")), Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause")),
Key([], "XF86AudioNext", lazy.spawn("playerctl next")), Key([], "XF86AudioNext", lazy.spawn("playerctl next")),
Key([], "XF86AudioPrev", lazy.spawn("playerctl previous")), Key([], "XF86AudioPrev", lazy.spawn("playerctl previous")),
Key([], "XF86AudioStop", lazy.spawn("playerctl stop")), Key([], "XF86AudioStop", lazy.spawn("playerctl stop")),
# Key([], "XF86AudioPlay", lazy.spawn("mpc toggle")),
# Key([], "XF86AudioPlay", lazy.spawn("mpc toggle")), # Key([], "XF86AudioNext", lazy.spawn("mpc next")),
# Key([], "XF86AudioNext", lazy.spawn("mpc next")), # Key([], "XF86AudioPrev", lazy.spawn("mpc prev")),
# Key([], "XF86AudioPrev", lazy.spawn("mpc prev")), # Key([], "XF86AudioStop", lazy.spawn("mpc stop")),
# Key([], "XF86AudioStop", lazy.spawn("mpc stop")), # QTILE LAYOUT KEYS
# QTILE LAYOUT KEYS
Key([mod], "n", lazy.layout.normalize()), Key([mod], "n", lazy.layout.normalize()),
Key([mod], "space", lazy.next_layout()), Key([mod], "space", lazy.next_layout()),
# CHANGE FOCUS
# CHANGE FOCUS
Key([mod], "Up", lazy.layout.up()), Key([mod], "Up", lazy.layout.up()),
Key([mod], "Down", lazy.layout.down()), Key([mod], "Down", lazy.layout.down()),
Key([mod], "Left", lazy.layout.left()), Key([mod], "Left", lazy.layout.left()),
@ -143,106 +135,149 @@ keys = [
Key([mod], "j", lazy.layout.down()), Key([mod], "j", lazy.layout.down()),
Key([mod], "h", lazy.layout.left()), Key([mod], "h", lazy.layout.left()),
Key([mod], "l", lazy.layout.right()), Key([mod], "l", lazy.layout.right()),
# RESIZE UP, DOWN, LEFT, RIGHT
Key(
# RESIZE UP, DOWN, LEFT, RIGHT [mod, "control"],
Key([mod, "control"], "l", "l",
lazy.layout.grow_right(), lazy.layout.grow_right(),
lazy.layout.grow(), lazy.layout.grow(),
lazy.layout.increase_ratio(), lazy.layout.increase_ratio(),
lazy.layout.delete(), lazy.layout.delete(),
), ),
Key([mod, "control"], "Right", Key(
[mod, "control"],
"Right",
lazy.layout.grow_right(), lazy.layout.grow_right(),
lazy.layout.grow(), lazy.layout.grow(),
lazy.layout.increase_ratio(), lazy.layout.increase_ratio(),
lazy.layout.delete(), lazy.layout.delete(),
), ),
Key([mod, "control"], "h", Key(
[mod, "control"],
"h",
lazy.layout.grow_left(), lazy.layout.grow_left(),
lazy.layout.shrink(), lazy.layout.shrink(),
lazy.layout.decrease_ratio(), lazy.layout.decrease_ratio(),
lazy.layout.add(), lazy.layout.add(),
), ),
Key([mod, "control"], "Left", Key(
[mod, "control"],
"Left",
lazy.layout.grow_left(), lazy.layout.grow_left(),
lazy.layout.shrink(), lazy.layout.shrink(),
lazy.layout.decrease_ratio(), lazy.layout.decrease_ratio(),
lazy.layout.add(), lazy.layout.add(),
), ),
Key([mod, "control"], "k", Key(
[mod, "control"],
"k",
lazy.layout.grow_up(), lazy.layout.grow_up(),
lazy.layout.grow(), lazy.layout.grow(),
lazy.layout.decrease_nmaster(), lazy.layout.decrease_nmaster(),
), ),
Key([mod, "control"], "Up", Key(
[mod, "control"],
"Up",
lazy.layout.grow_up(), lazy.layout.grow_up(),
lazy.layout.grow(), lazy.layout.grow(),
lazy.layout.decrease_nmaster(), lazy.layout.decrease_nmaster(),
), ),
Key([mod, "control"], "j", Key(
[mod, "control"],
"j",
lazy.layout.grow_down(), lazy.layout.grow_down(),
lazy.layout.shrink(), lazy.layout.shrink(),
lazy.layout.increase_nmaster(), lazy.layout.increase_nmaster(),
), ),
Key([mod, "control"], "Down", Key(
[mod, "control"],
"Down",
lazy.layout.grow_down(), lazy.layout.grow_down(),
lazy.layout.shrink(), lazy.layout.shrink(),
lazy.layout.increase_nmaster(), lazy.layout.increase_nmaster(),
), ),
# FLIP LAYOUT FOR MONADTALL/MONADWIDE
# FLIP LAYOUT FOR MONADTALL/MONADWIDE
Key([mod, "shift"], "f", lazy.layout.flip()), Key([mod, "shift"], "f", lazy.layout.flip()),
# FLIP LAYOUT FOR BSP
# FLIP LAYOUT FOR BSP
Key([mod, "mod1"], "k", lazy.layout.flip_up()), Key([mod, "mod1"], "k", lazy.layout.flip_up()),
Key([mod, "mod1"], "j", lazy.layout.flip_down()), Key([mod, "mod1"], "j", lazy.layout.flip_down()),
Key([mod, "mod1"], "l", lazy.layout.flip_right()), Key([mod, "mod1"], "l", lazy.layout.flip_right()),
Key([mod, "mod1"], "h", lazy.layout.flip_left()), Key([mod, "mod1"], "h", lazy.layout.flip_left()),
# MOVE WINDOWS UP OR DOWN BSP LAYOUT
# MOVE WINDOWS UP OR DOWN BSP LAYOUT
Key([mod, "shift"], "k", lazy.layout.shuffle_up()), Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
Key([mod, "shift"], "j", lazy.layout.shuffle_down()), Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
Key([mod, "shift"], "h", lazy.layout.shuffle_left()), Key([mod, "shift"], "h", lazy.layout.shuffle_left()),
Key([mod, "shift"], "l", lazy.layout.shuffle_right()), Key([mod, "shift"], "l", lazy.layout.shuffle_right()),
### Treetab controls ### Treetab controls
Key([mod, "control"], "k", Key(
[mod, "control"],
"k",
lazy.layout.section_up(), lazy.layout.section_up(),
desc='Move up a section in treetab' desc="Move up a section in treetab",
), ),
Key([mod, "control"], "j", Key(
[mod, "control"],
"j",
lazy.layout.section_down(), lazy.layout.section_down(),
desc='Move down a section in treetab' desc="Move down a section in treetab",
), ),
# MOVE WINDOWS UP OR DOWN MONADTALL/MONADWIDE LAYOUT
# MOVE WINDOWS UP OR DOWN MONADTALL/MONADWIDE LAYOUT
Key([mod, "shift"], "Up", lazy.layout.shuffle_up()), Key([mod, "shift"], "Up", lazy.layout.shuffle_up()),
Key([mod, "shift"], "Down", lazy.layout.shuffle_down()), Key([mod, "shift"], "Down", lazy.layout.shuffle_down()),
Key([mod, "shift"], "Left", lazy.layout.swap_left()), Key([mod, "shift"], "Left", lazy.layout.swap_left()),
Key([mod, "shift"], "Right", lazy.layout.swap_right()), Key([mod, "shift"], "Right", lazy.layout.swap_right()),
# TOGGLE FLOATING LAYOUT
# TOGGLE FLOATING LAYOUT Key([mod, "shift"], "space", lazy.window.toggle_floating()),
Key([mod, "shift"], "space", lazy.window.toggle_floating()),] ]
groups = [] groups = []
# FOR QWERTY KEYBOARDS # FOR QWERTY KEYBOARDS
group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0",] group_names = [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"0",
]
# FOR AZERTY KEYBOARDS # FOR AZERTY KEYBOARDS
#group_names = ["ampersand", "eacute", "quotedbl", "apostrophe", "parenleft", "section", "egrave", "exclam", "ccedilla", "agrave",] # 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 = ["1 ", "2 ", "3 ", "4 ", "5 ", "6 ", "7 ", "8 ", "9 ", "0",]
group_labels = ["", "", "", "", "", "", "", "", "", "",] group_labels = [
#group_labels = ["", "", "", "", "",] "",
#group_labels = ["Web", "Edit/chat", "Image", "Gimp", "Meld", "Video", "Vb", "Files", "Mail", "Music",] "",
"",
"",
"",
"",
"",
"",
"",
"",
]
# group_labels = ["", "", "", "", "",]
# group_labels = ["Web", "Edit/chat", "Image", "Gimp", "Meld", "Video", "Vb", "Files", "Mail", "Music",]
group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "treetab", "floating",] group_layouts = [
#group_layouts = ["monadtall", "matrix", "monadtall", "bsp", "monadtall", "matrix", "monadtall", "bsp", "monadtall", "monadtall",] "monadtall",
"monadtall",
"monadtall",
"monadtall",
"monadtall",
"monadtall",
"monadtall",
"monadtall",
"treetab",
"floating",
]
# group_layouts = ["monadtall", "matrix", "monadtall", "bsp", "monadtall", "matrix", "monadtall", "bsp", "monadtall", "monadtall",]
for i in range(len(group_names)): for i in range(len(group_names)):
groups.append( groups.append(
@ -250,38 +285,50 @@ for i in range(len(group_names)):
name=group_names[i], name=group_names[i],
layout=group_layouts[i].lower(), layout=group_layouts[i].lower(),
label=group_labels[i], label=group_labels[i],
)) )
)
for i in groups: for i in groups:
keys.extend([ keys.extend(
[
#CHANGE WORKSPACES # CHANGE WORKSPACES
Key([mod], i.name, lazy.group[i.name].toscreen()), Key([mod], i.name, lazy.group[i.name].toscreen()),
Key([mod], "Tab", lazy.screen.next_group()), Key([mod], "Tab", lazy.screen.next_group()),
Key([mod, "shift" ], "Tab", lazy.screen.prev_group()), Key([mod, "shift"], "Tab", lazy.screen.prev_group()),
Key(["mod1"], "Tab", lazy.screen.next_group()), Key(["mod1"], "Tab", lazy.screen.next_group()),
Key(["mod1", "shift"], "Tab", lazy.screen.prev_group()), Key(["mod1", "shift"], "Tab", lazy.screen.prev_group()),
# MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND STAY ON WORKSPACE
# MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND STAY ON WORKSPACE # Key([mod, "shift"], i.name, lazy.window.togroup(i.name)),
#Key([mod, "shift"], i.name, lazy.window.togroup(i.name)), # MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND FOLLOW MOVED WINDOW TO WORKSPACE
# MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND FOLLOW MOVED WINDOW TO WORKSPACE Key(
Key([mod, "shift"], i.name, lazy.window.togroup(i.name) , lazy.group[i.name].toscreen()), [mod, "shift"],
]) i.name,
lazy.window.togroup(i.name),
lazy.group[i.name].toscreen(),
),
]
)
def init_layout_theme(): def init_layout_theme():
return {"margin":10, return {
"border_width":2, "margin": 10,
"border_width": 2,
"border_focus": "#ff00ff", "border_focus": "#ff00ff",
"border_normal": "#f4c2c2" "border_normal": "#f4c2c2",
} }
layout_theme = init_layout_theme() layout_theme = init_layout_theme()
layouts = [ layouts = [
layout.MonadTall(margin=16, border_width=2, border_focus="#ff00ff", border_normal="#f4c2c2"), layout.MonadTall(
layout.MonadWide(margin=16, border_width=2, border_focus="#ff00ff", border_normal="#f4c2c2"), margin=16, border_width=2, border_focus="#ff00ff", border_normal="#f4c2c2"
),
layout.MonadWide(
margin=16, border_width=2, border_focus="#ff00ff", border_normal="#f4c2c2"
),
layout.Matrix(**layout_theme), layout.Matrix(**layout_theme),
layout.Bsp(**layout_theme), layout.Bsp(**layout_theme),
layout.Floating(**layout_theme), layout.Floating(**layout_theme),
@ -291,22 +338,24 @@ layouts = [
layout.Stack(**layout_theme), layout.Stack(**layout_theme),
layout.Tile(**layout_theme), layout.Tile(**layout_theme),
layout.TreeTab( layout.TreeTab(
sections=['FIRST', 'SECOND'], sections=["FIRST", "SECOND"],
bg_color = '#141414', bg_color="#141414",
active_bg = '#0000ff', active_bg="#0000ff",
inactive_bg = '#1e90ff', inactive_bg="#1e90ff",
padding_y =5, padding_y=5,
section_top =10, section_top=10,
panel_width = 280), panel_width=280,
),
layout.VerticalTile(**layout_theme), layout.VerticalTile(**layout_theme),
layout.Zoomy(**layout_theme) layout.Zoomy(**layout_theme),
] ]
# COLORS FOR THE BAR # COLORS FOR THE BAR
def init_colors(): def init_colors():
return [["#2F343F", "#2F343F"], # color 0 return [
["#2F343F", "#2F343F"], # color 0
["#2F343F", "#2F343F"], # color 1 ["#2F343F", "#2F343F"], # color 1
["#c0c5ce", "#c0c5ce"], # color 2 ["#c0c5ce", "#c0c5ce"], # color 2
["#e75480", "#e75480"], # color 3 ["#e75480", "#e75480"], # color 3
@ -317,81 +366,74 @@ def init_colors():
["#000000", "#000000"], # color 8 ["#000000", "#000000"], # color 8
["#c40234", "#c40234"], # color 9 ["#c40234", "#c40234"], # color 9
["#6790eb", "#6790eb"], # color 10 ["#6790eb", "#6790eb"], # color 10
["#ff00ff", "#ff00ff"], #11 ["#ff00ff", "#ff00ff"], # 11
["#4c566a", "#4c566a"], #12 ["#4c566a", "#4c566a"], # 12
["#282c34", "#282c34"], #13 ["#282c34", "#282c34"], # 13
["#212121", "#212121"], #14 ["#212121", "#212121"], # 14
["#98c379", "#98c379"], #15 ["#98c379", "#98c379"], # 15
["#b48ead", "#b48ead"], #16 ["#b48ead", "#b48ead"], # 16
["#abb2bf", "#abb2bf"],# color 17 ["#abb2bf", "#abb2bf"], # color 17
["#81a1c1", "#81a1c1"], #18 ["#81a1c1", "#81a1c1"], # 18
["#56b6c2", "#56b6c2"], #19 ["#56b6c2", "#56b6c2"], # 19
["#c678dd", "#c678dd"], #20 ["#c678dd", "#c678dd"], # 20
["#e06c75", "#e06c75"], #21 ["#e06c75", "#e06c75"], # 21
["#fb9f7f", "#fb9f7f"], #22 ["#fb9f7f", "#fb9f7f"], # 22
["#ffd47e", "#ffd47e"]] #23 ["#ffd47e", "#ffd47e"],
] # 23
colors = init_colors() colors = init_colors()
def base(fg='text', bg='dark'):
return {'foreground': colors[14],'background': colors[15]} def base(fg="text", bg="dark"):
return {"foreground": colors[14], "background": colors[15]}
# WIDGETS FOR THE BAR # WIDGETS FOR THE BAR
def init_widgets_defaults(): def init_widgets_defaults():
return dict(font="Noto Sans", return dict(font="Noto Sans", fontsize=9, padding=2, background=colors[1])
fontsize = 9,
padding = 2,
background=colors[1])
widget_defaults = init_widgets_defaults() widget_defaults = init_widgets_defaults()
def init_widgets_list(): def init_widgets_list():
prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname()) prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
widgets_list = [ widgets_list = [
widget.Sep( widget.Sep(
linewidth = 1, linewidth=1, padding=10, foreground=colors[15], background=colors[15]
padding = 10,
foreground = colors[15],
background = colors[15]
), # ), #
widget.Image( widget.Image(
filename = "~/.config/qtile/icons/garuda-red.png", filename="~/.config/qtile/icons/garuda-red.png",
iconsize = 9, iconsize=9,
background = colors[15], background=colors[15],
mouse_callbacks = {'Button1': lambda : qtile.cmd_spawn('jgmenu_run')} mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("jgmenu_run")},
), ),
widget.GroupBox( widget.GroupBox(
**base(bg=colors[15]), **base(bg=colors[15]),
font='UbuntuMono Nerd Font', font="UbuntuMono Nerd Font",
fontsize=11,
fontsize = 11, margin_y=3,
margin_y = 3, margin_x=2,
margin_x = 2, padding_y=5,
padding_y = 5, padding_x=4,
padding_x = 4, borderwidth=3,
borderwidth = 3,
active=colors[5], active=colors[5],
inactive=colors[6], inactive=colors[6],
rounded= True, rounded=True,
highlight_method='block', highlight_method="block",
urgent_alert_method='block', urgent_alert_method="block",
urgent_border=colors[16], urgent_border=colors[16],
this_current_screen_border=colors[20], this_current_screen_border=colors[20],
this_screen_border=colors[17], this_screen_border=colors[17],
other_current_screen_border=colors[13], other_current_screen_border=colors[13],
other_screen_border=colors[17], other_screen_border=colors[17],
disable_drag=True disable_drag=True
), ),
widget.TaskList( widget.TaskList(
highlight_method = 'border', # or block highlight_method="border", # or block
icon_size=17, icon_size=17,
max_title_width=150, max_title_width=150,
rounded=True, rounded=True,
@ -402,76 +444,65 @@ def init_widgets_list():
border=colors[7], border=colors[7],
foreground=colors[9], foreground=colors[9],
margin=2, margin=2,
txt_floating='🗗', txt_floating="🗗",
txt_minimized='>_ ', txt_minimized=">_ ",
borderwidth = 1, borderwidth=1,
background=colors[20], background=colors[20],
#unfocused_border = 'border' # unfocused_border = 'border'
), ),
widget.CurrentLayoutIcon( widget.CurrentLayoutIcon(
custom_icon_paths = [os.path.expanduser("~/.config/qtile/icons")], custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
foreground = colors[5], foreground=colors[5],
background = colors[3], background=colors[3],
padding = 0, padding=0,
scale = 0.7 scale=0.7,
), ),
widget.CurrentLayout( widget.CurrentLayout(
font = "Noto Sans Bold", font="Noto Sans Bold",
fontsize = 12, fontsize=12,
foreground = colors[5], foreground=colors[5],
background = colors[3] background=colors[3],
), ),
widget.Net( widget.Net(
font="Noto Sans", font="Noto Sans",
fontsize=12, fontsize=12,
# Here enter your network name # Here enter your network name
interface=["wlp6s0"], interface=["wlp6s0"],
format = '{down} ↓↑ {up}', format="{down} ↓↑ {up}",
foreground=colors[5], foreground=colors[5],
background=colors[19], background=colors[19],
padding = 0, padding=0,
), ),
widget.CPU( widget.CPU(
font="Noto Sans", font="Noto Sans",
#format = '{MemUsed}M/{MemTotal}M', # format = '{MemUsed}M/{MemTotal}M',
update_interval = 1, update_interval=1,
fontsize = 12, fontsize=12,
foreground = colors[5], foreground=colors[5],
background = colors[22], background=colors[22],
mouse_callbacks = {'Button1': lambda : qtile.cmd_spawn(myTerm + ' -e htop')}, mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(myTerm + " -e htop")},
), ),
widget.Memory( widget.Memory(
font="Noto Sans", font="Noto Sans",
format = '{MemUsed: .0f}M/{MemTotal: .0f}M', format="{MemUsed: .0f}M/{MemTotal: .0f}M",
update_interval = 1, update_interval=1,
fontsize = 12, fontsize=12,
measure_mem = 'M', measure_mem="M",
foreground = colors[5], foreground=colors[5],
background = colors[16], background=colors[16],
mouse_callbacks = {'Button1': lambda : qtile.cmd_spawn(myTerm + ' -e htop')}, mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(myTerm + " -e htop")},
), ),
widget.Clock( widget.Clock(
foreground = colors[9], foreground=colors[9],
background = colors[23], background=colors[23],
fontsize = 12, fontsize=12,
format="%Y-%m-%d %H:%M" format="%Y-%m-%d %H:%M",
),
widget.Systray(
background=colors[10],
icon_size=20,
padding = 4
), ),
widget.Systray(background=colors[10], icon_size=20, padding=4),
] ]
return widgets_list return widgets_list
widgets_list = init_widgets_list() widgets_list = init_widgets_list()
@ -479,26 +510,51 @@ def init_widgets_screen1():
widgets_screen1 = init_widgets_list() widgets_screen1 = init_widgets_list()
return widgets_screen1 return widgets_screen1
def init_widgets_screen2(): def init_widgets_screen2():
widgets_screen2 = init_widgets_list() widgets_screen2 = init_widgets_list()
return widgets_screen2 return widgets_screen2
widgets_screen1 = init_widgets_screen1() widgets_screen1 = init_widgets_screen1()
widgets_screen2 = init_widgets_screen2() widgets_screen2 = init_widgets_screen2()
def init_screens(): def init_screens():
return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), size=20, opacity=0.85, background= "000000")), return [
Screen(top=bar.Bar(widgets=init_widgets_screen2(), size=20, opacity=0.85, background= "000000"))] Screen(
top=bar.Bar(
widgets=init_widgets_screen1(),
size=20,
opacity=0.85,
background="000000",
)
),
Screen(
top=bar.Bar(
widgets=init_widgets_screen2(),
size=20,
opacity=0.85,
background="000000",
)
),
]
screens = init_screens() screens = init_screens()
# MOUSE CONFIGURATION # MOUSE CONFIGURATION
mouse = [ mouse = [
Drag([mod], "Button1", lazy.window.set_position_floating(), Drag(
start=lazy.window.get_position()), [mod],
Drag([mod], "Button3", lazy.window.set_size_floating(), "Button1",
start=lazy.window.get_size()) 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_key_binder = None
@ -546,60 +602,67 @@ dgroups_app_rules = []
# ASSIGN APPLICATIONS TO A SPECIFIC GROUPNAME # ASSIGN APPLICATIONS TO A SPECIFIC GROUPNAME
main = None main = None
@hook.subscribe.startup_once @hook.subscribe.startup_once
def start_once(): def start_once():
home = os.path.expanduser('~') home = os.path.expanduser("~")
subprocess.call([home + '/.config/qtile/scripts/autostart.sh']) subprocess.call([home + "/.config/qtile/scripts/autostart.sh"])
@hook.subscribe.startup @hook.subscribe.startup
def start_always(): def start_always():
# Set the cursor to something sane in X # Set the cursor to something sane in X
subprocess.Popen(['xsetroot', '-cursor_name', 'left_ptr']) subprocess.Popen(["xsetroot", "-cursor_name", "left_ptr"])
@hook.subscribe.client_new @hook.subscribe.client_new
def set_floating(window): def set_floating(window):
if (window.window.get_wm_transient_for() if (
or window.window.get_wm_type() in floating_types): window.window.get_wm_transient_for()
or window.window.get_wm_type() in floating_types
):
window.floating = True window.floating = True
floating_types = ["notification", "toolbar", "splash", "dialog"] floating_types = ["notification", "toolbar", "splash", "dialog"]
follow_mouse_focus = True follow_mouse_focus = True
bring_front_click = False bring_front_click = False
cursor_warp = False cursor_warp = False
floating_layout = layout.Floating(float_rules=[ floating_layout = layout.Floating(
float_rules=[
*layout.Floating.default_float_rules, *layout.Floating.default_float_rules,
Match(wm_class='confirm'), Match(wm_class="confirm"),
Match(wm_class='dialog'), Match(wm_class="dialog"),
Match(wm_class='download'), Match(wm_class="download"),
Match(wm_class='error'), Match(wm_class="error"),
Match(wm_class='file_progress'), Match(wm_class="file_progress"),
Match(wm_class='notification'), Match(wm_class="notification"),
Match(wm_class='splash'), Match(wm_class="splash"),
Match(wm_class='toolbar'), Match(wm_class="toolbar"),
Match(wm_class='confirmreset'), Match(wm_class="confirmreset"),
Match(wm_class='makebranch'), Match(wm_class="makebranch"),
Match(wm_class='maketag'), Match(wm_class="maketag"),
Match(wm_class='Arandr'), Match(wm_class="Arandr"),
Match(wm_class='feh'), Match(wm_class="feh"),
Match(wm_class='Galculator'), Match(wm_class="Galculator"),
Match(title='branchdialog'), Match(title="branchdialog"),
Match(title='Open File'), Match(title="Open File"),
Match(title='pinentry'), Match(title="pinentry"),
Match(wm_class='ssh-askpass'), Match(wm_class="ssh-askpass"),
Match(wm_class='lxpolkit'), Match(wm_class="lxpolkit"),
Match(wm_class='Lxpolkit'), Match(wm_class="Lxpolkit"),
Match(wm_class='yad'), Match(wm_class="yad"),
Match(wm_class='Yad'), Match(wm_class="Yad"),
Match(wm_class='Cairo-dock'), Match(wm_class="Cairo-dock"),
Match(wm_class='cairo-dock'), Match(wm_class="cairo-dock"),
],
fullscreen_border_width=0,
], fullscreen_border_width = 0, border_width = 0) border_width=0,
)
auto_fullscreen = True auto_fullscreen = True
focus_on_window_activation = "focus" # or smart focus_on_window_activation = "focus" # or smart