mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-14 04:38:29 +10:00
Updating qtile config and the README.
This commit is contained in:
@@ -59,7 +59,8 @@ import os
|
||||
import re
|
||||
import socket
|
||||
import subprocess
|
||||
from libqtile.config import KeyChord, Key, Screen, Group, Drag, Click
|
||||
from libqtile import qtile
|
||||
from libqtile.config import Click, Drag, Group, KeyChord, Key, Match, Screen
|
||||
from libqtile.command import lazy
|
||||
from libqtile import layout, bar, widget, hook
|
||||
from libqtile.lazy import lazy
|
||||
@@ -72,7 +73,6 @@ Just some variables I am setting to make my life easier.
|
||||
#+BEGIN_SRC python
|
||||
mod = "mod4" # Sets mod key to SUPER/WINDOWS
|
||||
myTerm = "alacritty" # My terminal of choice
|
||||
myConfig = "/home/dt/.config/qtile/config.py" # The Qtile config file location
|
||||
#+END_SRC
|
||||
|
||||
* Keybindings
|
||||
@@ -313,15 +313,15 @@ layouts = [
|
||||
#+END_SRC
|
||||
|
||||
* Colors
|
||||
Defining some colors for use in our panel.
|
||||
Defining some colors for use in our panel. Colors have two values because you can use gradients.
|
||||
|
||||
#+BEGIN_SRC python
|
||||
colors = [["#282c34", "#282c34"], # panel background
|
||||
["#434758", "#434758"], # background for current screen tab
|
||||
["#3d3f4b", "#434758"], # background for current screen tab
|
||||
["#ffffff", "#ffffff"], # font color for group names
|
||||
["#ff5555", "#ff5555"], # border line color for current tab
|
||||
["#8d62a9", "#8d62a9"], # border line color for other tab and odd widgets
|
||||
["#668bd7", "#668bd7"], # color for the even widgets
|
||||
["#74438f", "#74438f"], # border line color for 'other tabs' and color for 'odd widgets'
|
||||
["#4f76c7", "#4f76c7"], # color for the 'even widgets'
|
||||
["#e1acff", "#e1acff"]] # window name
|
||||
#+END_SRC
|
||||
|
||||
@@ -361,7 +361,7 @@ def init_widgets_list():
|
||||
widget.Image(
|
||||
filename = "~/.config/qtile/icons/python-white.png",
|
||||
scale = "False",
|
||||
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn('dmenu_run')}
|
||||
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm)}
|
||||
),
|
||||
widget.Sep(
|
||||
linewidth = 0,
|
||||
@@ -475,7 +475,7 @@ def init_widgets_list():
|
||||
distro = "Arch_checkupdates",
|
||||
display_format = "{updates} Updates",
|
||||
foreground = colors[2],
|
||||
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
|
||||
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
|
||||
background = colors[4]
|
||||
),
|
||||
widget.TextBox(
|
||||
@@ -495,7 +495,7 @@ def init_widgets_list():
|
||||
widget.Memory(
|
||||
foreground = colors[2],
|
||||
background = colors[5],
|
||||
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e htop')},
|
||||
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
|
||||
padding = 5
|
||||
),
|
||||
widget.TextBox(
|
||||
@@ -645,20 +645,13 @@ Defining what class of windows should always be floating.
|
||||
|
||||
#+BEGIN_SRC python
|
||||
floating_layout = layout.Floating(float_rules=[
|
||||
{'wmclass': 'confirm'},
|
||||
{'wmclass': 'dialog'},
|
||||
{'wmclass': 'download'},
|
||||
{'wmclass': 'error'},
|
||||
{'wmclass': 'file_progress'},
|
||||
{'wmclass': 'notification'},
|
||||
{'wmclass': 'splash'},
|
||||
{'wmclass': 'toolbar'},
|
||||
{'wmclass': 'confirmreset'}, # gitk
|
||||
{'wmclass': 'makebranch'}, # gitk
|
||||
{'wmclass': 'maketag'}, # gitk
|
||||
{'wname': 'branchdialog'}, # gitk
|
||||
{'wname': 'pinentry'}, # GPG key password entry
|
||||
{'wmclass': 'ssh-askpass'}, # ssh-askpass
|
||||
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||
# default_float_rules include: utility, notification, toolbar, splash, dialog,
|
||||
# file_progress, confirm, download and error.
|
||||
,*layout.Floating.default_float_rules,
|
||||
Match(wm_class='tasty.javafx.launcher.LauncherFxApp'), # tastyworks exit box
|
||||
Match(title='Confirmation'), # tastyworks exit box
|
||||
Match(title='pinentry'), # GPG key password entry
|
||||
])
|
||||
auto_fullscreen = True
|
||||
focus_on_window_activation = "smart"
|
||||
|
||||
@@ -4,7 +4,7 @@ import re
|
||||
import socket
|
||||
import subprocess
|
||||
from libqtile import qtile
|
||||
from libqtile.config import KeyChord, Key, Screen, Group, Drag, Click
|
||||
from libqtile.config import Click, Drag, Group, KeyChord, Key, Match, Screen
|
||||
from libqtile.command import lazy
|
||||
from libqtile import layout, bar, widget, hook
|
||||
from libqtile.lazy import lazy
|
||||
@@ -12,7 +12,6 @@ from typing import List # noqa: F401
|
||||
|
||||
mod = "mod4" # Sets mod key to SUPER/WINDOWS
|
||||
myTerm = "alacritty" # My terminal of choice
|
||||
myConfig = "/home/dt/.config/qtile/config.py" # The Qtile config file location
|
||||
|
||||
keys = [
|
||||
### The essentials
|
||||
@@ -239,7 +238,7 @@ def init_widgets_list():
|
||||
widget.Image(
|
||||
filename = "~/.config/qtile/icons/python-white.png",
|
||||
scale = "False",
|
||||
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn('dmenu_run')}
|
||||
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm)}
|
||||
),
|
||||
widget.Sep(
|
||||
linewidth = 0,
|
||||
@@ -504,20 +503,13 @@ bring_front_click = False
|
||||
cursor_warp = False
|
||||
|
||||
floating_layout = layout.Floating(float_rules=[
|
||||
{'wmclass': 'confirm'},
|
||||
{'wmclass': 'dialog'},
|
||||
{'wmclass': 'download'},
|
||||
{'wmclass': 'error'},
|
||||
{'wmclass': 'file_progress'},
|
||||
{'wmclass': 'notification'},
|
||||
{'wmclass': 'splash'},
|
||||
{'wmclass': 'toolbar'},
|
||||
{'wmclass': 'confirmreset'}, # gitk
|
||||
{'wmclass': 'makebranch'}, # gitk
|
||||
{'wmclass': 'maketag'}, # gitk
|
||||
{'wname': 'branchdialog'}, # gitk
|
||||
{'wname': 'pinentry'}, # GPG key password entry
|
||||
{'wmclass': 'ssh-askpass'}, # ssh-askpass
|
||||
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||
# default_float_rules include: utility, notification, toolbar, splash, dialog,
|
||||
# file_progress, confirm, download and error.
|
||||
*layout.Floating.default_float_rules,
|
||||
Match(wm_class='tasty.javafx.launcher.LauncherFxApp'), # tastyworks exit box
|
||||
Match(title='Confirmation'), # tastyworks exit box
|
||||
Match(title='pinentry'), # GPG key password entry
|
||||
])
|
||||
auto_fullscreen = True
|
||||
focus_on_window_activation = "smart"
|
||||
|
||||
Reference in New Issue
Block a user