Skip to content

Commit

Permalink
Add niri config
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanReeve committed May 17, 2024
1 parent 511da58 commit ea3d1f8
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "dynamic-wallpaper"]
path = dynamic-wallpaper
url = https://github.com/adi1090x/dynamic-wallpaper.git
[submodule "scripts/nu_scripts"]
path = scripts/nu_scripts
url = https://github.com/nushell/nu_scripts
49 changes: 49 additions & 0 deletions dotfiles/niri.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{ config, pkgs, inputs, lib, ... }: {
imports = [ inputs.niri.homeModules.niri ];

options.app.niri.enable = lib.mkEnableOption "niri";

config = lib.mkIf (config.app.niri.enable) {
programs.niri = {
enable = true;
settings = {
binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c";
in {
# First Key Row
"Super+Space".action = spawn "${pkgs.rofi-wayland}/bin/rofi" "-show" "drun";
"Super+W".action = spawn "${pkgs.kitty}/bin/kitty";
"Super+E".action = spawn "${pkgs.chromium}/bin/chromium";
"Super+R".action = close-window;

# Quit Niri
"Super+Shift+Q".action = quit;

# # Lock Session
# "Super+L".action = spawn "${pkgs.systemd}/bin/loginctl" "lock-session";

# Screenshotting
"Print".action = screenshot;

# Workspackes
"Super+0".action = focus-workspace 0;
"Super+1".action = focus-workspace 1;
"Super+2".action = focus-workspace 2;
"Super+3".action = focus-workspace 3;
"Super+4".action = focus-workspace 4;
"Super+5".action = focus-workspace 5;
"Super+6".action = focus-workspace 6;
"Super+7".action = focus-workspace 7;
"Super+8".action = focus-workspace 8;
"Super+9".action = focus-workspace 9;


# Special Keys
"XF86AudioRaiseVolume".action = sh "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
"XF86AudioLowerVolume".action = sh "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-";
"XF86AudioMute".action = sh "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
};
};
};
};
}
1 change: 1 addition & 0 deletions scripts/nu_scripts
Submodule nu_scripts added at 8a77d5

0 comments on commit ea3d1f8

Please sign in to comment.