feat: per-profile niri preset column widths and default proportion
This commit is contained in:
+20
-4
@@ -1,8 +1,25 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
c = config.theme.colors;
|
||||
proportion = toString config.myConfig.niri.defaultColumnProportion;
|
||||
presetWidths = builtins.concatStringsSep "\n "
|
||||
(map (p: "proportion ${toString p}") config.myConfig.niri.presetColumnWidths);
|
||||
in
|
||||
{
|
||||
options.myConfig.niri = {
|
||||
defaultColumnProportion = lib.mkOption {
|
||||
type = lib.types.float;
|
||||
default = 0.5;
|
||||
description = "Default column width proportion";
|
||||
};
|
||||
presetColumnWidths = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.float;
|
||||
default = [ 0.33333 0.5 0.66667 ];
|
||||
description = "Preset column width proportions";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
home.file.".config/xdg-desktop-portal/portals.conf".text = ''
|
||||
[preferred]
|
||||
default=gtk
|
||||
@@ -39,11 +56,9 @@ in
|
||||
background-color "transparent"
|
||||
center-focused-column "never"
|
||||
preset-column-widths {
|
||||
proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
${presetWidths}
|
||||
}
|
||||
default-column-width { proportion 0.5; }
|
||||
default-column-width { proportion ${proportion}; }
|
||||
border {
|
||||
off
|
||||
width 4
|
||||
@@ -184,4 +199,5 @@ in
|
||||
include "dms/cursor.kdl"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
myConfig.wayland.enable = true;
|
||||
imports = [
|
||||
../modules/kitty.nix
|
||||
../modules/emacs.nix
|
||||
../modules/niri.nix
|
||||
../modules/dms.nix
|
||||
];
|
||||
myConfig.wayland.enable = true;
|
||||
myConfig.niri.defaultColumnProportion = 0.33333;
|
||||
myConfig.niri.presetColumnWidths = [ 0.33333 0.5 0.66667 1.0 ];
|
||||
home.packages = with pkgs; [
|
||||
# desktop specific packages
|
||||
];
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
../modules/dms.nix
|
||||
];
|
||||
myConfig.wayland.enable = true;
|
||||
myConfig.niri.defaultColumnProportion = 1.0;
|
||||
myConfig.niri.presetColumnWidths = [ 0.5 1.0 ];
|
||||
home.packages = with pkgs; [
|
||||
powertop
|
||||
acpi
|
||||
|
||||
Reference in New Issue
Block a user