mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 06:28:11 +09:00
niri
This commit is contained in:
@@ -0,0 +1,232 @@
|
||||
{
|
||||
"Mod+Shift+Slash".action.show-hotkey-overlay = { };
|
||||
|
||||
"Mod+T" = {
|
||||
hotkey-overlay.title = "Open a Terminal: alacritty";
|
||||
action.spawn = "alacritty";
|
||||
};
|
||||
"Mod+D" = {
|
||||
hotkey-overlay.title = "Run an Application: fuzzel";
|
||||
action.spawn = "fuzzel";
|
||||
};
|
||||
"Super+Alt+L" = {
|
||||
hotkey-overlay.title = "Lock the Screen: swaylock";
|
||||
action.spawn = "swaylock";
|
||||
};
|
||||
"Super+Alt+S" = {
|
||||
allow-when-locked = true;
|
||||
hotkey-overlay.hidden = true;
|
||||
action.spawn-sh = "pkill orca || exec orca";
|
||||
};
|
||||
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0";
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-";
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
};
|
||||
|
||||
"XF86AudioPlay" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn-sh = "playerctl play-pause";
|
||||
};
|
||||
"XF86AudioPause" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn-sh = "playerctl play-pause";
|
||||
};
|
||||
"XF86AudioStop" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn-sh = "playerctl stop";
|
||||
};
|
||||
"XF86AudioPrev" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn-sh = "playerctl previous";
|
||||
};
|
||||
"XF86AudioNext" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn-sh = "playerctl next";
|
||||
};
|
||||
|
||||
"XF86MonBrightnessUp" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"brightnessctl"
|
||||
"--class=backlight"
|
||||
"set"
|
||||
"+10%"
|
||||
];
|
||||
};
|
||||
"XF86MonBrightnessDown" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"brightnessctl"
|
||||
"--class=backlight"
|
||||
"set"
|
||||
"10%-"
|
||||
];
|
||||
};
|
||||
|
||||
"Mod+O" = {
|
||||
repeat = false;
|
||||
action.toggle-overview = { };
|
||||
};
|
||||
|
||||
"Mod+Q" = {
|
||||
repeat = false;
|
||||
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+BracketLeft".action.consume-or-expel-window-left = { };
|
||||
"Mod+BracketRight".action.consume-or-expel-window-right = { };
|
||||
|
||||
"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.switch-preset-column-width-back = { };
|
||||
"Mod+Ctrl+Shift+R".action.switch-preset-window-height = { };
|
||||
"Mod+Ctrl+R".action.reset-window-height = { };
|
||||
|
||||
"Mod+F".action.maximize-column = { };
|
||||
"Mod+Shift+F".action.fullscreen-window = { };
|
||||
"Mod+M".action.maximize-window-to-edges = { };
|
||||
"Mod+Ctrl+F".action.expand-column-to-available-width = { };
|
||||
|
||||
"Mod+C".action.center-column = { };
|
||||
"Mod+Ctrl+C".action.center-visible-columns = { };
|
||||
|
||||
"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%";
|
||||
|
||||
"Mod+V".action.toggle-window-floating = { };
|
||||
"Mod+Shift+V".action.switch-focus-between-floating-and-tiling = { };
|
||||
|
||||
"Mod+W".action.toggle-column-tabbed-display = { };
|
||||
|
||||
"Print".action.screenshot = { };
|
||||
"Ctrl+Print".action.screenshot-screen = { };
|
||||
"Alt+Print".action.screenshot-window = { };
|
||||
|
||||
"Mod+Escape" = {
|
||||
allow-inhibiting = false;
|
||||
action.toggle-keyboard-shortcuts-inhibit = { };
|
||||
};
|
||||
|
||||
"Mod+Shift+E".action.quit = { };
|
||||
"Ctrl+Alt+Delete".action.quit = { };
|
||||
|
||||
"Mod+Shift+P".action.power-off-monitors = { };
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
keybindings = import ./keybindings.nix;
|
||||
in
|
||||
{
|
||||
programs.niri.settings = {
|
||||
|
||||
binds = keybindings // {
|
||||
# niri window or focus move
|
||||
"Mod+Shift+Left" = {
|
||||
action.focus-monitor-left = [ ];
|
||||
hotkey-overlay.title = "Focus Monitor Left";
|
||||
};
|
||||
"Mod+Shift+Right" = {
|
||||
action.focus-monitor-right = [ ];
|
||||
hotkey-overlay.title = "Focus Monitor Right";
|
||||
};
|
||||
"Mod+Shift+Up" = {
|
||||
action.focus-monitor-up = [ ];
|
||||
hotkey-overlay.title = "Focus Monitor Up";
|
||||
};
|
||||
"Mod+Shift+Down" = {
|
||||
action.focus-monitor-down = [ ];
|
||||
hotkey-overlay.title = "Focus Monitor Down";
|
||||
};
|
||||
|
||||
"Mod+Shift+Ctrl+Left" = {
|
||||
action.move-window-to-monitor-left = [ ];
|
||||
hotkey-overlay.title = "Move Window to Monitor Left";
|
||||
};
|
||||
"Mod+Shift+Ctrl+Right" = {
|
||||
action.move-window-to-monitor-right = [ ];
|
||||
hotkey-overlay.title = "Move Window to Monitor Right";
|
||||
};
|
||||
"Mod+Shift+Ctrl+Up" = {
|
||||
action.move-window-to-monitor-up = [ ];
|
||||
hotkey-overlay.title = "Move Window to Monitor Up";
|
||||
};
|
||||
"Mod+Shift+Ctrl+Down" = {
|
||||
action.move-window-to-monitor-down = [ ];
|
||||
hotkey-overlay.title = "Move Window to Monitor Down";
|
||||
};
|
||||
|
||||
# spawn applications (sync with labwc modules/applications/labwc/home.nix)
|
||||
"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+S" = {
|
||||
action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"panel-toggle"
|
||||
"launcher"
|
||||
];
|
||||
hotkey-overlay.title = "Run an Application: Noctalia Launcher";
|
||||
};
|
||||
"Mod+E" = {
|
||||
action.spawn = [
|
||||
"nautilus"
|
||||
"--new-window"
|
||||
];
|
||||
hotkey-overlay.title = "Open File Manager: nautilus";
|
||||
};
|
||||
"Mod+L" = {
|
||||
action.spawn = [
|
||||
(lib.getExe' pkgs.systemd "loginctl")
|
||||
"lock-session"
|
||||
];
|
||||
hotkey-overlay.title = "Lock the Screen";
|
||||
};
|
||||
"Mod+V" = {
|
||||
action.spawn = [
|
||||
"vicinae"
|
||||
"vicinae://launch/clipboard/history?toggle=true"
|
||||
];
|
||||
hotkey-overlay.title = "Clipboard History";
|
||||
};
|
||||
"Mod+Space" = {
|
||||
action.spawn = [
|
||||
"ghostty"
|
||||
"+toggle-quick-terminal"
|
||||
];
|
||||
hotkey-overlay.title = "Toggle Quick Terminal: ghostty";
|
||||
};
|
||||
"Mod+P" = {
|
||||
action.spawn = "wdisplays";
|
||||
hotkey-overlay.title = "Display Settings: wdisplays";
|
||||
};
|
||||
|
||||
# Function keys (sync with labwc modules/applications/labwc/home.nix)
|
||||
"XF86AudioRaiseVolume".action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"volume-up"
|
||||
];
|
||||
"XF86AudioLowerVolume".action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"volume-down"
|
||||
];
|
||||
"XF86AudioMute".action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"volume-mute"
|
||||
];
|
||||
"XF86AudioMicMute".action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"mic-mute"
|
||||
];
|
||||
"XF86MonBrightnessUp".action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"brightness-up"
|
||||
];
|
||||
"XF86MonBrightnessDown".action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"brightness-down"
|
||||
];
|
||||
"XF86Favorites".action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"caffeine-toggle"
|
||||
];
|
||||
"XF86AudioPlay".action.spawn = [
|
||||
"playerctl"
|
||||
"play-pause"
|
||||
];
|
||||
"XF86AudioPause".action.spawn = [
|
||||
"playerctl"
|
||||
"play-pause"
|
||||
];
|
||||
"XF86AudioStop".action.spawn = [
|
||||
"playerctl"
|
||||
"stop"
|
||||
];
|
||||
"XF86AudioPrev".action.spawn = [
|
||||
"playerctl"
|
||||
"previous"
|
||||
];
|
||||
"XF86AudioNext".action.spawn = [
|
||||
"playerctl"
|
||||
"next"
|
||||
];
|
||||
"XF86Display".action.spawn = [
|
||||
"wdisplays"
|
||||
];
|
||||
};
|
||||
|
||||
input = {
|
||||
touchpad = {
|
||||
natural-scroll = true;
|
||||
scroll-factor = 4.0;
|
||||
scroll-method = "two-finger";
|
||||
click-method = "clickfinger";
|
||||
drag = true;
|
||||
drag-lock = true;
|
||||
dwt = true;
|
||||
};
|
||||
|
||||
keyboard = {
|
||||
numlock = true;
|
||||
|
||||
xkb = {
|
||||
layout = "jp";
|
||||
options = "ctrl:nocaps";
|
||||
};
|
||||
};
|
||||
|
||||
mouse = {
|
||||
accel-profile = "flat";
|
||||
accel-speed = -0.1;
|
||||
};
|
||||
trackpoint = {
|
||||
accel-profile = "flat";
|
||||
accel-speed = -0.1;
|
||||
};
|
||||
|
||||
warp-mouse-to-focus.enable = true;
|
||||
focus-follows-mouse = {
|
||||
enable = true;
|
||||
max-scroll-amount = "0%";
|
||||
};
|
||||
};
|
||||
|
||||
cursor.size = 16;
|
||||
|
||||
layout = {
|
||||
focus-ring = {
|
||||
active.color = "#bd93f9";
|
||||
inactive.color = "#6272a4";
|
||||
};
|
||||
background-color = "transparent";
|
||||
};
|
||||
|
||||
window-rules = [
|
||||
{
|
||||
geometry-corner-radius = {
|
||||
top-left = 8.0;
|
||||
top-right = 8.0;
|
||||
bottom-left = 8.0;
|
||||
bottom-right = 8.0;
|
||||
};
|
||||
clip-to-geometry = true;
|
||||
}
|
||||
{
|
||||
matches = [ { app-id = "^dev\\.noctalia\\.Noctalia$"; } ];
|
||||
open-floating = true;
|
||||
default-column-width.fixed = 1080;
|
||||
default-window-height.fixed = 920;
|
||||
}
|
||||
{
|
||||
# Zoom presents these two fixed-size primary windows. Explicitly keep
|
||||
# them tiled, overriding Niri's automatic fixed-size-window floating.
|
||||
matches = [
|
||||
{
|
||||
app-id = "^(?i:zoom)$";
|
||||
title = "^(?i:zoom workplace)$";
|
||||
}
|
||||
{
|
||||
app-id = "^(?i:zoom)$";
|
||||
title = "^ミーティング$";
|
||||
}
|
||||
];
|
||||
open-floating = false;
|
||||
}
|
||||
{
|
||||
# Zoom's screen-share controls are a toolbar, so open them where the
|
||||
# client expects them rather than in the middle of the workspace.
|
||||
matches = [
|
||||
{
|
||||
app-id = "^(?i:zoom)$";
|
||||
title = "^as_toolbar$";
|
||||
}
|
||||
];
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = 0;
|
||||
y = 8;
|
||||
relative-to = "top";
|
||||
};
|
||||
}
|
||||
{
|
||||
# Keep all other Zoom auxiliary windows freely positionable.
|
||||
matches = [ { app-id = "^(?i:zoom)$"; } ];
|
||||
excludes = [
|
||||
{ title = "^(?i:zoom workplace)$"; }
|
||||
{ title = "^ミーティング$"; }
|
||||
];
|
||||
open-floating = true;
|
||||
}
|
||||
];
|
||||
|
||||
layer-rules = [
|
||||
{
|
||||
matches = [ { namespace = "^noctalia-wallpaper"; } ];
|
||||
place-within-backdrop = true;
|
||||
}
|
||||
];
|
||||
|
||||
overview.workspace-shadow.enable = false;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user