simplify some things and remove some unused code

This commit is contained in:
xunuwu 2025-01-12 15:16:01 +01:00
parent 931efc7518
commit 6cf86a3827
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
144 changed files with 251 additions and 3912 deletions

View file

@ -1,3 +1,12 @@
{
programs.nix-index-database.comma.enable = true;
{inputs, ...}: {
imports = [inputs.nix-index-database.hmModules.nix-index];
programs = {
nix-index-database.comma.enable = true;
nix-index = {
enableBashIntegration = false;
enableFishIntegration = false;
enableZshIntegration = false;
};
};
}

View file

@ -18,6 +18,8 @@
extraConfig = {
gpg.format = "ssh";
push.autoSetupRemote = true;
pull.rebase = true;
rebase.autostash = true;
};
userEmail = "xunuwu@gmail.com";

View file

@ -16,6 +16,9 @@
set -g status-interval 5
set -g status-right "#[fg=#25be6a]#(free -h | awk 'NR==2{print $3\"/\"$2}')"
set -ag status-right "#[fg=default] %a %d %b %H:%M"
set-option -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
'';
};
}

View file

@ -1,5 +0,0 @@
{
programs.zellij = {
enable = true;
};
}

View file

@ -1,6 +1,4 @@
{config, ...}: {
programs.fzf.enable = true;
programs.zsh = {
enable = true;
autocd = true;
@ -11,6 +9,8 @@
history = {
expireDuplicatesFirst = true;
extended = true;
save = 100 * 1000;
path = "${config.xdg.dataHome}/zsh_history";
};
initExtra = ''
@ -41,13 +41,31 @@
## PROMPT ##
function preexec() {
timer=$(date +%s%3N)
}
function precmd_timer() {
if [ $timer ]; then
now=$(date +%s%3N)
elapsed=$(($now-$timer))
if [[ elapsed -gt 100 ]]; then
export RPROMPT="%F{cyan}''${elapsed}ms %f"
else
unset RPROMPT
fi
unset timer
fi
}
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
precmd_functions+=( precmd_vcs_info precmd_timer )
zstyle ':vcs_info:git:*' formats ' %b '
setopt prompt_subst
PROMPT="%F{blue}[%F{magenta}%n%F{blue}@%F{magenta}%M%F{blue}] %~%f %F{green}\$vcs_info_msg_0_%f%(?..%F{red}| %? )%#%f "
PROMPT='%F{blue}[%F{magenta}%n%F{blue}@%F{magenta}%M%F{blue}] %~%f %F{green}$vcs_info_msg_0_%f%(?..%F{red}| %? )%#%f '
'';
};
}