restructure, add walker

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-05-05 23:58:09 +03:00
parent ee3a505d38
commit 260502c6ce
9 changed files with 1025 additions and 648 deletions

View File

@ -8,21 +8,16 @@
}: let
inherit (lib.strings) removeSuffix;
inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe;
inherit (config.lib.stylix) colors;
inherit (config.stylix) cursor;
inherit (osConfig.module.stylix) theme;
inherit (osConfig.networking) hostName;
cfg = config.desktop.niri;
keyboard =
if hostName == "eldrid"
then "chromeos"
else "platform";
xdgPics =
config.xdg.userDirs.pictures;
ifLaptop = mkIf (hostName != "dunamis");
launcher = getExe pkgs.fuzzel;
launcher = getExe pkgs.walker;
lockscreen = getExe pkgs.gtklock;
in {
imports = [
./programs
];
options = {
desktop.niri.enable =
mkEnableOption "enable niri desktop";
@ -33,386 +28,14 @@ in {
wpaperd.enable = true;
qt.enable = false;
};
xdg.configFile = {
niri = {
target = "niri/config.kdl";
text = let
arrows = {
left = "Left";
down = "Down";
up = "Up";
right = "Right";
};
homerow-arrows = {
left = "n";
down = "e";
up = "i";
right = "o";
};
letters = {
first = "Q";
second = "W";
third = "F";
fourth = "P";
fifth = "B";
sixth = "J";
seventh = "L";
eighth = "U";
ninth = "Y";
};
numbers = {
first = "1";
second = "2";
third = "3";
fourth = "4";
fifth = "5";
sixth = "6";
seventh = "7";
eighth = "8";
ninth = "9";
};
genArrowNavigation = keys: ''
Mod+${keys.left} { focus-column-left; }
Mod+${keys.down} { focus-window-or-workspace-down; }
Mod+${keys.up} { focus-window-or-workspace-up; }
Mod+${keys.right} { focus-column-right; }
Mod+Ctrl+${keys.left} { move-column-left; }
Mod+Ctrl+${keys.down} { move-window-down-or-to-workspace-down; }
Mod+Ctrl+${keys.up} { move-window-up-or-to-workspace-up; }
Mod+Ctrl+${keys.right} { move-column-right; }
Mod+Shift+${keys.left} { focus-monitor-left; }
Mod+Shift+${keys.down} { focus-monitor-down; }
Mod+Shift+${keys.up} { focus-monitor-up; }
Mod+Shift+${keys.right} { focus-monitor-right; }
Mod+Shift+Ctrl+${keys.left} { move-column-to-monitor-left; }
Mod+Shift+Ctrl+${keys.down} { move-column-to-monitor-down; }
Mod+Shift+Ctrl+${keys.up} { move-column-to-monitor-up; }
Mod+Shift+Ctrl+${keys.right} { move-column-to-monitor-right; }
'';
genWorkspacesNavigation = keys: ''
Mod+${keys.first} { focus-workspace 1; }
Mod+${keys.second} { focus-workspace 2; }
Mod+${keys.third} { focus-workspace 3; }
Mod+${keys.fourth} { focus-workspace 4; }
Mod+${keys.fifth} { focus-workspace 5; }
Mod+${keys.sixth} { focus-workspace 6; }
Mod+${keys.seventh} { focus-workspace 7; }
Mod+${keys.eighth} { focus-workspace 8; }
Mod+${keys.ninth} { focus-workspace 9; }
Mod+Ctrl+Shift+${keys.first} { move-column-to-workspace 1; }
Mod+Ctrl+Shift+${keys.second} { move-column-to-workspace 2; }
Mod+Ctrl+Shift+${keys.third} { move-column-to-workspace 3; }
Mod+Ctrl+Shift+${keys.fourth} { move-column-to-workspace 4; }
Mod+Ctrl+Shift+${keys.fifth} { move-column-to-workspace 5; }
Mod+Ctrl+Shift+${keys.sixth} { move-column-to-workspace 6; }
Mod+Ctrl+Shift+${keys.seventh} { move-column-to-workspace 7; }
Mod+Ctrl+Shift+${keys.eighth} { move-column-to-workspace 8; }
Mod+Ctrl+Shift+${keys.ninth} { move-column-to-workspace 9; }
'';
in ''
environment {
DISPLAY ":123"
QT_QPA_PLATFORM "wayland"
QT_QPA_PLATFORMTHEME "gtk3"
GDK_BACKEND "wayland"
MOZ_ENABLE_WAYLAND "1"
MOZ_WEBRENDER "1"
XDG_SESSION_TYPE "wayland"
CLUTTER_BACKEND "wayland"
SDL_VIDEODRIVER "wayland"
}
input {
keyboard {
xkb {
layout "us,ua"
${
if (hostName == "dunamis" || hostName == "legion")
then "// variant \"colemak_dh_ortho,\""
else "variant \"colemak_dh_ortho,\""
}
}
repeat-delay 200
repeat-rate 50
track-layout "global"
}
touchpad {
// off
tap
// dwt
// dwtp
natural-scroll
accel-speed 0.2
accel-profile "flat"
// scroll-method "two-finger"
// disabled-on-external-mouse
}
mouse {
// off
// natural-scroll
accel-speed 0.0
accel-profile "flat"
// scroll-method "no-scroll"
}
warp-mouse-to-focus
// focus-follows-mouse
}
output "eDP-1" {
// off
scale 1.2
transform "normal"
// position x=1920 y=0
}
output "Samsung Electric Company S24R65x H4TMA03291" {
position x=0 y=0
variable-refresh-rate
}
output "Philips Consumer Electronics Company 27M2N5500 UK02418033254" {
mode "2560x1440@${
if hostName == "legion"
then "144.001"
else "180.000"
}"
variable-refresh-rate
position x=0 y=0
scale 1.33
}
output "PNP(AOC) 27V2G5 0x0000026C" {
position x=1920 y=0
mode "1920x1080@74.973"
variable-refresh-rate
}
cursor {
xcursor-theme "${cursor.name}"
xcursor-size ${toString cursor.size}
}
layout {
gaps 6
center-focused-column "never" // "on-overflow"
preset-column-widths {
proportion 0.33333
proportion 0.66667
}
// default-column-width { proportion 0.9; }
default-column-width { proportion 0.5; }
tab-indicator {
active-color "#${colors.base04}"
inactive-color "#${colors.base03}"
corner-radius 4
gap 6
gaps-between-tabs 3
length total-proportion=0.3
place-within-column
position "left"
width 6
}
focus-ring {
// off
width 3
active-gradient from="#${colors.base0D}" to="#${colors.base0F}" angle=40 relative-to="workspace-view"
inactive-color "#${colors.base03}"
}
struts {
left 24
right 24
}
}
prefer-no-csd
hotkey-overlay {
skip-at-startup
}
window-rule {
geometry-corner-radius 12
clip-to-geometry true
}
window-rule {
match is-window-cast-target=true
focus-ring {
width 3
active-color "#${colors.base0F}"
inactive-color "#${colors.base03}"
}
border {
width 3
active-color "#${colors.base0F}"
inactive-color "#${colors.base03}"
}
shadow {
on
color "#${colors.base0F}"
inactive-color "#${colors.base03}"
}
}
screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png"
animations {
slowdown 0.8
}
window-rule {
match title="Картинка в картинці"
match title="Picture-in-Picture"
open-floating true
}
window-rule {
match app-id="org.wezfurlong.wezterm"
match app-id="com.mitchellh.ghostty"
default-column-width { proportion 1.0; }
}
window-rule {
match app-id="re.sonny.Junction"
open-floating true
open-focused true
}
window-rule {
match app-id="com.mitchellh.ghostty"
draw-border-with-background false
}
window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
match app-id=r#"^Bitwarden$"#
match app-id="org.telegram.desktop"
match app-id="org.signal.Signal"
match app-id="WebCord"
// block-out-from "screen-capture"
block-out-from "screencast"
}
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Tab { focus-workspace-previous; }
Mod+C { center-column; }
Mod+M { maximize-column; }
Mod+H { set-column-width "50%"; }
Mod+T { set-column-width "33%"; }
Mod+Shift+T { set-column-width "67%"; }
Mod+V { toggle-column-tabbed-display; }
Mod+G { switch-focus-between-floating-and-tiling; }
Mod+Ctrl+Comma { consume-or-expel-window-left; }
Mod+Ctrl+Period { consume-or-expel-window-right; }
Mod+Ctrl+Q { close-window; }
Mod+Ctrl+M { fullscreen-window; }
Mod+Ctrl+G { toggle-window-floating; }
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
Mod+Comma { set-column-width "-10%"; }
Mod+Period { set-column-width "+10%"; }
Mod+Shift+Comma { set-window-height "-10%"; }
Mod+Shift+Period { set-window-height "+10%"; }
Mod+Escape { switch-layout "next"; }
Mod+Return repeat=false { spawn "sh" "-c" "$TERMINAL"; }
Mod+Space repeat=false { spawn "${launcher}"; }
Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; }
Mod+Ctrl+V repeat=false { spawn "copyq" "toggle"; }
Mod+Ctrl+Shift+BracketLeft { quit; }
Mod+Ctrl+Shift+BracketRight { power-off-monitors; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Shift+Print { screenshot-window; }
// Caps_Lock { spawn "swayosd-client" "--caps-lock"; }
// XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%+"; }
// XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%-"; }
// XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
// XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "raise"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "lower"; }
XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume" "mute-toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "swayosd-client" "--input-volume" "mute-toggle"; }
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
XF86AudioPause allow-when-locked=true { spawn "playerctl" "pause"; }
XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
XF86ScreenSaver allow-when-locked=true { spawn "${lockscreen}"; }
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-"; }
Alt+XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+" "-d" "${keyboard}::kbd_backlight"; }
Alt+XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-" "-d" "${keyboard}::kbd_backlight"; }
XF86KbdBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+" "-d" "${keyboard}::kbd_backlight"; }
XF86KbdBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-" "-d" "${keyboard}::kbd_backlight"; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Next { focus-workspace-down; }
Mod+Prior { focus-workspace-up; }
Mod+Ctrl+Next { move-column-to-workspace-down; }
Mod+Ctrl+Prior { move-column-to-workspace-up; }
Mod+Shift+Next { move-workspace-down; }
Mod+Shift+Prior { move-workspace-up; }
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
${genArrowNavigation arrows}
${genArrowNavigation homerow-arrows}
${genWorkspacesNavigation letters}
${genWorkspacesNavigation numbers}
}
'';
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
button-layout = "icon:close";
};
"org/gnome/desktop/interface" = {
icon-theme = config.gtk.iconTheme.name;
};
};
services = import ./services {inherit pkgs lockscreen getExe perSystem;};
programs.fuzzel = import ./programs/fuzzel {inherit config mkDefault;};
programs.waybar = import ./programs/waybar {inherit colors config getExe ifLaptop pkgs;};
home.packages = with pkgs;
[
# gui libadwaita apps
celluloid # mpv gui in libadwaita
helvum # pipewire patchbay in rust
junction # app chooser
loupe # image viewer and editor in rust
mission-center # task manager in rust (partly)
nautilus # file manager
overskride # bluetooth gui in rust
papers # pdf reader in rust
pika-backup # borg gui in rust
pwvucontrol # pipewire gui in rust
wdisplays # wlroots display configurator
]
++ [
# misc utils
(ifLaptop brightnessctl)
dconf
libnotify
playerctl
wl-clipboard-rs # wl-clipboard in rust
];
gtk = {
enable = true;
iconTheme = {
@ -430,14 +53,35 @@ in {
enable = true;
platformTheme.name = "gtk3";
};
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
button-layout = "icon:close";
};
"org/gnome/desktop/interface" = {
icon-theme = config.gtk.iconTheme.name;
};
};
xdg.configFile.niri = import ./niri.nix {inherit config hostName launcher lockscreen;};
services = import ./services {inherit pkgs lockscreen getExe perSystem;};
home.packages = with pkgs;
[
# gui libadwaita apps
celluloid # mpv gui in libadwaita
helvum # pipewire patchbay in rust
junction # app chooser
loupe # image viewer and editor in rust
mission-center # task manager in rust (partly)
nautilus # file manager
overskride # bluetooth gui in rust
papers # pdf reader in rust
pika-backup # borg gui in rust
pwvucontrol # pipewire gui in rust
sonusmix # pipewire routing tool in rust
wdisplays # wlroots display configurator
]
++ [
# misc utils
(ifLaptop brightnessctl)
dconf
libnotify
playerctl
wl-clipboard-rs # wl-clipboard in rust
];
xdg = {
mime.enable = true;
mimeApps = {

View File

@ -0,0 +1,368 @@
{
config,
hostName,
launcher,
lockscreen,
...
}: let
inherit (config.lib.stylix) colors;
inherit (config.stylix) cursor;
keyboard =
if hostName == "eldrid"
then "chromeos"
else "platform";
xdgPics =
config.xdg.userDirs.pictures;
in {
target = "niri/config.kdl";
text = let
arrows = {
left = "Left";
down = "Down";
up = "Up";
right = "Right";
};
homerow-arrows = {
left = "n";
down = "e";
up = "i";
right = "o";
};
letters = {
first = "Q";
second = "W";
third = "F";
fourth = "P";
fifth = "B";
sixth = "J";
seventh = "L";
eighth = "U";
ninth = "Y";
};
numbers = {
first = "1";
second = "2";
third = "3";
fourth = "4";
fifth = "5";
sixth = "6";
seventh = "7";
eighth = "8";
ninth = "9";
};
genArrowNavigation = keys: ''
Mod+${keys.left} { focus-column-left; }
Mod+${keys.down} { focus-window-or-workspace-down; }
Mod+${keys.up} { focus-window-or-workspace-up; }
Mod+${keys.right} { focus-column-right; }
Mod+Ctrl+${keys.left} { move-column-left; }
Mod+Ctrl+${keys.down} { move-window-down-or-to-workspace-down; }
Mod+Ctrl+${keys.up} { move-window-up-or-to-workspace-up; }
Mod+Ctrl+${keys.right} { move-column-right; }
Mod+Shift+${keys.left} { focus-monitor-left; }
Mod+Shift+${keys.down} { focus-monitor-down; }
Mod+Shift+${keys.up} { focus-monitor-up; }
Mod+Shift+${keys.right} { focus-monitor-right; }
Mod+Shift+Ctrl+${keys.left} { move-column-to-monitor-left; }
Mod+Shift+Ctrl+${keys.down} { move-column-to-monitor-down; }
Mod+Shift+Ctrl+${keys.up} { move-column-to-monitor-up; }
Mod+Shift+Ctrl+${keys.right} { move-column-to-monitor-right; }
'';
genWorkspacesNavigation = keys: ''
Mod+${keys.first} { focus-workspace 1; }
Mod+${keys.second} { focus-workspace 2; }
Mod+${keys.third} { focus-workspace 3; }
Mod+${keys.fourth} { focus-workspace 4; }
Mod+${keys.fifth} { focus-workspace 5; }
Mod+${keys.sixth} { focus-workspace 6; }
Mod+${keys.seventh} { focus-workspace 7; }
Mod+${keys.eighth} { focus-workspace 8; }
Mod+${keys.ninth} { focus-workspace 9; }
Mod+Ctrl+Shift+${keys.first} { move-column-to-workspace 1; }
Mod+Ctrl+Shift+${keys.second} { move-column-to-workspace 2; }
Mod+Ctrl+Shift+${keys.third} { move-column-to-workspace 3; }
Mod+Ctrl+Shift+${keys.fourth} { move-column-to-workspace 4; }
Mod+Ctrl+Shift+${keys.fifth} { move-column-to-workspace 5; }
Mod+Ctrl+Shift+${keys.sixth} { move-column-to-workspace 6; }
Mod+Ctrl+Shift+${keys.seventh} { move-column-to-workspace 7; }
Mod+Ctrl+Shift+${keys.eighth} { move-column-to-workspace 8; }
Mod+Ctrl+Shift+${keys.ninth} { move-column-to-workspace 9; }
'';
in ''
environment {
DISPLAY ":123"
QT_QPA_PLATFORMTHEME "gtk3"
MOZ_ENABLE_WAYLAND "1"
MOZ_WEBRENDER "1"
GDK_BACKEND "wayland"
QT_QPA_PLATFORM "wayland"
XDG_SESSION_TYPE "wayland"
CLUTTER_BACKEND "wayland"
SDL_VIDEODRIVER "wayland"
}
input {
keyboard {
xkb {
layout "us,ua"
${
if (hostName == "dunamis" || hostName == "legion")
then "// variant \"colemak_dh_ortho,\""
else "variant \"colemak_dh_ortho,\""
}
}
repeat-delay 200
repeat-rate 50
track-layout "global"
}
touchpad {
// off
tap
// dwt
// dwtp
natural-scroll
accel-speed 0.2
accel-profile "flat"
// scroll-method "two-finger"
// disabled-on-external-mouse
}
mouse {
// off
// natural-scroll
accel-speed 0.0
accel-profile "flat"
// scroll-method "no-scroll"
}
warp-mouse-to-focus
// focus-follows-mouse
}
output "eDP-1" {
// off
scale 1.2
transform "normal"
// position x=1920 y=0
}
output "Samsung Electric Company S24R65x H4TMA03291" {
position x=0 y=0
variable-refresh-rate
}
output "Philips Consumer Electronics Company 27M2N5500 UK02418033254" {
mode "2560x1440@${
if hostName == "legion"
then "144.001"
else "180.000"
}"
variable-refresh-rate
position x=0 y=0
scale 1.33
}
output "PNP(AOC) 27V2G5 0x0000026C" {
position x=1920 y=0
mode "1920x1080@74.973"
variable-refresh-rate
}
cursor {
xcursor-theme "${cursor.name}"
xcursor-size ${toString cursor.size}
}
layout {
gaps 6
center-focused-column "never" // "on-overflow"
preset-column-widths {
proportion 0.33333
proportion 0.66667
}
// default-column-width { proportion 0.9; }
default-column-width { proportion 0.5; }
tab-indicator {
active-color "#${colors.base04}"
inactive-color "#${colors.base03}"
corner-radius 4
gap 6
gaps-between-tabs 3
length total-proportion=0.3
place-within-column
position "left"
width 6
}
focus-ring {
// off
width 3
active-gradient from="#${colors.base0D}" to="#${colors.base0F}" angle=40 relative-to="workspace-view"
inactive-color "#${colors.base03}"
}
struts {
left 24
right 24
}
}
prefer-no-csd
hotkey-overlay {
skip-at-startup
}
window-rule {
geometry-corner-radius 12
clip-to-geometry true
}
window-rule {
match is-window-cast-target=true
focus-ring {
width 3
active-color "#${colors.base0F}"
inactive-color "#${colors.base03}"
}
border {
width 3
active-color "#${colors.base0F}"
inactive-color "#${colors.base03}"
}
shadow {
on
color "#${colors.base0F}"
inactive-color "#${colors.base03}"
}
}
screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png"
animations {
slowdown 0.8
}
window-rule {
match title="Картинка в картинці"
match title="Picture-in-Picture"
open-floating true
}
window-rule {
match app-id="org.wezfurlong.wezterm"
match app-id="com.mitchellh.ghostty"
default-column-width { proportion 1.0; }
}
window-rule {
match app-id="re.sonny.Junction"
open-floating true
open-focused true
}
window-rule {
match app-id="com.mitchellh.ghostty"
draw-border-with-background false
}
window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
match app-id=r#"^Bitwarden$"#
match app-id="org.telegram.desktop"
match app-id="org.signal.Signal"
match app-id="WebCord"
// block-out-from "screen-capture"
block-out-from "screencast"
}
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Tab { focus-workspace-previous; }
Mod+C { center-column; }
Mod+M { maximize-column; }
Mod+H { set-column-width "50%"; }
Mod+T { set-column-width "33%"; }
Mod+Shift+T { set-column-width "67%"; }
Mod+V { toggle-column-tabbed-display; }
Mod+G { switch-focus-between-floating-and-tiling; }
Mod+Ctrl+Comma { consume-or-expel-window-left; }
Mod+Ctrl+Period { consume-or-expel-window-right; }
Mod+Ctrl+Q { close-window; }
Mod+Ctrl+M { fullscreen-window; }
Mod+Ctrl+G { toggle-window-floating; }
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
Mod+Comma { set-column-width "-10%"; }
Mod+Period { set-column-width "+10%"; }
Mod+Shift+Comma { set-window-height "-10%"; }
Mod+Shift+Period { set-window-height "+10%"; }
Mod+Escape { switch-layout "next"; }
Mod+Return repeat=false { spawn "sh" "-c" "$TERMINAL"; }
Mod+Space repeat=false { spawn "${launcher}"; }
Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; }
Mod+Ctrl+V repeat=false { spawn "copyq" "toggle"; }
Mod+Shift+W repeat=false { spawn "walker" "-m" "windows"; }
Mod+Ctrl+Shift+BracketLeft { quit; }
Mod+Ctrl+Shift+BracketRight { power-off-monitors; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Shift+Print { screenshot-window; }
// Caps_Lock { spawn "swayosd-client" "--caps-lock"; }
// XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%+"; }
// XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%-"; }
// XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
// XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "raise"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "lower"; }
XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume" "mute-toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "swayosd-client" "--input-volume" "mute-toggle"; }
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
XF86AudioPause allow-when-locked=true { spawn "playerctl" "pause"; }
XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
XF86ScreenSaver allow-when-locked=true { spawn "${lockscreen}"; }
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-"; }
Alt+XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+" "-d" "${keyboard}::kbd_backlight"; }
Alt+XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-" "-d" "${keyboard}::kbd_backlight"; }
XF86KbdBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+" "-d" "${keyboard}::kbd_backlight"; }
XF86KbdBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-" "-d" "${keyboard}::kbd_backlight"; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Next { focus-workspace-down; }
Mod+Prior { focus-workspace-up; }
Mod+Ctrl+Next { move-column-to-workspace-down; }
Mod+Ctrl+Prior { move-column-to-workspace-up; }
Mod+Shift+Next { move-workspace-down; }
Mod+Shift+Prior { move-workspace-up; }
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
${genArrowNavigation arrows}
${genArrowNavigation homerow-arrows}
${genWorkspacesNavigation letters}
${genWorkspacesNavigation numbers}
}
'';
}

