diff --git a/options/custom/desktops/niri/binds.nix b/options/custom/desktops/niri/binds.nix index e8accf7..8ec5ef9 100644 --- a/options/custom/desktops/niri/binds.nix +++ b/options/custom/desktops/niri/binds.nix @@ -12,6 +12,7 @@ with lib; let bash = "${pkgs.bash}/bin/bash"; cat = "${pkgs.coreutils}/bin/cat"; codium = "${config.home-manager.users.${config.custom.username}.programs.vscode.package}/bin/codium"; + ghostty = "${hm.programs.ghostty.package}/bin/ghostty"; hyprlock = "${config.home-manager.users.${config.custom.username}.programs.hyprlock.package}/bin/hyprlock"; hyprpicker = "${pkgs.hyprpicker}/bin/hyprpicker"; inhibit = config.home-manager.users.${config.custom.username}.home.file.".local/bin/inhibit".source; @@ -60,11 +61,11 @@ in { }; # Launch VM - vm = ''${remote} --vm --client xfreerdp --username Myned --password "$(${cat} ${config.age.secrets."desktop/vm/myndows.pass".path})" ${ - if config.custom.hidpi - then "--scale 140" - else "" - } myndows''; + vm = [ + bash + "-c" + ''${remote} --vm --client sdl-freerdp --username Myned --password "$(${cat} ${config.age.secrets."desktop/vm/myndows.pass".path})" myndows'' + ]; in listToAttrs (with hm.lib.niri.actions; [ (key "0" "Mod" (spawn [swayosd-client "--output-volume" "mute-toggle"])) @@ -147,8 +148,8 @@ in { (key "Slash" "Mod+Shift" show-hotkey-overlay) (key "Space" "Ctrl+Alt" (spawn ["lifx" "toggle"])) (key "Space" "Ctrl+Alt" (spawn ["lifx" "toggle"])) - (key "T" "Ctrl+Alt" (spawn [pkill "kitty"])) - (key "T" "Mod" (spawn kitty)) + (key "T" "Ctrl+Alt" (spawn [pkill "ghostty"])) + (key "T" "Mod" (spawn ghostty)) (key "Tab" "Mod" switch-focus-between-floating-and-tiling) (key "Up" "Mod" (spawn [swayosd-client "--brightness" "raise"])) (key "V" "Mod" (spawn virt-manager)) diff --git a/options/custom/desktops/niri/default.nix b/options/custom/desktops/niri/default.nix index 47ae1a3..ffe82e7 100644 --- a/options/custom/desktops/niri/default.nix +++ b/options/custom/desktops/niri/default.nix @@ -97,6 +97,11 @@ in { (leaf "open-floating" true) (leaf "open-focused" false) ]) + + (plain "window-rule" [ + (leaf "match" {app-id = "^(sdl-|wl|x)freerdp$";}) + (leaf "open-floating" false) + ]) ]); # https://github.com/YaLTeR/niri/wiki/Configuration:-Debug-Options diff --git a/options/custom/desktops/niri/layout.nix b/options/custom/desktops/niri/layout.nix index ba26a69..bc1ca9d 100644 --- a/options/custom/desktops/niri/layout.nix +++ b/options/custom/desktops/niri/layout.nix @@ -32,7 +32,10 @@ in { #// center-focused-column = mkIf config.custom.ultrawide "always"; # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutdefault-column-width - default-column-width.proportion = 3.0 / 10.0; # 30% + default-column-width.proportion = + if config.custom.ultrawide + then 0.3 # 30% + else 0.6; # 60% # TODO: Uncomment after next release > v1.10.1 #// empty-workspace-above-first = true; @@ -56,21 +59,21 @@ in { # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutpreset-column-widths preset-column-widths = [ - {proportion = 3.0 / 10.0;} # 30%, default - {proportion = 4.0 / 10.0;} # 40% - {proportion = 5.0 / 10.0;} # 50% - {proportion = 6.0 / 10.0;} # 60% - {proportion = 7.0 / 10.0;} # 70% + {proportion = 0.3;} # 30%, default + {proportion = 0.4;} # 40% + {proportion = 0.5;} # 50% + {proportion = 0.6;} # 60% + {proportion = 0.7;} # 70% ]; # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutpreset-window-heights preset-window-heights = [ - {proportion = 7.0 / 10.0;} # 70% - {proportion = 6.0 / 10.0;} # 60% - {proportion = 5.0 / 10.0;} # 50% - {proportion = 4.0 / 10.0;} # 40% - {proportion = 3.0 / 10.0;} # 30% - {proportion = 10.0 / 10.0;} # 100%, default + {proportion = 0.7;} # 70% + {proportion = 0.6;} # 60% + {proportion = 0.5;} # 50% + {proportion = 0.4;} # 40% + {proportion = 0.3;} # 30% + {proportion = 1.0;} # 100%, default ]; # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutstruts diff --git a/options/custom/desktops/niri/rules.nix b/options/custom/desktops/niri/rules.nix index d10ffd8..2ae2587 100644 --- a/options/custom/desktops/niri/rules.nix +++ b/options/custom/desktops/niri/rules.nix @@ -63,6 +63,11 @@ in { {app-id = "^vivaldi.*$";} ]; + default-column-width.proportion = + if config.custom.ultrawide + then 0.4 + else 0.7; + #// open-on-workspace = "2"; }