idk i dont even remember

This commit is contained in:
atagen 2023-12-02 12:00:59 +11:00
parent 6cff59b7ef
commit bbfc3acc32
13 changed files with 262 additions and 732 deletions

View file

@ -39,7 +39,7 @@ class Apps:
fm = "thunar"
logout = "wlogout"
noti = "swaync-client -t"
ss = "slurp | grim -g - -t png /home/bolt/screenshots/$(date +%F_%H-%m-%S).png"
ss = "slurp | grim -g - -t png /home/$(whoami)/screenshots/$(date +%F_%H-%m-%S).png"
screenrec = "kooha"
passmgr = "keepassxc"
music = "strawberry"
@ -56,6 +56,7 @@ 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)),
@ -103,7 +104,6 @@ keys = [
Key([mod], "Tab", lazy.next_layout()),
]
groups = [Group(i) for i in "123456"]
@ -127,17 +127,45 @@ for i in groups:
]
)
groups.append(ScratchPad("scratch", [
DropDown("term", Apps.term, width=2.0/3.0, height=2.0/3.0, x=0.5/3.0, y=0.5/3.0),
DropDown("pass", Apps.passmgr, width=1.0/2.0, height=2.0/3.0, x=0.5/2.0, y=0.5/3.0),
DropDown("music", Apps.music, width=2.0/3.0, height=2.0/3.0, x=0.5/3.0, y=0.5/3.0),
]))
groups.append(
ScratchPad(
"scratch",
[
DropDown(
"term",
Apps.term,
width=2.0 / 3.0,
height=2.0 / 3.0,
x=0.5 / 3.0,
y=0.5 / 3.0,
),
DropDown(
"pass",
Apps.passmgr,
width=1.0 / 2.0,
height=2.0 / 3.0,
x=0.5 / 2.0,
y=0.5 / 3.0,
),
DropDown(
"music",
Apps.music,
width=2.0 / 3.0,
height=2.0 / 3.0,
x=0.5 / 3.0,
y=0.5 / 3.0,
),
],
)
)
keys.extend([
Key([mod], 'grave', lazy.group['scratch'].dropdown_toggle('term')),
Key([mod], 'minus', lazy.group['scratch'].dropdown_toggle('pass')),
Key([mod], 'equal', lazy.group['scratch'].dropdown_toggle('music')),
])
keys.extend(
[
Key([mod], "grave", lazy.group["scratch"].dropdown_toggle("term")),
Key([mod], "minus", lazy.group["scratch"].dropdown_toggle("pass")),
Key([mod], "equal", lazy.group["scratch"].dropdown_toggle("music")),
]
)
layout_theme = dict(
margin=#GAPS,
@ -160,13 +188,20 @@ widget_defaults = dict(
)
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()),
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()
),
]
screens = [
Screen(
top = bar.Bar(
top=bar.Bar(
[
widget.GroupBox(**widget_defaults),
widget.WindowTabs(**widget_defaults),
@ -190,9 +225,12 @@ focus_on_window_activation = "smart"
auto_fullscreen = True
floats_kept_above = True
floating_layout = layout.Floating(float_rules=[
*layout.Floating.default_float_rules,
], **layout_theme)
floating_layout = layout.Floating(
float_rules=[
*layout.Floating.default_float_rules,
],
**layout_theme,
)
@hook.subscribe.startup
@ -200,7 +238,8 @@ def autostart():
home = os.path.expanduser("~/.config/qtile/autostart.sh")
subprocess.Popen([home])
# force float and fullscreen on various windows
# window management hooks
@hook.subscribe.client_new
def float_firefox(client):
@ -208,27 +247,37 @@ def float_firefox(client):
if wm_class and "firefox" in wm_class and client.name == "Library":
client.enable_floating()
@hook.subscribe.client_new
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:
if (
win is not None
and win.floating
and not win.maximized
and not win.wants_to_fullscreen
and not win.fullscreen
):
win.bring_to_front()
info = qtile.current_screen.info()
width, height = ((info['width']//4)*3, (info['height']//6)*5)
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)
@ -237,4 +286,3 @@ def centre_floated():
# logger.warning(client.opacity)
# client.rounding = 8
# client.opacity = 0.85

View file

@ -29,10 +29,9 @@ in {
thunderbird
strawberry
inkscape
xfce.thunar
xfce.thunar-archive-plugin
xfce.thunar-volman
xfce.thunar-media-tags-plugin
(xfce.thunar.override {thunarPlugins = [xfce.thunar-archive-plugin xfce.thunar-volman xfce.thunar-media-tags-plugin];})
peazip
imv
zathura
@ -85,7 +84,7 @@ in {
enable = true;
};
services.udiskie.enable = true;
services.udiskie.enable = false; # TODO change once upstream python package is fixed in nixpkgs
programs.vscode = {
enable = true;
@ -101,8 +100,14 @@ in {
mutableExtensionsDir = true;
userSettings = {
"window.titleBarStyle" = "custom";
"editor.fontFamily" = "'${pkgs.rice.fonts.monospace.name}'";
"editor.fontFamily" = "${pkgs.rice.fonts.monospace.name}";
"editor.fontSize" = 12;
"workbench.colorTheme" = "KanagawaTheme";
"rust-analyzer.check.overrideCommand" = "clippy";
"rust-analyzer.debug.engine" = "vadimcn.vscode-lldb";
"rust-analyzer.inlayHints.chainingHints.enable" = false;
"rust-analyzer.inlayHints.parameterHints.enable" = false;
"rust-analyzer.inlayHints.typeHints.enable" = false;
};
};