View File

@ -1,6 +1,20 @@
{
imports = [
./fuzzel
./waybar
osConfig,
config,
inputs,
pkgs,
lib,
...
}: let
inherit (lib) mkIf mkDefault getExe;
inherit (config.lib.stylix) colors;
inherit (osConfig.networking) hostName;
ifLaptop = mkIf (hostName != "dunamis");
in {
imports = with inputs; [
walker.homeManagerModules.default
];
# programs.fuzzel = import ./fuzzel {inherit config mkDefault;};
programs.walker = import ./walker {inherit config inputs pkgs;};
programs.waybar = import ./waybar {inherit colors config getExe ifLaptop pkgs;};
}

View File

@ -0,0 +1,304 @@
{
config,
pkgs,
...
}: {
enable = true;
package = pkgs.walker;
runAsService = true;
config = {
activation_mode.labels = "neiotsra";
# theme = "stylix";
as_window = false;
disabled = ["clipboard"];
builtins = {
applications = {
actions.enabled = true;
context_aware = true;
name = "applications";
placeholder = "Applications";
prioritize_new = true;
refresh = true;
show_generic = false;
show_icon_when_single = true;
show_sub_when_single = true;
weight = 5;
};
calc = {
icon = "accessories-calculator";
min_chars = 4;
name = "calc";
placeholder = "Calculator";
weight = 5;
};
clipboard = {
image_height = 300;
max_entries = 10;
name = "clipboard";
placeholder = "Clipboard";
switcher_only = true;
weight = 5;
};
commands = {
icon = "utilities-terminal";
name = "commands";
placeholder = "Commands";
switcher_only = true;
weight = 5;
};
custom_commands = {
icon = "utilities-terminal";
name = "custom_commands";
placeholder = "Custom Commands";
weight = 5;
};
dmenu = {
name = "dmenu";
placeholder = "Dmenu";
switcher_only = true;
weight = 5;
};
emojis = {
history = true;
name = "emojis";
placeholder = "Emojis";
switcher_only = true;
typeahead = true;
weight = 5;
};
finder = {
concurrency = 8;
icon = "folder";
ignore_gitignore = true;
name = "finder";
placeholder = "Finder";
refresh = true;
switcher_only = true;
weight = 5;
};
runner = {
generic_entry = false;
history = true;
icon = "utilities-terminal";
name = "runner";
placeholder = "Runner";
refresh = true;
typeahead = true;
weight = 5;
};
ssh = {
history = true;
icon = "preferences-system-network";
name = "ssh";
placeholder = "SSH";
refresh = true;
switcher_only = true;
weight = 5;
};
switcher = {
name = "switcher";
placeholder = "Switcher";
prefix = "/";
weight = 5;
};
websearch = {
engines = ["duckduckgo"];
icon = "applications-internet";
name = "websearch";
placeholder = "Websearch";
weight = 5;
};
windows = {
icon = "view-restore";
name = "windows";
placeholder = "Windows";
weight = 5;
};
};
disable_click_to_close = false;
force_keyboard_focus = true;
list = {
max_entries = 50;
show_initial_entries = true;
single_click = true;
};
search = {
delay = 0;
force_keyboard_focus = true;
history = true;
placeholder = "Search...";
};
};
theme = {
layout = {
ui = {
anchors = {
bottom = false;
left = false;
right = false;
top = false;
};
window = {
h_align = "center";
v_align = "center";
box = {
width = 450;
h_align = "center";
v_align = "center";
# spacing = 12;
orientation = "vertical";
search = {
margins = {
start = 8;
top = 8;
end = 8;
bottom = 0;
};
h_align = "top";
};
scroll = {
overlay_scrolling = true;
list = {
margins = {
bottom = 8;
top = 8;
start = 8;
end = 8;
};
item = {
icon.theme = "${config.gtk.iconTheme.name}";
spacing = 4;
activation_label = {
x_align = 0.5;
y_align = 0.5;
width = 32;
};
text = {
h_align = "start";
h_expand = true;
revert = true;
wrap = true;
};
};
};
};
};
};
};
};
style = let
inherit (config.lib.stylix) colors;
in ''
@define-color base00 #${colors.base00};
@define-color base01 #${colors.base01};
@define-color base02 #${colors.base02};
@define-color base03 #${colors.base03};
@define-color base04 #${colors.base04};
@define-color base05 #${colors.base05};
@define-color base06 #${colors.base06};
@define-color base07 #${colors.base07};
@define-color base08 #${colors.base08};
@define-color base09 #${colors.base09};
@define-color base0A #${colors.base0A};
@define-color base0B #${colors.base0B};
@define-color base0C #${colors.base0C};
@define-color base0D #${colors.base0D};
@define-color base0E #${colors.base0E};
@define-color base0F #${colors.base0F};
#window,
#box,
#search,
#password,
#input,
#typeahead,
#spinner,
#list,
child,
scrollbar,
slider,
#item,
#text,
#label,
#sub,
#activationlabel {
all: unset;
}
#window {
background: none;
color: @base05;
}
#box {
border-radius: 20px;
border-width: 4px;
border-color: @base0D;
background: @base01;
}
#search {
background: @base02;
border-radius: 12px 12px 6px 6px;
padding: 8px;
}
#password,
#input,
#typeahead {
background: none;
box-shadow: none;
border-radius: 12px;
}
#input > *:first-child,
#typeahead > *:first-child {
margin-right: 12px;
border-radius: 0px;
}
#typeahead {
color: @base05;
}
#input placeholder {
opacity: 0.5;
}
#list {
padding: 8px;
border-radius: 6px 6px 12px 12px;
background: @base02;
}
child {
box-shadow: none;
}
child:selected,
child:hover {
box-shadow: none;
border-radius: 8px;
background: @base03;
}
#item {
padding: 4px;
}
#sub {
font-size: smaller;
opacity: 0.5;
}
#activationlabel {
opacity: 0.5;
}
.activation #activationlabel {
opacity: 1;
color: @base05;
}
'';
};
}

