Compare commits

...

2 Commits

Author SHA1 Message Date
Thomas Avé d25b8958af Extra modifiers 2026-03-26 18:39:08 +07:00
Thomas Avé cf85fc5283 Sort windows by position 2026-03-26 18:39:02 +07:00
2 changed files with 48 additions and 6 deletions

View File

@ -278,7 +278,9 @@ function Workspaces({ connector }: { connector: string }): JSX.Element {
<box class="workspaces"> <box class="workspaces">
{/* Generate a derived binding by passing a transformation function into the `workspaces` state */} {/* Generate a derived binding by passing a transformation function into the `workspaces` state */}
<For each={workspaces((wss: any[]) => <For each={workspaces((wss: any[]) =>
wss.filter((ws) => ws.output === connector).sort((a, b) => a.idx - b.idx) wss.filter((ws) => ws.output === connector)
.filter((ws) => ws.is_active || windows().some((w: any) => w.workspace_id === ws.id))
.sort((a, b) => a.idx - b.idx)
)}> )}>
{(ws: any) => ( {(ws: any) => (
<button <button
@ -311,6 +313,11 @@ function Clients({ connector }: { connector: string }): JSX.Element {
<For each={windows((wins: any[]) => <For each={windows((wins: any[]) =>
wins.filter((w: any) => !w.title?.includes("rofi")) wins.filter((w: any) => !w.title?.includes("rofi"))
.filter((w: any) => w.workspace_id === active_ws_for_monitor) .filter((w: any) => w.workspace_id === active_ws_for_monitor)
.sort((a: any, b: any) => {
const posA = a.layout?.pos_in_scrolling_layout?.[0] ?? 0;
const posB = b.layout?.pos_in_scrolling_layout?.[0] ?? 0;
return posA - posB;
})
)}> )}>
{(win: any) => ( {(win: any) => (
<box class={win.is_focused ? "focused" : "unfocused"}> <box class={win.is_focused ? "focused" : "unfocused"}>

View File

@ -1,6 +1,9 @@
{pkgs, ...}: let {pkgs, ...}: let
terminal = "${pkgs.foot}/bin/footclient"; terminal = "${pkgs.foot}/bin/footclient";
nautilus = "${pkgs.nautilus}/bin/nautilus"; nautilus = "${pkgs.nautilus}/bin/nautilus";
playerctl = "${pkgs.playerctl}/bin/playerctl";
wpctl = "${pkgs.wireplumber}/bin/wpctl";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
in { in {
# Since native Home Manager doesn't have a programs.niri module yet, # Since native Home Manager doesn't have a programs.niri module yet,
# we generate the KDL configuration file directly. # we generate the KDL configuration file directly.
@ -54,6 +57,13 @@ in {
spawn-at-startup "${pkgs.mate-polkit}/bin/polkit-mate" spawn-at-startup "${pkgs.mate-polkit}/bin/polkit-mate"
prefer-no-csd prefer-no-csd
gestures {
hot-corners {
off
}
}
layout { layout {
gaps 5 gaps 5
border { border {
@ -89,21 +99,22 @@ in {
Mod+A { spawn "${nautilus}"; } Mod+A { spawn "${nautilus}"; }
Mod+B { spawn "Helium"; } Mod+B { spawn "Helium"; }
Mod+M { maximize-column; } Mod+M { maximize-column; }
Mod+F { fullscreen-window; } Mod+Shift+F { toggle-windowed-fullscreen; }
Mod+Tab { toggle-overview; }
// Vicinae Binds // Vicinae Binds
Mod+C { spawn "vicinae" "vicinae://extensions/vicinae/clipboard/history"; } Mod+C { spawn "vicinae" "vicinae://extensions/vicinae/clipboard/history"; }
Mod+N { spawn "vicinae" "vicinae://extensions/vicinae/wm/switch-windows"; } Mod+N { spawn "vicinae" "vicinae://extensions/vicinae/wm/switch-windows"; }
Mod+Escape { spawn "vicinae" "open" "-q" "Power Management "; } Mod+Escape { spawn "vicinae" "open" "-q" "Power Management "; }
// Main Vicinae Toggle
Mod+Space { spawn "vicinae" "toggle"; } Mod+Space { spawn "vicinae" "toggle"; }
Mod+Comma { consume-or-expel-window-left; } Mod+Comma { consume-or-expel-window-left; }
Mod+Period { consume-or-expel-window-right; } Mod+Period { consume-or-expel-window-right; }
Mod+Shift+Minus { set-window-height "-10%"; } Mod+Alt+H { set-column-width "-5%"; }
Mod+Shift+Equal { set-window-height "+10%"; } Mod+Alt+L { set-column-width "+5%"; }
Mod+Alt+K { set-window-height "-5%"; }
Mod+Alt+J { set-window-height "+5%"; }
// Movement // Movement
Mod+H { focus-column-left; } Mod+H { focus-column-left; }
@ -117,6 +128,11 @@ in {
Mod+Shift+K { move-window-up; } Mod+Shift+K { move-window-up; }
// Workspaces // Workspaces
// Mod+Shift+T { move-column-to-workspace-empty; }
// Mod+T { focus-workspace-empty; }
Mod+I { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+1 { focus-workspace 1; } Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; } Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; } Mod+3 { focus-workspace 3; }
@ -137,6 +153,25 @@ in {
Mod+Shift+7 { move-column-to-workspace 7; } Mod+Shift+7 { move-column-to-workspace 7; }
Mod+Shift+8 { move-column-to-workspace 8; } Mod+Shift+8 { move-column-to-workspace 8; }
Mod+Shift+9 { move-column-to-workspace 9; } Mod+Shift+9 { move-column-to-workspace 9; }
Mod+Mod+Sys_Req { screenshot; }
Ctrl+Alt+L {spawn "${pkgs.hyprlock}/bin/hyprlock"; }
XF86MonBrightnessUp { spawn "${brightnessctl}" "set" "+10%"; }
XF86MonBrightnessDown { spawn "${brightnessctl}" "set" "10%-"; }
// Volume
XF86AudioRaiseVolume { spawn "${wpctl}" "set-volume" "@DEFAULT_AUDIO_SINK@" "10%+" "--limit" "1.0"; }
XF86AudioLowerVolume { spawn "${wpctl}" "set-volume" "@DEFAULT_AUDIO_SINK@" "10%-"; }
XF86AudioMute { spawn "${wpctl}" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioMicMute { spawn "${wpctl}" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
// Media
XF86AudioNext { spawn "${playerctl}" "next"; }
XF86AudioPrev { spawn "${playerctl}" "previous"; }
Mod+XF86AudioMute { spawn "${playerctl}" "play-pause"; }
Mod+XF86AudioRaiseVolume { spawn "${playerctl}" "next"; }
Mod+XF86AudioLowerVolume { spawn "${playerctl}" "previous"; }
} }
''; '';
} }