qtile float centring and tweaks
This commit is contained in:
parent
79c9f90e53
commit
6cff59b7ef
16 changed files with 776 additions and 164 deletions
|
@ -1 +0,0 @@
|
|||
/nix/store/dn5wzc9a8hrpml66i6kz5f3q6dr3jjmk-source
|
|
@ -1 +0,0 @@
|
|||
/nix/store/p7iz0r8gs6ppkhj83zjmwyd21k8b7v3y-source
|
|
@ -1 +1 @@
|
|||
/nix/store/ipg70lcppm6g4xs075am8pgihccvg3sr-nix-shell-env
|
||||
/nix/store/vayk34n0cv7ixciw4jvwkhg1jj1433l2-nix-shell-env
|
File diff suppressed because one or more lines are too long
|
@ -14,6 +14,8 @@ from libqtile.backend import base
|
|||
from libqtile.lazy import lazy
|
||||
from libqtile.config import Key, Match, Screen, Click, Drag, Group, ScratchPad, DropDown
|
||||
|
||||
# from smartfloat import SmartFloat
|
||||
|
||||
# import qtile_extras.widget as extra_widgets
|
||||
|
||||
assert qtile is not None
|
||||
|
@ -37,7 +39,7 @@ class Apps:
|
|||
fm = "thunar"
|
||||
logout = "wlogout"
|
||||
noti = "swaync-client -t"
|
||||
ss = ["slurp |", "grim", "-g -", "-t png ~/screenshots/$(date +%F_%H-%m-%S).png"]
|
||||
ss = "slurp | grim -g - -t png /home/bolt/screenshots/$(date +%F_%H-%m-%S).png"
|
||||
screenrec = "kooha"
|
||||
passmgr = "keepassxc"
|
||||
music = "strawberry"
|
||||
|
@ -54,7 +56,6 @@ class OSD:
|
|||
brightup = "swayosd --brightness raise"
|
||||
brightdown = "swayosd --brightness lower"
|
||||
|
||||
|
||||
keys = [
|
||||
Key([mod], "return", lazy.spawn(Apps.term)),
|
||||
Key([mod], "d", lazy.spawn(Apps.launcher)),
|
||||
|
@ -62,7 +63,7 @@ keys = [
|
|||
Key([mod], "e", lazy.spawn(Apps.fm)),
|
||||
Key([mod, "shift"], "e", lazy.spawn(Apps.logout)),
|
||||
Key([mod], "n", lazy.spawn(Apps.noti)),
|
||||
Key([mod, "shift"], "s", lazy.spawn(Apps.ss)),
|
||||
Key([mod, "shift"], "s", lazy.spawn(Apps.ss, shell=True)),
|
||||
Key([mod, "control", "shift"], "s", lazy.spawn(Apps.screenrec)),
|
||||
Key([], "XF86AudioMute", lazy.spawn(OSD.mute)),
|
||||
Key([], "XF86AudioRaiseVolume", lazy.spawn(OSD.vol_up)),
|
||||
|
@ -74,6 +75,8 @@ keys = [
|
|||
Key([], "XF86MonBrightnessUp", lazy.spawn(OSD.brightup)),
|
||||
Key([], "XF86MonBrightnessDown", lazy.spawn(OSD.brightdown)),
|
||||
Key([mod, "shift"], "q", lazy.window.kill()),
|
||||
Key([mod], "c", lazy.window.center()),
|
||||
Key([mod], "s", lazy.layout.toggle_split()),
|
||||
Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
|
||||
Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
|
||||
Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
|
||||
|
@ -100,6 +103,7 @@ keys = [
|
|||
Key([mod], "Tab", lazy.next_layout()),
|
||||
]
|
||||
|
||||
|
||||
|
||||
groups = [Group(i) for i in "123456"]
|
||||
|
||||
|
@ -144,7 +148,8 @@ layout_theme = dict(
|
|||
|
||||
layouts = [
|
||||
layout.Bsp(fair=False, border_on_single=True, **layout_theme),
|
||||
layout.Floating(**layout_theme),
|
||||
layout.TreeTab(**layout_theme),
|
||||
# layout.SmartFloat(**layout_theme),
|
||||
]
|
||||
|
||||
widget_defaults = dict(
|
||||
|
@ -207,7 +212,23 @@ def float_firefox(client):
|
|||
def fullscreen_wlogout(client):
|
||||
if client.name == "wlogout":
|
||||
client.enable_fullscreen()
|
||||
|
||||
@hook.subscribe.focus_change
|
||||
def always_front():
|
||||
win = qtile.current_window
|
||||
if win is not None and win.floating:
|
||||
win.bring_to_front()
|
||||
|
||||
@hook.subscribe.float_change
|
||||
def centre_floated():
|
||||
win = qtile.current_window
|
||||
if win is not None and win.floating:
|
||||
win.bring_to_front()
|
||||
info = qtile.current_screen.info()
|
||||
width, height = ((info['width']//4)*3, (info['height']//6)*5)
|
||||
win.set_size_floating(width, height)
|
||||
win.center()
|
||||
|
||||
# @hook.subscribe.client_new
|
||||
# def round_and_transparent(client):
|
||||
# logger.warning(client)
|
||||
|
@ -216,3 +237,4 @@ def fullscreen_wlogout(client):
|
|||
# logger.warning(client.opacity)
|
||||
# client.rounding = 8
|
||||
# client.opacity = 0.85
|
||||
|
||||
|
|
12
home/dots/qtile/flake.lock
generated
12
home/dots/qtile/flake.lock
generated
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1695559356,
|
||||
"narHash": "sha256-kXZ1pUoImD9OEbPCwpTz4tHsNTr4CIyIfXb3ocuR8sI=",
|
||||
"lastModified": 1697583813,
|
||||
"narHash": "sha256-SRXK2EBMZHlOAs/5bjphhX9XnIKR6peTV6i7yoL6/Lg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "261abe8a44a7e8392598d038d2e01f7b33cf26d0",
|
||||
"rev": "b5f8ec6be261dfc44c3b56b220e2793d1b61512b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -18,11 +18,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1695318763,
|
||||
"narHash": "sha256-FHVPDRP2AfvsxAdc+AsgFJevMz5VBmnZglFUMlxBkcY=",
|
||||
"lastModified": 1697379843,
|
||||
"narHash": "sha256-RcnGuJgC2K/UpTy+d32piEoBXq2M+nVFzM3ah/ZdJzg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e12483116b3b51a185a33a272bf351e357ba9a99",
|
||||
"rev": "12bdeb01ff9e2d3917e6a44037ed7df6e6c3df9d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
black
|
||||
pydantic
|
||||
coconut
|
||||
stable.python3Packages.qtile-extras
|
||||
stable.python3Packages.qtile
|
||||
python3Packages.qtile-extras
|
||||
python3Packages.qtile
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue