mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 06:08:11 +09:00
fix
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.niri;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./system.nix
|
||||
./home.nix
|
||||
];
|
||||
|
||||
options.my.applications.niri = {
|
||||
enable = lib.mkEnableOption "niri window manager";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.niri.system.enable = lib.mkDefault true;
|
||||
my.applications.niri.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
{
|
||||
"Mod+Shift+Slash".action.show-hotkey-overlay = { };
|
||||
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-volume"
|
||||
"@DEFAULT_AUDIO_SINK@"
|
||||
"0.1+"
|
||||
];
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-volume"
|
||||
"@DEFAULT_AUDIO_SINK@"
|
||||
"0.1-"
|
||||
];
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-mute"
|
||||
"@DEFAULT_AUDIO_SINK@"
|
||||
"toggle"
|
||||
];
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-mute"
|
||||
"@DEFAULT_AUDIO_SOURCE@"
|
||||
"toggle"
|
||||
];
|
||||
};
|
||||
|
||||
"Mod+Q".action.close-window = { };
|
||||
|
||||
"Mod+Left".action.focus-column-left = { };
|
||||
"Mod+Down".action.focus-window-down = { };
|
||||
"Mod+Up".action.focus-window-up = { };
|
||||
"Mod+Right".action.focus-column-right = { };
|
||||
"Mod+H".action.focus-column-left = { };
|
||||
"Mod+J".action.focus-window-down = { };
|
||||
"Mod+K".action.focus-window-up = { };
|
||||
"Mod+L".action.focus-column-right = { };
|
||||
|
||||
"Mod+Ctrl+Left".action.move-column-left = { };
|
||||
"Mod+Ctrl+Down".action.move-window-down = { };
|
||||
"Mod+Ctrl+Up".action.move-window-up = { };
|
||||
"Mod+Ctrl+Right".action.move-column-right = { };
|
||||
"Mod+Ctrl+H".action.move-column-left = { };
|
||||
"Mod+Ctrl+J".action.move-window-down = { };
|
||||
"Mod+Ctrl+K".action.move-window-up = { };
|
||||
"Mod+Ctrl+L".action.move-column-right = { };
|
||||
|
||||
"Mod+Home".action.focus-column-first = { };
|
||||
"Mod+End".action.focus-column-last = { };
|
||||
"Mod+Ctrl+Home".action.move-column-to-first = { };
|
||||
"Mod+Ctrl+End".action.move-column-to-last = { };
|
||||
|
||||
"Mod+Shift+Left".action.focus-monitor-left = { };
|
||||
"Mod+Shift+Down".action.focus-monitor-down = { };
|
||||
"Mod+Shift+Up".action.focus-monitor-up = { };
|
||||
"Mod+Shift+Right".action.focus-monitor-right = { };
|
||||
"Mod+Shift+H".action.focus-monitor-left = { };
|
||||
"Mod+Shift+J".action.focus-monitor-down = { };
|
||||
"Mod+Shift+K".action.focus-monitor-up = { };
|
||||
"Mod+Shift+L".action.focus-monitor-right = { };
|
||||
|
||||
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = { };
|
||||
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = { };
|
||||
"Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = { };
|
||||
"Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = { };
|
||||
"Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = { };
|
||||
"Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = { };
|
||||
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = { };
|
||||
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = { };
|
||||
|
||||
"Mod+Page_Down".action.focus-workspace-down = { };
|
||||
"Mod+Page_Up".action.focus-workspace-up = { };
|
||||
"Mod+U".action.focus-workspace-down = { };
|
||||
"Mod+I".action.focus-workspace-up = { };
|
||||
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = { };
|
||||
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = { };
|
||||
"Mod+Ctrl+U".action.move-column-to-workspace-down = { };
|
||||
"Mod+Ctrl+I".action.move-column-to-workspace-up = { };
|
||||
|
||||
"Mod+Shift+Page_Down".action.move-workspace-down = { };
|
||||
"Mod+Shift+Page_Up".action.move-workspace-up = { };
|
||||
"Mod+Shift+U".action.move-workspace-down = { };
|
||||
"Mod+Shift+I".action.move-workspace-up = { };
|
||||
|
||||
"Mod+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action.focus-workspace-down = { };
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action.focus-workspace-up = { };
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action.move-column-to-workspace-down = { };
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action.move-column-to-workspace-up = { };
|
||||
};
|
||||
|
||||
"Mod+WheelScrollRight".action.focus-column-right = { };
|
||||
"Mod+WheelScrollLeft".action.focus-column-left = { };
|
||||
"Mod+Ctrl+WheelScrollRight".action.move-column-right = { };
|
||||
"Mod+Ctrl+WheelScrollLeft".action.move-column-left = { };
|
||||
|
||||
"Mod+Shift+WheelScrollDown".action.focus-column-right = { };
|
||||
"Mod+Shift+WheelScrollUp".action.focus-column-left = { };
|
||||
"Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = { };
|
||||
"Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = { };
|
||||
|
||||
"Mod+1".action.focus-workspace = 1;
|
||||
"Mod+2".action.focus-workspace = 2;
|
||||
"Mod+3".action.focus-workspace = 3;
|
||||
"Mod+4".action.focus-workspace = 4;
|
||||
"Mod+5".action.focus-workspace = 5;
|
||||
"Mod+6".action.focus-workspace = 6;
|
||||
"Mod+7".action.focus-workspace = 7;
|
||||
"Mod+8".action.focus-workspace = 8;
|
||||
"Mod+9".action.focus-workspace = 9;
|
||||
"Mod+Ctrl+1".action.move-column-to-workspace = 1;
|
||||
"Mod+Ctrl+2".action.move-column-to-workspace = 2;
|
||||
"Mod+Ctrl+3".action.move-column-to-workspace = 3;
|
||||
"Mod+Ctrl+4".action.move-column-to-workspace = 4;
|
||||
"Mod+Ctrl+5".action.move-column-to-workspace = 5;
|
||||
"Mod+Ctrl+6".action.move-column-to-workspace = 6;
|
||||
"Mod+Ctrl+7".action.move-column-to-workspace = 7;
|
||||
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
|
||||
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
|
||||
|
||||
"Mod+Comma".action.consume-window-into-column = { };
|
||||
"Mod+Period".action.expel-window-from-column = { };
|
||||
|
||||
"Mod+R".action.switch-preset-column-width = { };
|
||||
"Mod+Shift+R".action.reset-window-height = { };
|
||||
"Mod+F".action.maximize-column = { };
|
||||
"Mod+Shift+F".action.fullscreen-window = { };
|
||||
"Mod+C".action.center-column = { };
|
||||
|
||||
"Mod+Minus".action.set-column-width = "-10%";
|
||||
"Mod+Equal".action.set-column-width = "+10%";
|
||||
|
||||
"Mod+Shift+Minus".action.set-window-height = "-10%";
|
||||
"Mod+Shift+Equal".action.set-window-height = "+10%";
|
||||
|
||||
"Print".action.screenshot = { };
|
||||
"Ctrl+Print".action.screenshot-screen = { };
|
||||
"Alt+Print".action.screenshot-window = { };
|
||||
|
||||
"Mod+Shift+E".action.quit = { };
|
||||
|
||||
"Mod+Shift+P".action.power-off-monitors = { };
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.niri.homeManager;
|
||||
defaultKeyBind = import ./defaultKeyBind.nix;
|
||||
in
|
||||
{
|
||||
options.my.applications.niri.homeManager = {
|
||||
enable = lib.mkEnableOption "niri home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
inputs.niri-flake.homeModules.niri
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.niri.package = pkgs.niri;
|
||||
|
||||
programs.niri.settings = {
|
||||
input.touchpad = {
|
||||
natural-scroll = true;
|
||||
scroll-factor = 4.0;
|
||||
scroll-method = "two-finger";
|
||||
click-method = "clickfinger";
|
||||
drag = true;
|
||||
drag-lock = true;
|
||||
};
|
||||
|
||||
input.keyboard.xkb = {
|
||||
layout = "jp";
|
||||
options = "ctrl:nocaps";
|
||||
};
|
||||
|
||||
spawn-at-startup = [
|
||||
{ command = [ "noctalia-shell" ]; }
|
||||
];
|
||||
|
||||
outputs."eDP-1".scale = 1;
|
||||
cursor.size = 16;
|
||||
|
||||
layout = {
|
||||
focus-ring = {
|
||||
active.color = "#bd93f9";
|
||||
inactive.color = "#6272a4";
|
||||
};
|
||||
border = {
|
||||
active.color = "#ffc87f";
|
||||
inactive.color = "#505050";
|
||||
urgent.color = "#9b0000";
|
||||
};
|
||||
shadow = {
|
||||
color = "#0007";
|
||||
};
|
||||
};
|
||||
|
||||
binds = defaultKeyBind // {
|
||||
"Mod+T" = {
|
||||
action.spawn = "ghostty";
|
||||
hotkey-overlay.title = "Open a Terminal: ghostty";
|
||||
};
|
||||
"Mod+D" = {
|
||||
action.spawn = [
|
||||
"vicinae"
|
||||
"toggle"
|
||||
];
|
||||
hotkey-overlay.title = "Run an Application: vicinae";
|
||||
};
|
||||
"Mod+Space" = {
|
||||
action.spawn = [
|
||||
"vicinae"
|
||||
"toggle"
|
||||
];
|
||||
hotkey-overlay.title = "Run an Application: vicinae";
|
||||
};
|
||||
"Mod+E" = {
|
||||
action.spawn = [
|
||||
"nautilus"
|
||||
"--new-window"
|
||||
];
|
||||
hotkey-overlay.title = "Open File Manager: nautilus";
|
||||
};
|
||||
"Mod+L" = {
|
||||
action.spawn = [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"sessionMenu"
|
||||
"lockAndSuspend"
|
||||
];
|
||||
hotkey-overlay.title = "Lock the Screen: noctalia";
|
||||
};
|
||||
"Mod+V" = {
|
||||
action.spawn = [
|
||||
"vicinae"
|
||||
"vicinae://extensions/vicinae/clipboard/history"
|
||||
];
|
||||
hotkey-overlay.title = "Clipboard History";
|
||||
};
|
||||
|
||||
"XF86AudioRaiseVolume" = {
|
||||
action.spawn = [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"volume"
|
||||
"increase"
|
||||
];
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
action.spawn = [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"volume"
|
||||
"decrease"
|
||||
];
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
action.spawn = [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"volume"
|
||||
"muteOutput"
|
||||
];
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
action.spawn = [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"volume"
|
||||
"muteInput"
|
||||
];
|
||||
};
|
||||
|
||||
"XF86MonBrightnessUp" = {
|
||||
action.spawn = [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"brightness"
|
||||
"increase"
|
||||
];
|
||||
};
|
||||
"XF86MonBrightnessDown" = {
|
||||
action.spawn = [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"brightness"
|
||||
"decrease"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.niri.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.niri.system = {
|
||||
enable = lib.mkEnableOption "niri system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.niri.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user