2022-08-18 19:15:03 +00:00
|
|
|
{ config, lib, pkgs, user, theme, ... }:
|
|
|
|
let
|
|
|
|
zsh_autosuggest_highlight_style = if theme == "light" then "fg=180" else "fg=10";
|
|
|
|
in
|
2022-06-26 12:42:49 +00:00
|
|
|
{
|
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
2022-07-12 19:02:29 +00:00
|
|
|
enableAutosuggestions = true;
|
|
|
|
enableCompletion = true;
|
2022-06-26 12:42:49 +00:00
|
|
|
history.size = 10000;
|
|
|
|
|
2022-09-01 06:05:04 +00:00
|
|
|
initExtra = ''
|
|
|
|
function set_win_title(){
|
2022-09-01 06:21:09 +00:00
|
|
|
local TITLE=$(git config --get remote.origin.url || echo "$PWD")
|
|
|
|
echo -ne "\033]0; $(basename "$TITLE") \007"
|
2022-09-01 06:05:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
precmd_functions+=(set_win_title)
|
|
|
|
'';
|
|
|
|
|
2022-07-13 06:00:58 +00:00
|
|
|
sessionVariables = {
|
2022-08-18 19:15:03 +00:00
|
|
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = zsh_autosuggest_highlight_style;
|
2022-07-13 06:00:58 +00:00
|
|
|
};
|
|
|
|
|
2022-07-07 15:22:12 +00:00
|
|
|
shellAliases = {
|
|
|
|
ls = "exa --group-directories-first --git";
|
2022-07-18 13:02:52 +00:00
|
|
|
neovide = "neovide --multigrid";
|
2022-11-09 07:00:51 +00:00
|
|
|
xclip = "xclip -selection clipboard";
|
2022-07-07 15:22:12 +00:00
|
|
|
};
|
2022-06-26 12:42:49 +00:00
|
|
|
};
|
|
|
|
}
|