feat(homeModules/cli): add screensaver timeout
This commit is contained in:
parent
cedba9c4f6
commit
92d7ab9b29
3 changed files with 7 additions and 4 deletions
|
@ -5,7 +5,8 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
cli.shell = "zsh";
|
cli.shell = "zsh";
|
||||||
cli.enableScreensaver = true;
|
cli.screensaver.enable = true;
|
||||||
|
cli.screensaver.timeout = "10";
|
||||||
cli.editor = "nvf";
|
cli.editor = "nvf";
|
||||||
cli.file-browser = "yazi";
|
cli.file-browser = "yazi";
|
||||||
cli.multiplexer = "zellij";
|
cli.multiplexer = "zellij";
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
{
|
{
|
||||||
options.cli = {
|
options.cli = {
|
||||||
shell = lib.pantheon.mkStrOption;
|
shell = lib.pantheon.mkStrOption;
|
||||||
enableScreensaver = lib.mkEnableOption "";
|
screensaver.enable = lib.mkEnableOption "";
|
||||||
|
screensaver.timeout = lib.pantheon.mkStrOption;
|
||||||
editor = lib.pantheon.mkStrOption;
|
editor = lib.pantheon.mkStrOption;
|
||||||
file-browser = lib.pantheon.mkStrOption;
|
file-browser = lib.pantheon.mkStrOption;
|
||||||
multiplexer = lib.pantheon.mkStrOption;
|
multiplexer = lib.pantheon.mkStrOption;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
size = 10000;
|
size = 10000;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.zsh.initContent = lib.mkIf config.cli.enableScreensaver (
|
programs.zsh.initContent = lib.mkIf config.cli.screensaver.enable (
|
||||||
lib.mkOrder 1200
|
lib.mkOrder 1200
|
||||||
# zsh
|
# zsh
|
||||||
''
|
''
|
||||||
|
@ -25,9 +25,10 @@
|
||||||
PROMPT='> '
|
PROMPT='> '
|
||||||
RPROMPT='[%D{%L:%M:%S %p}]'
|
RPROMPT='[%D{%L:%M:%S %p}]'
|
||||||
|
|
||||||
TMOUT=10
|
TMOUT=${config.cli.screensaver.timeout}
|
||||||
|
|
||||||
TRAPALRM() {
|
TRAPALRM() {
|
||||||
|
PROMPT='IDLE > '
|
||||||
zle reset-prompt
|
zle reset-prompt
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue