mirror of
https://github.com/nix-community/plasma-manager.git
synced 2024-09-11 18:06:28 +03:00
modules/kwin: init and add titlebar buttons options
This commit is contained in:
parent
32ee6377e6
commit
0f38c34581
@ -8,6 +8,7 @@
|
||||
./spectacle.nix
|
||||
./windows.nix
|
||||
./workspace.nix
|
||||
./kwin.nix
|
||||
];
|
||||
|
||||
options.programs.plasma.enable = lib.mkEnableOption ''
|
||||
|
43
modules/kwin.nix
Normal file
43
modules/kwin.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.plasma;
|
||||
in
|
||||
{
|
||||
options.programs.plasma.kwin = {
|
||||
titlebarButtons.right = mkOption {
|
||||
type = with types; nullOr (listOf str);
|
||||
default = null;
|
||||
example = [ "H" "I" "A" "X" ];
|
||||
description = ''
|
||||
Title bar buttons to be placed on the right.
|
||||
'';
|
||||
};
|
||||
titlebarButtons.left = mkOption {
|
||||
type = with types; nullOr (listOf str);
|
||||
default = null;
|
||||
example = [ "S" "F" ];
|
||||
description = ''
|
||||
Title bar buttons to be placed on the left.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
# Titlebar buttons
|
||||
programs.plasma.configFile."kwinrc"."org\\.kde\\.kdecoration2" = mkMerge [
|
||||
(
|
||||
mkIf (cfg.kwin.titlebarButtons.left != null) {
|
||||
"ButtonsOnLeft" = strings.concatStrings cfg.kwin.titlebarButtons.left;
|
||||
}
|
||||
)
|
||||
(
|
||||
mkIf (cfg.kwin.titlebarButtons.right != null) {
|
||||
"ButtonsOnRight" = strings.concatStrings cfg.kwin.titlebarButtons.right;
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user