aboutsummaryrefslogtreecommitdiff
path: root/share/home/niri.nix
diff options
context:
space:
mode:
Diffstat (limited to 'share/home/niri.nix')
-rw-r--r--share/home/niri.nix101
1 files changed, 81 insertions, 20 deletions
diff --git a/share/home/niri.nix b/share/home/niri.nix
index e63d1d4..583c928 100644
--- a/share/home/niri.nix
+++ b/share/home/niri.nix
@@ -91,28 +91,89 @@ in
screenshot-path = null; # clipboard only
- window-rules = [
- # Open the Firefox picture-in-picture player as floating by default.
- {
- matches = [ { title = "^Picture-in-Picture$"; } ];
- open-floating = true;
- }
+ workspaces = {
+ "01-dev-1" = {
+ name = "dev-1";
+ open-on-output = "eDP-1";
+ };
+ "02-dev-2" = {
+ name = "dev-2";
+ open-on-output = "eDP-1";
+ };
+ "03-web" = {
+ name = "web";
+ open-on-output = "eDP-1";
+ };
+ "04-chat" = {
+ name = "chat";
+ open-on-output = "eDP-1";
+ };
+ "05-email" = {
+ name = "email";
+ open-on-output = "eDP-1";
+ };
+ "06-misc-1" = {
+ name = "misc-1";
+ open-on-output = "eDP-1";
+ };
+ "07-misc-2" = {
+ name = "misc-2";
+ open-on-output = "eDP-1";
+ };
+ "08-misc-3" = {
+ name = "misc-3";
+ open-on-output = "eDP-1";
+ };
+ "09-misc-4" = {
+ name = "misc-4";
+ open-on-output = "eDP-1";
+ };
+ "10-misc-5" = {
+ name = "misc-5";
+ open-on-output = "eDP-1";
+ };
+ };
- # Work around WezTerm's initial configure bug by setting an empty default-column-width.
- {
- matches = [ { app-id = ''^org\.wezfurlong\.wezterm$''; } ];
- default-column-width = null;
- }
+ window-rules =
+ let
+ default-workspace = app-id: workspace: {
+ matches = [
+ {
+ at-startup = true;
+ inherit app-id;
+ }
+ ];
+ open-on-workspace = workspace;
+ };
+ in
+ [
+ # Open the Firefox picture-in-picture player as floating by default.
+ {
+ matches = [ { title = "^Picture-in-Picture$"; } ];
+ open-floating = true;
+ }
- {
- matches = [
- { app-id = ''^org\.keepassxc\.KeePassXC$''; }
- { app-id = ''^org\.gnome\.World\.Secrets$''; }
- { app-id = ''^Bitwarden$''; }
- ];
- block-out-from = "screen-capture";
- }
- ];
+ # Work around WezTerm's initial configure bug by setting an empty default-column-width.
+ {
+ matches = [ { app-id = ''^org\.wezfurlong\.wezterm$''; } ];
+ default-column-width = null;
+ }
+
+ {
+ matches = [
+ { app-id = ''^org\.keepassxc\.KeePassXC$''; }
+ { app-id = ''^org\.gnome\.World\.Secrets$''; }
+ { app-id = ''^Bitwarden$''; }
+ ];
+ block-out-from = "screen-capture";
+ }
+
+ # Default app positions
+ (default-workspace "^librewolf$" "web")
+ (default-workspace "^discord$" "chat")
+ (default-workspace "^thunderbird$" "email")
+ (default-workspace "^Bitwarden$" "misc-1")
+ ];
binds = with config.lib.niri.actions; {
# Shows a list of important hotkeys