feat: improve niri keybinds
This commit is contained in:
parent
d18ad6a2b0
commit
f61b844545
2 changed files with 17 additions and 11 deletions
|
|
@ -20,6 +20,7 @@ in {
|
|||
firefox.enable = mkDefault true;
|
||||
gpg.enable = mkDefault true;
|
||||
niri.enable = mkDefault true;
|
||||
niri.package = mkDefault inputs.niri.packages.${pkgs.system}.niri-unstable;
|
||||
kitty.enable = mkDefault true;
|
||||
nvim.enable = mkDefault true;
|
||||
python.versions."311".enable = mkDefault true;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
}: let
|
||||
cfg = config.my.programs.niri;
|
||||
inherit (config.home-manager.users.moritz.lib.niri) actions;
|
||||
inherit (lib) mkEnableOption getExe mkIf;
|
||||
inherit (lib) mkEnableOption getExe mkIf mkPackageOption;
|
||||
in {
|
||||
imports = [
|
||||
inputs.niri.nixosModules.niri
|
||||
|
|
@ -19,6 +19,7 @@ in {
|
|||
// {
|
||||
default = true;
|
||||
};
|
||||
options.my.programs.niri.package = mkPackageOption pkgs "niri" {};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.users.moritz.packages = with pkgs; [
|
||||
|
|
@ -34,7 +35,7 @@ in {
|
|||
security.pam.services.swaylock = {};
|
||||
|
||||
programs.niri.enable = true;
|
||||
programs.niri.package = pkgs.niri;
|
||||
programs.niri.package = cfg.package;
|
||||
|
||||
my = {
|
||||
programs = {
|
||||
|
|
@ -137,18 +138,23 @@ in {
|
|||
|
||||
# resizing / swapping / switching
|
||||
"Mod+F".action = actions.fullscreen-window;
|
||||
"Mod+Shift+F".action = actions.toggle-windowed-fullscreen;
|
||||
"Mod+O".action = actions.toggle-overview;
|
||||
|
||||
"Mod+Shift+H".action.set-column-width = "-5%";
|
||||
"Mod+Shift+L".action.set-column-width = "+5%";
|
||||
"Mod+H".action = actions.focus-window-up-or-column-left;
|
||||
"Mod+J".action = actions.focus-window-or-workspace-down;
|
||||
"Mod+L".action = actions.focus-window-down-or-column-right;
|
||||
"Mod+K".action = actions.focus-window-or-workspace-up;
|
||||
|
||||
"Mod+J".action = actions.focus-window-down-or-column-right;
|
||||
"Mod+K".action = actions.focus-window-up-or-column-left;
|
||||
|
||||
"Mod+H".action = actions.move-column-left-or-to-monitor-left;
|
||||
"Mod+L".action = actions.move-column-right-or-to-monitor-right;
|
||||
"Mod+Shift+H".action = actions.move-column-left-or-to-monitor-left;
|
||||
"Mod+Shift+J".action = actions.move-window-down-or-to-workspace-down;
|
||||
"Mod+Shift+K".action = actions.move-column-right-or-to-monitor-right;
|
||||
"Mod+Shift+L".action = actions.move-window-up-or-to-workspace-up;
|
||||
|
||||
"Mod+W".action.spawn = ["pkill" "-USR1" "waybar"];
|
||||
|
||||
"Mod+S".action = actions.screenshot;
|
||||
|
||||
"Mod+C".action = actions.consume-window-into-column;
|
||||
"Mod+E".action = actions.expel-window-from-column;
|
||||
|
||||
|
|
@ -185,7 +191,6 @@ in {
|
|||
"XF86_AudioMute".action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"];
|
||||
"XF86AudioRaiseVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+" "-l" "1.0"];
|
||||
"XF86AudioLowerVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"];
|
||||
# TODO(mangoiv): mic mute toggle
|
||||
};
|
||||
environment = {
|
||||
DISPLAY = ":0";
|
||||
|
|
@ -195,8 +200,8 @@ in {
|
|||
focus-ring.enable = false;
|
||||
default-column-width.proportion = 2.0 / 3.0;
|
||||
preset-column-widths = [
|
||||
{proportion = 1.0 / 1.0;}
|
||||
{proportion = 1.0 / 3.0;}
|
||||
{proportion = 1.0 / 1.0;}
|
||||
{proportion = 2.0 / 3.0;}
|
||||
];
|
||||
gaps = 3;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue