mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-08-04 11:38:29 -07:00
feat: add textfox
This commit is contained in:
parent
8a0286a3fe
commit
a5e6da58c1
7 changed files with 178 additions and 24 deletions
|
@ -21,6 +21,20 @@ in
|
|||
Whether to set up many default desktop programs.
|
||||
'';
|
||||
};
|
||||
defaultBrowser = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.zen-browser;
|
||||
description = ''
|
||||
Default browser for the system.
|
||||
'';
|
||||
};
|
||||
browserDesktopFile = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "zen.desktop";
|
||||
description = ''
|
||||
Name of desktop file of browser.
|
||||
'';
|
||||
};
|
||||
terminal.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = cfg.enable;
|
||||
|
@ -28,13 +42,6 @@ in
|
|||
Whether to set up kitty terminal.
|
||||
'';
|
||||
};
|
||||
zen.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = cfg.enable;
|
||||
description = ''
|
||||
Whether to install Zen Browser and set it as the default browser.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -73,21 +80,23 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
xdg.mimeApps = lib.mkIf cfg.zen.enable {
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"text/html" = [ "zen.desktop" ];
|
||||
"x-scheme-handler/http" = [ "zen.desktop" ];
|
||||
"x-scheme-handler/https" = [ "zen.desktop" ];
|
||||
"x-scheme-handler/about" = [ "zen.desktop" ];
|
||||
"x-scheme-handler/unknown" = [ "zen.desktop" ];
|
||||
};
|
||||
defaultApplications =
|
||||
let
|
||||
desktopFile = cfg.browserDesktopFile;
|
||||
in
|
||||
{
|
||||
"text/html" = [ desktopFile ];
|
||||
"x-scheme-handler/http" = [ desktopFile ];
|
||||
"x-scheme-handler/https" = [ desktopFile ];
|
||||
"x-scheme-handler/about" = [ desktopFile ];
|
||||
"x-scheme-handler/unknown" = [ desktopFile ];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = lib.mkIf cfg.zen.enable [
|
||||
pkgs.zen-browser
|
||||
];
|
||||
home.packages = [ cfg.defaultBrowser ];
|
||||
|
||||
home.sessionVariables.DEFAULT_BROWSER = lib.mkIf cfg.zen.enable "${lib.getExe pkgs.zen-browser}";
|
||||
home.sessionVariables.DEFAULT_BROWSER = lib.getExe cfg.defaultBrowser;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue