Skip to content

Commit

Permalink
Add a module for konsole
Browse files Browse the repository at this point in the history
  • Loading branch information
toast003 committed Feb 11, 2024
1 parent 8facd0b commit 140ef3f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/apps/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ lib, ... }:

{
imports = [
./konsole.nix
];
}
35 changes: 35 additions & 0 deletions modules/apps/konsole.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ config, lib, ... }:

with lib;

let
cfg = config.programs.konsole;
in

{
options.programs.konsole = {
enable = mkEnableOption ''
Enable configuration management for Konsole
'';

defaultProfile = mkOption {
type = with types; nullOr str;
default = null;
example = "Catppuccin";
description = ''
The name of the konsole profile file to use by default
To see what options you have, just take a look at ~/.local/share/konsole/
'';
};
};

config = mkIf (config.programs.plasma.enable && cfg.enable) {
programs.plasma.configFile."konsolerc" = mkMerge [
(
mkIf (cfg.defaultProfile != null ) {
"Desktop entry"."DefaultProfile" = cfg.defaultProfile;
}
)
];
};
}
1 change: 1 addition & 0 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
./kwin.nix
./startup.nix
./panels.nix
./apps
];

options.programs.plasma.enable = lib.mkEnableOption ''
Expand Down

0 comments on commit 140ef3f

Please sign in to comment.