View File

@ -5,15 +5,14 @@
lockscreen,
...
}: {
copyq.enable = true;
copyq.package = perSystem.nixpkgs-stable.copyq;
swaync = import ./swaync;
network-manager-applet.enable = true;
playerctld.enable = true;
swayosd = {
enable = true;
topMargin = 0.8;
};
wpaperd.enable = true;
copyq = {
enable = true;
package = perSystem.nixpkgs-stable.copyq;
};
gnome-keyring = {
enable = true;
components = ["secrets"];
@ -29,189 +28,16 @@
night = 3000;
};
};
swayosd = {
enable = true;
topMargin = 0.8;
};
udiskie = {
enable = true;
automount = false;
notify = true;
tray = "auto";
};
swaync = {
enable = true;
settings = {
cssPriority = "user";
image-visibility = "when-available";
keyboard-shortcut = true;
relative-timestamps = true;
timeout = 5;
timeout-low = 5;
timeout-critical = 0;
script-fail-notify = true;
transition-time = 200;
# Layer settings
layer-shell = true;
layer = "overlay";
control-center-layer = "overlay";
# Notification settings
positionX = "right";
positionY = "top";
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 32;
notification-body-image-height = 100;
notification-body-image-width = 200;
notification-window-width = 400;
# Control center settings
control-center-positionX = "right";
control-center-positionY = "top";
control-center-width = 500;
control-center-exclusive-zone = true;
fit-to-screen = true;
hide-on-action = true;
hide-on-clear = false;
# Widget settings
widgets = [
"title"
"dnd"
"notifications"
"mpris"
];
widget-config = {
title = {
text = "Notifications";
clear-all-button = true;
button-text = "Clear All";
};
dnd = {
text = "Do Not Disturb";
};
mpris = {
image-size = 96;
image-radius = 12;
blur = true;
};
};
};
style = ''
/*** Global ***/
progress,
progressbar,
trough {
border-radius: 16px;
}
.app-icon,
.image {
-gtk-icon-effect: none;
}
.notification-action {
border-radius: 12px;
margin: 0.5rem;
}
.close-button {
margin: 24px;
padding: 0.2rem;
border-radius: 16px;
}
/*** Notifications ***/
.notification-group.collapsed
.notification-row:not(:last-child)
.notification-action,
.notification-group.collapsed
.notification-row:not(:last-child)
.notification-default-action {
opacity: 0;
}
.trough {
margin: 4px;
border-radius: 7px;
}
.notification,
.notification.low,
.notification.normal,
.notification.critical,
.control-center {
margin: 16px;
border-radius: 7px;
}
.floating-notifications,
.notification-content {
border-radius: 7px;
}
.control-center-list {
background: transparent;
}
/*** Widgets ***/
/* Title widget */
.widget-title {
margin: 0.5rem;
}
.widget-title > label {
font-weight: bold;
}
.widget-title > button {
border-radius: 16px;
padding: 0.5rem;
}
/* DND Widget */
.widget-dnd {
margin: 0.5rem;
}
.widget-dnd > label {
font-weight: bold;
}
.widget-dnd > switch {
border-radius: 16px;
}
.widget-dnd > switch slider {
border-radius: 16px;
padding: 0.25rem;
}
/* Mpris widget */
.widget-mpris .widget-mpris-player {
border-radius: 16px;
margin: 0.5rem;
padding: 0.5rem;
}
.widget-mpris .widget-mpris-player .widget-mpris-album-art {
border-radius: 16px;
}
.widget-mpris .widget-mpris-player .widget-mpris-title {
font-weight: bold;
}
.widget-mpris .widget-mpris-player .widget-mpris-subtitle {
font-weight: normal;
}
.widget-mpris .widget-mpris-player > box > button {
border: 1px solid transparent;
border-radius: 16px;
padding: 0.25rem;
}
'';
};
hypridle = {
enable = true;
settings = {

View File

@ -0,0 +1,177 @@
{
enable = true;
settings = {
cssPriority = "user";
image-visibility = "when-available";
keyboard-shortcut = true;
relative-timestamps = true;
timeout = 5;
timeout-low = 5;
timeout-critical = 0;
script-fail-notify = true;
transition-time = 200;
# Layer settings
layer-shell = true;
layer = "overlay";
control-center-layer = "overlay";
# Notification settings
positionX = "right";
positionY = "top";
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 32;
notification-body-image-height = 100;
notification-body-image-width = 200;
notification-window-width = 400;
# Control center settings
control-center-positionX = "right";
control-center-positionY = "top";
control-center-width = 500;
control-center-exclusive-zone = true;
fit-to-screen = true;
hide-on-action = true;
hide-on-clear = false;
# Widget settings
widgets = [
"title"
"dnd"
"notifications"
"mpris"
];
widget-config = {
title = {
text = "Notifications";
clear-all-button = true;
button-text = "Clear All";
};
dnd = {
text = "Do Not Disturb";
};
mpris = {
image-size = 96;
image-radius = 12;
blur = true;
};
};
};
style = ''
/*** Global ***/
progress,
progressbar,
trough {
border-radius: 16px;
}
.app-icon,
.image {
-gtk-icon-effect: none;
}
.notification-action {
border-radius: 12px;
margin: 0.5rem;
}
.close-button {
margin: 24px;
padding: 0.2rem;
border-radius: 16px;
}
/*** Notifications ***/
.notification-group.collapsed
.notification-row:not(:last-child)
.notification-action,
.notification-group.collapsed
.notification-row:not(:last-child)
.notification-default-action {
opacity: 0;
}
.trough {
margin: 4px;
border-radius: 7px;
}
.notification,
.notification.low,
.notification.normal,
.notification.critical,
.control-center {
margin: 16px;
border-radius: 7px;
}
.floating-notifications,
.notification-content {
border-radius: 7px;
}
.control-center-list {
background: transparent;
}
/*** Widgets ***/
/* Title widget */
.widget-title {
margin: 0.5rem;
}
.widget-title > label {
font-weight: bold;
}
.widget-title > button {
border-radius: 16px;
padding: 0.5rem;
}
/* DND Widget */
.widget-dnd {
margin: 0.5rem;
}
.widget-dnd > label {
font-weight: bold;
}
.widget-dnd > switch {
border-radius: 16px;
}
.widget-dnd > switch slider {
border-radius: 16px;
padding: 0.25rem;
}
/* Mpris widget */
.widget-mpris .widget-mpris-player {
border-radius: 16px;
margin: 0.5rem;
padding: 0.5rem;
}
.widget-mpris .widget-mpris-player .widget-mpris-album-art {
border-radius: 16px;
}
.widget-mpris .widget-mpris-player .widget-mpris-title {
font-weight: bold;
}
.widget-mpris .widget-mpris-player .widget-mpris-subtitle {
font-weight: normal;
}
.widget-mpris .widget-mpris-player > box > button {
border: 1px solid transparent;
border-radius: 16px;
padding: 0.25rem;
}
'';
}