feat(home): move cli config to homes and use home-manager modules
This commit is contained in:
parent
1a3ff4b92a
commit
00e3ea65c8
17 changed files with 198 additions and 271 deletions
42
homes/x86_64-linux/rafiq/cli/shell.nix
Normal file
42
homes/x86_64-linux/rafiq/cli/shell.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
inherit (builtins) toString;
|
||||
inherit (lib) mkOrder;
|
||||
screensaverTimeout = toString 100;
|
||||
screensaverCommand = "${pkgs.cbonsai}/bin/cbonsai -S -w 0.1 -L 40 -M 2 -b 2";
|
||||
in
|
||||
{
|
||||
home.shell.enableShellIntegration = true;
|
||||
home.sessionVariables.SHELL = "zsh";
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableVteIntegration = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
historySubstringSearch.enable = true;
|
||||
history = {
|
||||
append = true;
|
||||
extended = true;
|
||||
ignoreDups = true;
|
||||
ignoreSpace = true;
|
||||
save = 10000;
|
||||
share = true;
|
||||
size = 10000;
|
||||
};
|
||||
};
|
||||
programs.zsh.initContent =
|
||||
mkOrder 1200
|
||||
# zsh
|
||||
''
|
||||
precmd() {
|
||||
TMOUT=${screensaverTimeout}
|
||||
}
|
||||
|
||||
TRAPALRM() {
|
||||
TMOUT=1
|
||||
${screensaverCommand}
|
||||
# If we exit, assume the previous command was exited out of
|
||||
TMOUT=${screensaverTimeout}
|
||||
zle reset-prompt
|
||||
}
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue