qtile update

This commit is contained in:
The-Repo-Club 2023-08-03 21:10:12 +01:00
parent 5cf2abd92f
commit 2aeb5f5b30
No known key found for this signature in database
GPG Key ID: E30EC2FBFB05C44F
11 changed files with 370 additions and 210 deletions

View File

@ -0,0 +1,19 @@
output DP-1-0
off
output eDP-1
crtc 0
mode 1920x1080
pos 0x0
primary
rate 120.21
x-prop-broadcast_rgb Automatic
x-prop-colorspace Default
x-prop-max_bpc 12
x-prop-non_desktop 0
x-prop-scaling_mode Full aspect
output HDMI-1-0
crtc 3
mode 1920x1080
pos 1920x0
rate 60.00
x-prop-non_desktop 0

View File

@ -0,0 +1,2 @@
HDMI-1-0 00ffffffffffff004c2d330f334c5843101f0103804627782aaea5af4f42af260f5054bfef80714f810081c081809500a9c0b300010104740030f2705a80b0588a00b9882100001e000000fd00184b1e5a1e000a202020202020000000fc005533324a3539780a2020202020000000ff0048344c523430303937360a2020010c020326f04b5f10041f13031220225e5d23090707830100006d030c001000803c200060010203023a801871382d40582c4500b9882100001e023a80d072382d40102c4580b9882100001e04740030f2705a80b0588a00b9882100001e565e00a0a0a0295030203500b9882100001a0000000000000000000000000000000000fc
eDP-1 00ffffffffffff0006afedd100000000221d0104a52213780348358f575992291e505400000001010101010101010101010101010101546f809c70383e406c30aa0058c1100000180000000f0000000000000000000000000020000000fd003c788a8a1d010a202020202020000000fe004231353648414e31332e31200a00a9

View File

@ -0,0 +1,297 @@
# Theme file for CliFM
# Theme name: clifm (256 colors version)
# Author: L. Abramovich
# License: GPL3
### How do we define colors?
#
# FiletypeColors, InterfaceColors, and ExtColors use the same format used
# by the LS_COLORS environment variable. Thus, "di=01;34" means that (non-empty)
# directories will be printed in bold blue.
#
# Color codes are just traditional ANSI escape sequences less the escape char
# and the final 'm'.
# 4-bit (16 colors), 8-bit (256 colors), and 24-bit (RGB/HEX) colors are supported.
# Example:
# 31 4-bit
# 38;5;160 8-bit
# 38;2;255;0;0 24-bit (RGB)
# #ff0000 24-bit (HEX)
#
# A single attribute can be used for hex colors using a dash and an attribute
# number (RRGGBB-[1-9]), where 1-9 is:
#
# 1: Bold or increased intensity
# 2: Faint, decreased intensity or dim
# 3: Italic (Not widely supported)
# 4: Underline
# 5: Slow blink
# 6: Rapid blink
# 7: Reverse video or invert
# 8: Conceal or hide (Not widely supported)
# 9: Crossed-out or strike
#
# For example, to print bold red color, the hex code is #ff0000-1
### Use some variables to hold your color codes
#
# The 'define' keyword allows you to define up to 128 custom color variables.
# They can be used for:
# FiletypeColors
# InterfaceColors
# ExtColors
# DirIconColor
#
# For example;
#
# define M=1;36
# el=M
#
# Here we define 'M' as "00;01;36", and then we use this color for ELN's,
# whose code is 'el' (see below).
### Xterm-like color names are also supported. Example:
#
# el=DarkSeaGreen1
#
# Or, as a definition:
#
# define Green=DarkSeaGreen1
# el=Green
#
# Just as with hex colors, a single attribute can be appended to color names.
# For example, 'DarkSeaGreen1-1' to get the bold version of this color.
#
# For the complete list of color names consult the manpage.
define D=0 # Default terminal color
define BD=1 # Bold
define DIM=2 # Dimmed
define R4=31 # Red (4-bit)
define BR4=1;31 # Bold red (4-bit)
define DR4=2;31 # Dimmed red (4-bit)
define G=38;5;76 # Green
define G4=32 # Green (4-bit)
define BG4=1;32 # Bold green (4-bit)
define DG4=2;32 # Dimmed green (4-bit)
define Y=38;5;228 # Yellow
define BY=1;38;5;229 # Bold yellow
define LY=38;5;185 # Light yellow
define DY4=2;33 # Dimmed yellow (4-bit)
define BY4=1;33 # Bold yellow (4-bit)
define B4=34 # Blue (4-bit)
define BB4=1;34 # Bold blue (4-bit)
define DB4=2;34 # Dimmed blue (4-bit)
define M=38;5;170 # Magenta
define BM4=1;35 # Bold magenta (4-bit)
define DM4=2;35 # Dimmed magenta (4-bit)
define UM4=4;35 # Underlined magenta (4-bit)
define UDM4=4;2;35 # Underlined dimmed magenta (4-bit)
define C=38;5;43 # Cyan
define C4=36 # Cyan (4-bit)
define BC4=1;36 # Bold cyan (4-bit)
define DC4=2;36 # Dimmed cyan (4-bit)
define BDC4=1;2;36 # Bold dimmed cyan (4-bit)
define RC4=7;36 # Reverse cyan (4-bit)
define UDC4=4;2;36 # Underlined dimmed cyan (4-bit)
define O=38;5;214 # Orange
define BO=1;38;5;214 # Bold orange
define P=38;5;140 # Purple
define DW=38;5;246 # Dimmed white
define DW4=2;37 # Dimmed white (4-bit)
define UDW4=4;2;37 # Underlined dimmed white (4-bit)
# Foreground-background combinations
define URW=4;31;47 # Red foreground, white background
define WR=37;41 # White foreground, red background
# K stands for black (B is used for Blue)
define KY=30;43 # Black foreground, yellow background
define KR=30;41 # Black foreground, red background
define KG=30;42 # Black foreground, green background
define BlGr=34;42 # Blue foreground, green background
define WB=37;44 # white foreground, blue background
# File groups (used for file extensions)
define DOC=38;5;228 # Yellow
define VIDEO=1;35 # Bold magenta (4-bit)
define IMAGE=35 # Magenta (4-bit)
define SOUND=38;5;214 # Orange
define CODE=1;38;5;247 # Bold gray
define ARCHIVE=1;31 # Bold red (4-bit)
define BOOK=38;5;223 # Salmon
define MARKUP=38;5;85 # Aqua
define TEMP=38;5;247 # Dimmed white
### To know what are we applying colors to, we use the following codes:
## File types
# bd = Block device
# ca = File with capabilities
# cd = Char device
# ed = Empty directory
# ee = Empty executable file
# ex = Executable file
# ef = Empty regular file
# fi = Regular file
# di = Directory
# ln = Symbolic link
# mh = Multi-hardlink file
# nd = Directory with no read permission
# ne = Empty directory with no read permission
# nf = Regular file with no read permission
# no = Unknown
# oo = Door (Solaris only)
# or = Broken symlink
# ow = Other-writable
# pi = FIFO/pipe
# sg = SGID file
# so = Socket
# st = Sticky (not other-writable)
# su = SUID file
# tw = Sticky and other-writable
# uf = Non-'stat'able file
## Interface
# bm = Bookmarked directory
# fc = Files counter
# df = Default color
# dl = Dividing line
# el = ELN color
# lc = Symlink indicator (for ColorLinksAsTarget only)
# mi = Misc indicators
# ts = TAB completion suffix
# tt = Tilde for trimmed files
# wc = Welcome message
## Auto-suggestions
# sb = Shell builtins
# sc = External commands and aliases
# sd = Internal commands description
# sf = File names
# sh = History
# sx = Internal commands and parameters
# sp = BAEJ suggestions pointer
# sz = File names (fuzzy)
## Syntax highlighting
# hb = Brackets () [] {}
# hc = Comments
# hd = Paths (slashes)
# he = Expansion operators: * ~
# hn = Numbers
# hp = Parameters: -
# hq = Quoted strings
# hr = Redirection >
# hs = Process separators | & ; */
# hv = Variables $ */
# hw = Wrong, non-existent command name
## File properties
# dd = Date (1)
# dg = UID, GID
# dn = dash (none)
# do = Permissions in octal notation
# dp = Special files (SUID, SGID, etc)
# dr = Read
# dw = Write
# dxd = Execute (dirs)
# dxr = Execute (reg files)
# dz = Size (1)
# (1) If unset, gradient colors will be used (default)
## Workspaces
# wsN = Workspace number N
## Prompt notifications
# em = Errors
# li = Selected files indicator
# nm = Notices
# ti = Trash indicator
# tx = Command line text
# si = Stealth mode indicator
# wm = Warnings
# xs = Exit code: success
# xf = Exit code: failure
# NOTE: Whenever a code is unset, the default value is used
# FiletypeColors defines the color used for file names when listing files,
# just as InterfaceColors defines colors for CliFM's interface.
FiletypeColors="bd=BY:ca=KR:cd=BO:di=BB4:ed=DB4:ee=G4:ef=DIM:ex=BG4:fi=D:ln=BC4:mh=RC4:nd=BR4:nf=DR4:no=URW:or=UDC4:ow=BlGr:pi=M:sg=KY:so=BM4:st=WB:su=WR:tw=KG:uf=UDW4:"
InterfaceColors="bm=BG4:dd=:df=D:dg=P:dl=DW4:dn=:do=:dp=:dr=:dw=:dxd=:dxr=:dz=:el=C4:em=BR4:fc=DW:hb=C4:hc=DW4:hd=C4:he=C4:hn=:hp=C4:hq=LY:hr=R4:hs=G4:hv=G4:lc=C:li=BG4:mi=BC4:nm=BG4:si=BB4:sb=DY4:sc=DC4:sd=DW4:sf=UDC4:sh=DM4:sp=DR4:sx=DG4:sz=UDM4:ti=BC4:ts=UM4:tt=BDC4:tx=D:wc=BC4:wm=Y:ws1=B4:ws2=R4:ws3=Y:ws4=G4:ws5=C:ws6=O:ws7=M:ws8=DW:xf=BR4:xs=G4:"
# Colors for specific file extensions (case insensitive)
ExtColors="*.tar=ARCHIVE:*.tgz=ARCHIVE:*.arc=ARCHIVE:*.arj=ARCHIVE:*.taz=ARCHIVE:*.lha=ARCHIVE:*.lz4=ARCHIVE:*.lzh=ARCHIVE:*.lzma=ARCHIVE:*.tlz=ARCHIVE:*.txz=ARCHIVE:*.tzo=ARCHIVE:*.t7z=ARCHIVE:*.zip=ARCHIVE:*.z=ARCHIVE:*.dz=ARCHIVE:*.gz=ARCHIVE:*.lrz=ARCHIVE:*.lz=ARCHIVE:*.lzo=ARCHIVE:*.xz=ARCHIVE:*.zst=ARCHIVE:*.tzst=ARCHIVE:*.bz2=ARCHIVE:*.bz=ARCHIVE:*.tbz=ARCHIVE:*.tbz2=ARCHIVE:*.tz=ARCHIVE:*.deb=ARCHIVE:*.rpm=ARCHIVE:*.jar=ARCHIVE:*.war=ARCHIVE:*.ear=ARCHIVE:*.sar=ARCHIVE:*.rar=ARCHIVE:*.alz=ARCHIVE:*.ace=ARCHIVE:*.zoo=ARCHIVE:*.cpio=ARCHIVE:*.7z=ARCHIVE:*.rz=ARCHIVE:*.cab=ARCHIVE:*.wim=ARCHIVE:*.swm=ARCHIVE:*.dwm=ARCHIVE:*.esd=ARCHIVE:*.apk=ARCHIVE:*.iso=ARCHIVE:*.img=ARCHIVE:*.avif=IMAGE:*.jpg=IMAGE:*.jpeg=IMAGE:*.jxl=IMAGE:*.mjpg=IMAGE:*.mjpeg=IMAGE:*.gif=IMAGE:*.bmp=IMAGE:*.xbm=IMAGE:*.xpm=IMAGE:*.png=IMAGE:*.svg=IMAGE:*.svgz=IMAGE:*.pcx=IMAGE:*.pbm=IMAGE:*.pgm=IMAGE:*.ppm=IMAGE:*.tga=IMAGE:*.tif=IMAGE:*.tiff=IMAGE:*.mng=IMAGE:*.mov=VIDEO:*.mpg=VIDEO:*.mpeg=VIDEO:*.m2v=VIDEO:*.mkv=VIDEO:*.webm=VIDEO:*.webp=VIDEO:*.ogm=VIDEO:*.mp4=VIDEO:*.m4v=VIDEO:*.mp4v=VIDEO:*.vob=VIDEO:*.qt=VIDEO:*.nuv=VIDEO:*.wmv=VIDEO:*.asf=VIDEO:*.rm=VIDEO:*.rmvb=VIDEO:*.flc=VIDEO:*.avi=VIDEO:*.fli=VIDEO:*.flv=VIDEO:*.gl=VIDEO:*.dl=VIDEO:*.xcf=VIDEO:*.xwd=VIDEO:*.yuv=VIDEO:*.cgm=VIDEO:*.emf=VIDEO:*.ogv=VIDEO:*.ogx=VIDEO:*.aac=SOUND:*.au=SOUND:*.m4a=SOUND:*.mid=SOUND:*.midi=SOUND:*.mp3=SOUND:*.mka=SOUND:*.ogg=SOUND:*.opus=SOUND:*.spx=SOUND:*.wma=SOUND:*.wv=SOUND:*.wav=SOUND:*.flac=SOUND:*.aif=SOUND:*.pdf=BOOK:*.djvu=BOOK:*.epub=BOOK:*.mobi=BOOK:*.cbr=BOOK:*.cbz=BOOK:*.ps=DOC:*.sxw=DOC:*.doc=DOC:*.docx=DOC:*.xls=DOC:*.xlsx=DOC:*.xlr=DOC:*.sxi=DOC:*.ppt=DOC:*.pptx=DOC:*.odt=DOC:*.ods=DOC:*.odp=DOC:*.odg=DOC:*.rtf=DOC:*.c=CODE:*.c++=CODE:*.cc=CODE:*.cpp=CODE:*.h=CODE:*.h++=CODE:*.hh=CODE:*.go=CODE:*.java=CODE:*.js=CODE:*.lua=CODE:*.php=CODE:*.py=CODE:*.rb=CODE:*.rs=CODE:*.kt=CODE:*.kts=CODE:*.hs=CODE:*.pl=CODE:*.vb=CODE:*.html=MARKUP:*.htm=MARKUP:*.shtml=MARKUP:*.xhtml=MARKUP:*.xml=MARKUP:*.rss=MARKUP:*.css=MARKUP:*.tex=MARKUP:*.ltx=MARKUP:*.md=MARKUP:*.opf=MARKUP:*.cache=TEMP:*.tmp=TEMP:*.temp=TEMP:*.log=TEMP:*.bak=TEMP:*.bk=TEMP:*.in=TEMP:*.out=TEMP:*.part=TEMP:*.aux=TEMP:*.old=TEMP:*.orig=TEMP:*.rej=TEMP:*.swp=TEMP:*.pid=TEMP:"
# The series of color shades used to print timestamps
# The format is: "COLOR-TYPE,ERROR,SHADE1,SHADE2,SHADE3,SHADE4,SHADE5"
#
# COLOR-TYPE is one of: 1 (4-bit: 8 colors), 2 (8-bit: 256 colors), 3 (24-bit: truecolor)
# ERROR is the color used to print bad values
# SHADEn is the color used for the shade N
#
# For 4-bit colors (1), valid colors are in the range 30-37
# For 8-bit colors (2), valid colors are in the range 0-255
# For 24-bit colors (3), valid colors have this format: #RRGGBB
#
# An attribute (0-9) can be added to any color (either ERROR or SHADE) using a dash.
# For example:
# "34-1" -> "bold blue" (4-bit colors notation)
# "226-2" -> "dimmed yellow" (8-bit colors notation)
# "#ffaff00-4" -> "underlined orange" (24-bit colors notation)
#DateShades="1,31-2,36-1,36,36-2"
DateShades="2,197-2,231,253,250,247,244"
#DateShades="3,#ff005f-2,#ffffff,#dadada,#bcbcbc,#9e9e9e,#808080"
#NOTE: For DateShades to work, the 'dd' color code (solid color for dates) needs to be unset (default)
# Same as DateShades, but for file sizes
#SizeShades="1,31-2,32,33,31"
SizeShades="2,197-2,79,77,228,215,203"
#SizeShades="3,#ff005f-2,#5fd7af,#5fd75f,#ffff87,#ffaf5f,#ff5f5f"
#NOTE: For SizeShades to work, the 'dz' color code (solid color for sizes) needs to be unset (default)
# If icons are enabled, use this color for directories icon (only for icons-in-terminal and Nerd-fonts)
DirIconColor="Y"
# The prompt used by CliFM. Use the 'prompt' command to check for available
# prompts. Enter 'prompt --help' for more information
# You can use here either prompt codes (see the prompts.clifm file for details)
# or a prompt name defined in the prompts file
Prompt="clifm"
# Override prompt values (as defined in the prompts file)
#Prompt=""
#Notifications=
#EnableWarningPrompt=
#WarningPrompt=""
# The string used to construct the line dividing the list of files and
# the prompt (Unicode is supported). Possible values:
# "0": Print just an empty line
# "C": C is a single char. This char is printed up to the end of the screen
# "CCC": 3 or more chars. Only these chars (no more) will be printed
# "": Print a special line drawn with box-drawing characters (not
# supported by all terminals/consoles)
# The color of this line is controlled by the 'dl' code in InterfaceColors
DividingLine="-"
# If the fzf TAB completion mode is enabled, pass these options to fzf(1):
FzfTabOptions="--color='16,prompt:6,fg+:-1,pointer:4,hl:2,hl+:2,gutter:-1,marker:2,border:7:dim' --marker='*' --bind tab:accept,right:accept,left:abort,alt-p:toggle-preview,change:top,alt-up:preview-page-up,alt-down:preview-page-down --inline-info --layout=reverse-list --preview-window=wrap,border-left"
# Same options, but colorless
#FzfTabOptions="--color='bw' --marker='*' --bind tab:accept,right:accept,left:abort,alt-p:toggle-preview,change:top,alt-up:preview-page-up,alt-down:preview-page-down --inline-info --layout=reverse-list --preview-window=wrap,border-left"
# For more information consult fzf(1)

Binary file not shown.

View File

@ -76,33 +76,33 @@ SHIFT = 'shift'
keys = [ keys = [
# qtile commands # qtile commands
Key([MOD, SHIFT], "r", lazy.reload_config(), desc="Reload the config", group="Qtile"), Key([MOD, SHIFT], "r", lazy.reload_config(), desc="Reload the config"),
Key([MOD, CTRL], "r", lazy.restart(), desc="Restart qtile", group="Qtile"), Key([MOD, CTRL], "r", lazy.restart(), desc="Restart qtile"),
# Switch between windows # Switch between windows
Key([MOD], "h", lazy.layout.left(), desc="Move focus to left", group="Moving"), Key([MOD], "h", lazy.layout.left(), desc="Move focus to left"),
Key([MOD], "l", lazy.layout.right(), desc="Move focus to right", group="Moving"), Key([MOD], "l", lazy.layout.right(), desc="Move focus to right"),
Key([MOD], "j", lazy.layout.down(), desc="Move focus down", group="Moving"), Key([MOD], "j", lazy.layout.down(), desc="Move focus down"),
Key([MOD], "k", lazy.layout.up(), desc="Move focus up", group="Moving"), Key([MOD], "k", lazy.layout.up(), desc="Move focus up"),
# reset all windows # reset all windows
Key([MOD], "n", lazy.layout.normalize(), desc="Reset all window sizes", group="Reset"), Key([MOD], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
# Toggle between different layouts as defined below # Toggle between different layouts as defined below
Key([MOD], "Tab", lazy.next_layout(), desc="Toggle between layouts", group="Toggle"), Key([MOD], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
Key([MOD], "t", lazy.window.toggle_floating(), desc='Toggle floating', group="Toggle"), Key([MOD], "t", lazy.window.toggle_floating(), desc='Toggle floating'),
Key([MOD], "q", lazy.window.kill(), desc="Kill focused window", group="Kill"), Key([MOD], "q", lazy.window.kill(), desc="Kill focused window"),
Key([MOD, SHIFT], "q", lazy.spawn(Commands.killmenu), desc="Launch kill menu", group="Kill"), Key([MOD, SHIFT], "q", lazy.spawn(Commands.killmenu), desc="Launch kill menu"),
# Custom keybinds # Custom keybinds
Key([MOD], "Return", lazy.spawn(Commands.terminal), desc="Launch terminal", group="Launch"), Key([MOD], "Return", lazy.spawn(Commands.terminal), desc="Launch terminal"),
Key([MOD], "m", lazy.spawn(Commands.menu), desc="Launch menu", group="Launch"), Key([MOD], "m", lazy.spawn(Commands.menu), desc="Launch menu"),
Key([MOD], "p", lazy.spawn(Commands.passmenu), desc="Launch password menu", group="Launch"), Key([MOD], "p", lazy.spawn(Commands.passmenu), desc="Launch password menu"),
Key([MOD, CTRL], "f", lazy.spawn(Commands.browser), desc="Launch browser", group="Launch"), Key([MOD, CTRL], "f", lazy.spawn(Commands.browser), desc="Launch browser"),
Key([MOD, CTRL], "c", lazy.spawn(Commands.editor), desc="Launch editor", group="Launch"), Key([MOD, CTRL], "c", lazy.spawn(Commands.editor), desc="Launch editor"),
Key([MOD, SHIFT], "e", lazy.spawn(Commands.powermenu), desc="Launch power menu", group="Launch"), Key([MOD, SHIFT], "e", lazy.spawn(Commands.powermenu), desc="Launch power menu"),
Key([MOD, SHIFT], "Return", lazy.spawn(Commands.files), desc="Launch files", group="Launch"), Key([MOD, SHIFT], "Return", lazy.spawn(Commands.files), desc="Launch files"),
Key([MOD], "b", lazy.spawn(Commands.btop), desc="Launch btop", group="Utils"), Key([MOD], "b", lazy.spawn(Commands.btop), desc="Launch btop"),
# Audio Settings # Audio Settings
Key([], "XF86AudioMute", lazy.spawn("amixer -D pulse set Master toggle")), Key([], "XF86AudioMute", lazy.spawn("amixer -D pulse set Master toggle")),
@ -123,81 +123,6 @@ keys = [
dgroups_key_binder = simple_key_binder(MOD) dgroups_key_binder = simple_key_binder(MOD)
dgroups_app_rules = [] # type: list dgroups_app_rules = [] # type: list
def show_keys(keys):
"""
print current keybindings in a pretty way for a rofi/dmenu window.
"""
key_help = "{:<20} {:<30} {}\n".format('Group', 'Keybinds', 'Description')
keys_ignored = (
"XF86AudioMute", #
"XF86AudioLowerVolume", #
"XF86AudioRaiseVolume", #
"XF86AudioPlay", #
"XF86AudioNext", #
"XF86AudioPrev", #
"XF86AudioStop",
"XF86MonBrightnessUp",
"XF86MonBrightnessDown",
)
text_replaced = {
"mod4": "[MOD]", #
"control": "[CTRL]", #
"mod1": "[ALT]", #
"shift": "[SHIFT]", #
"Escape": "ESC", #
}
data = {}
category={}
file_path = expanduser("~/.config/qtile/keybinds.json")
for k in keys:
if k.key in keys_ignored:
continue
mods = ""
key = ""
desc = k.desc.title()
group = k.group.title()
allargs = ", ".join([value.__name__ if callable(value) else repr(value) for value in k.commands[0].args] +
["%s = %s" % (keyword, repr(value)) for keyword, value in k.commands[0].kwargs.items()])
command = k.commands[0].name + " " + allargs
for m in k.modifiers:
if m in text_replaced.keys():
mods += text_replaced[m] + " + "
else:
mods += m.capitalize() + " + "
if len(k.key) > 1:
if k.key in text_replaced.keys():
key = text_replaced[k.key]
else:
key = k.key.title()
else:
key = k.key
key_line = "{:<20} {:<30} {}\n".format(group, mods + key, desc)
key_help += key_line
if group not in data:
data[group] = {}
category = data[group]
category[desc] = {}
category[desc]['keybind'] = mods + key
category[desc]['command'] = command
with open(file_path, "w") as json_data:
json.dump(data, json_data, indent=4)
return expanduser("~/.config/qtile/scripts/qtile-cheat")
# this must be done AFTER all the keys have been defined
cheater = show_keys(keys)
keys.extend([
Key([MOD], "F1", lazy.spawn(cheater), desc="Print keyboard bindings"),
])
keys.extend([ keys.extend([
################ ################
## Key Chords ## ## Key Chords ##
@ -215,9 +140,7 @@ keys.extend([
Key([], "k", lazy.layout.grow_up(), desc="Grow window up"), Key([], "k", lazy.layout.grow_up(), desc="Grow window up"),
], ],
mode=True, mode=True,
name="Resize Windows", name="Resize Windows"
desc="Resize Windows",
group="KeyChord",
), ),
KeyChord( KeyChord(
[MOD, CTRL], [MOD, CTRL],
@ -227,9 +150,7 @@ keys.extend([
Key([], "m", lazy.spawn('prime-run minecraft'), desc="Spawn minecraft"), Key([], "m", lazy.spawn('prime-run minecraft'), desc="Spawn minecraft"),
], ],
mode=False, mode=False,
name="Launch Game", name="Launch Game"
desc="Launch Game",
group="KeyChord",
), ),
KeyChord( KeyChord(
[MOD], [MOD],
@ -240,9 +161,7 @@ keys.extend([
Key([], "f", lazy.spawn('win-shot -f'), desc="Screen Shot Full"), Key([], "f", lazy.spawn('win-shot -f'), desc="Screen Shot Full"),
], ],
mode=False, mode=False,
name="Take a Screenshot", name="Take a Screenshot"
desc="Take a Screenshot",
group="KeyChord",
), ),
]) ])
@ -256,17 +175,16 @@ groups = Groups.groups
groups.append( groups.append(
ScratchPad("scratchpad", [ ScratchPad("scratchpad", [
DropDown("term", "kitty --class=scratch", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1), DropDown("term", "kitty --class=scratch", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1),
DropDown("cheat", cheater, width=0.4, height=0.7, x=0.3, y=0.2, opacity=0.9),
DropDown("clifm", "kitty --class=clifm -e clifm", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.9), DropDown("clifm", "kitty --class=clifm -e clifm", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.9),
DropDown("btop", "kitty --class=btop -e btop", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.9), DropDown("btop", "kitty --class=btop -e btop", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.9),
DropDown("volume", "pavucontrol", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.9), DropDown("volume", "pavucontrol", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.9),
])) ])
)
# Scratchpad keybindings # Scratchpad keybindings
keys.extend([ keys.extend([
Key([CTRL], "Return", lazy.group['scratchpad'].dropdown_toggle('term')), Key([CTRL], "Return", lazy.group['scratchpad'].dropdown_toggle('term')),
Key([ALT], "c", lazy.group['scratchpad'].dropdown_toggle('clifm')), Key([ALT], "c", lazy.group['scratchpad'].dropdown_toggle('clifm')),
Key([ALT], "F1", lazy.group['scratchpad'].dropdown_toggle('cheat')),
Key([ALT], "b", lazy.group['scratchpad'].dropdown_toggle('btop')), Key([ALT], "b", lazy.group['scratchpad'].dropdown_toggle('btop')),
Key([ALT], "v", lazy.group['scratchpad'].dropdown_toggle('volume')), Key([ALT], "v", lazy.group['scratchpad'].dropdown_toggle('volume')),
]) ])
@ -312,8 +230,6 @@ floating_layout = layout.Floating(
float_rules=[ float_rules=[
# Run the utility of `xprop` to see the wm class and name of an X client. # Run the utility of `xprop` to see the wm class and name of an X client.
*layout.Floating.default_float_rules, *layout.Floating.default_float_rules,
Match(wm_class=re.compile('^Cheater.*', re.IGNORECASE)), # Cheater
Match(wm_class=re.compile('^PassMenu.*|^PowerMenu.*', re.IGNORECASE)), # Menus
Match(wm_class="confirmreset"), # gitk Match(wm_class="confirmreset"), # gitk
Match(wm_class="makebranch"), # gitk Match(wm_class="makebranch"), # gitk
Match(wm_class="maketag"), # gitk Match(wm_class="maketag"), # gitk

View File

@ -1,4 +1,5 @@
import re import re
from libqtile import hook, qtile
from libqtile.config import Group, Match from libqtile.config import Group, Match
@ -8,8 +9,8 @@ class Groups(object):
Group( Group(
label='', label='',
init=True, init=True,
exclusive=False,
persist=True, persist=True,
exclusive=False,
matches=[Match(wm_class=re.compile('^Alacritty.*|^Kitty.*', re.IGNORECASE))], matches=[Match(wm_class=re.compile('^Alacritty.*|^Kitty.*', re.IGNORECASE))],
layout='monadthreecol', layout='monadthreecol',
position=1, position=1,
@ -19,8 +20,8 @@ class Groups(object):
Group( Group(
label='', label='',
init=True, init=True,
exclusive=False,
persist=True, persist=True,
exclusive=False,
matches=[Match(wm_class=re.compile('^Code.*|^Jetbrains.*', re.IGNORECASE))], matches=[Match(wm_class=re.compile('^Code.*|^Jetbrains.*', re.IGNORECASE))],
position=2, position=2,
screen_affinity=1, screen_affinity=1,
@ -29,8 +30,8 @@ class Groups(object):
Group( Group(
label='', label='',
init=True, init=True,
exclusive=False,
persist=True, persist=True,
exclusive=False,
matches=[Match(wm_class=re.compile('^Nemo.*', re.IGNORECASE))], matches=[Match(wm_class=re.compile('^Nemo.*', re.IGNORECASE))],
position=3, position=3,
screen_affinity=1, screen_affinity=1,
@ -39,8 +40,8 @@ class Groups(object):
Group( Group(
label='', label='',
init=True, init=True,
exclusive=False,
persist=True, persist=True,
exclusive=False,
matches=[Match(wm_class=re.compile('^Aseprite.*|^Krita.*', re.IGNORECASE))], matches=[Match(wm_class=re.compile('^Aseprite.*|^Krita.*', re.IGNORECASE))],
position=4, position=4,
screen_affinity=1, screen_affinity=1,
@ -49,8 +50,8 @@ class Groups(object):
Group( Group(
label='', label='',
init=True, init=True,
exclusive=False,
persist=True, persist=True,
exclusive=False,
matches=[Match(wm_class=re.compile('^CmusImage.*', re.IGNORECASE))], matches=[Match(wm_class=re.compile('^CmusImage.*', re.IGNORECASE))],
position=5, position=5,
screen_affinity=1, screen_affinity=1,
@ -107,3 +108,20 @@ class Groups(object):
name='0', name='0',
), ),
] ]
# Store the screen_affinity for each group in a dictionary
group_screen_affinities = {group.name: group.screen_affinity for group in Groups.groups}
@hook.subscribe.client_focus
def enforce_screen_affinity(window):
group_name = window.group.name
# If the group has a specified screen_affinity, enforce it
if group_name in group_screen_affinities:
desired_screen = group_screen_affinities[group_name]
current_screen = qtile.screens.index(qtile.current_screen)
# If the window is focused on a different screen than the desired screen,
# move the window back to the desired screen
if current_screen != desired_screen:
window.togroup(group_name)

View File

@ -1,92 +0,0 @@
{
"Qtile": {
"Reload The Config": {
"keybind": "[MOD] + [SHIFT] + r",
"command": "reload_config "
},
"Restart Qtile": {
"keybind": "[MOD] + [CTRL] + r",
"command": "restart "
}
},
"Moving": {
"Move Focus To Left": {
"keybind": "[MOD] + h",
"command": "left "
},
"Move Focus To Right": {
"keybind": "[MOD] + l",
"command": "right "
},
"Move Focus Down": {
"keybind": "[MOD] + j",
"command": "down "
},
"Move Focus Up": {
"keybind": "[MOD] + k",
"command": "up "
}
},
"Reset": {
"Reset All Window Sizes": {
"keybind": "[MOD] + n",
"command": "normalize "
}
},
"Toggle": {
"Toggle Between Layouts": {
"keybind": "[MOD] + Tab",
"command": "next_layout "
},
"Toggle Floating": {
"keybind": "[MOD] + t",
"command": "toggle_floating "
}
},
"Kill": {
"Kill Focused Window": {
"keybind": "[MOD] + q",
"command": "kill "
},
"Launch Kill Menu": {
"keybind": "[MOD] + [SHIFT] + q",
"command": "spawn 'repomenue_kill'"
}
},
"Launch": {
"Launch Terminal": {
"keybind": "[MOD] + Return",
"command": "spawn 'alacritty'"
},
"Launch Menu": {
"keybind": "[MOD] + m",
"command": "spawn 'repomenu_run -i -l 10 -w 600 -c -p \"Launcher\" -q \"Launch a app\"'"
},
"Launch Password Menu": {
"keybind": "[MOD] + p",
"command": "spawn 'kitty --class=passmenu -o initial_window_height=650 -e fzf_pass'"
},
"Launch Browser": {
"keybind": "[MOD] + [CTRL] + f",
"command": "spawn 'firefox'"
},
"Launch Editor": {
"keybind": "[MOD] + [CTRL] + c",
"command": "spawn 'code'"
},
"Launch Power Menu": {
"keybind": "[MOD] + [SHIFT] + e",
"command": "spawn 'kitty --class=powermenu -o initial_window_height=220 -e fzf_powermenu'"
},
"Launch Files": {
"keybind": "[MOD] + [SHIFT] + Return",
"command": "spawn 'nemo'"
}
},
"Utils": {
"Launch Btop": {
"keybind": "[MOD] + b",
"command": "spawn 'kitty --class=btop -e btop'"
}
}
}

View File

@ -9,5 +9,5 @@ if pgrep -x "picom" > /dev/null
then then
killall picom killall picom
else else
picom -CGb --experimental-backend --config ~/.config/i3/picom.conf picom -CGb --config ~/.config/picom/picom.conf
fi fi

View File

@ -20,14 +20,14 @@ class Widgets(object):
fmt='{}', fmt='{}',
filename=expanduser('~/.config/qtile/art/Archlinux-icon.svg'), filename=expanduser('~/.config/qtile/art/Archlinux-icon.svg'),
margin=3, margin=3,
mouse_callbacks={'Button1': lazy.spawn('repomenu_desktop --repomenu="repomenu -h 50 -i -l 15 -w 500 -y 32 -x 5 -p Launcher -q Search..."')}, mouse_callbacks={'Button1': lazy.spawn('menu')},
) )
power1 = widget.LaunchBar( power1 = widget.LaunchBar(
text_only=True, text_only=True,
foreground=colorScheme[1], foreground=colorScheme[1],
progs=[ progs=[
('', 'kitty --class=powermenu -o initial_window_height=220 -e fzf_powermenu', 'launch fzf powermenu'), ('', 'rofi -show powermenu -config ~/.config/rofi/powermenu.rasi'),
], ],
) )
@ -35,7 +35,7 @@ class Widgets(object):
text_only=True, text_only=True,
foreground=colorScheme[1], foreground=colorScheme[1],
progs=[ progs=[
('', 'kitty --class=powermenu -o initial_window_height=220 -e fzf_powermenu', 'launch fzf powermenu'), ('', 'rofi -show powermenu -config ~/.config/rofi/powermenu.rasi'),
], ],
) )
@ -266,4 +266,4 @@ class Widgets(object):
], ],
text_closed='[Github <]', text_closed='[Github <]',
text_open='[Github >]', text_open='[Github >]',
) )