feat: various shell improvements

This commit is contained in:
winston 2024-03-13 09:08:27 +01:00
parent f56cb4afa8
commit 75efe54dc0
Signed by: winston
GPG key ID: 3786770EDBC2B481
3 changed files with 11 additions and 6 deletions

View file

@ -40,10 +40,10 @@ in {
};
programs.zsh = {
shellAliases.cat = "bat --theme=\"$(dark-mode-ternary 'Catppuccin Mocha' 'Catppuccin Latte')\"";
initExtra = ''
zadm_sync() {
export STARSHIP_CONFIG__PALETTE="catppuccin_$(dark-mode-ternary mocha latte)"
export BAT_THEME="Catppuccin $(dark-mode-ternary Mocha Latte)"
fast-theme "XDG:catppuccin-$(dark-mode-ternary mocha latte)" >/dev/null
}
add-zsh-hook precmd zadm_sync

View file

@ -61,6 +61,12 @@
'';
};
in {
home.sessionVariables = {
LESS = "-R --use-color";
LESSHISTFILE = "-";
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
};
programs = {
atuin = {
enable = true;
@ -121,6 +127,8 @@ in {
defaultOptions = ["--height=30%" "--layout=reverse" "--info=inline"];
};
less.enable = true;
lsd = {
enable = true;
enableAliases = true;
@ -153,7 +161,7 @@ in {
};
};
nix-index.enable = true;
nix-index-database.comma.enable = true;
starship = {
enable = true;
@ -193,9 +201,6 @@ in {
initExtra = ''
for script in "${./zsh/functions}"/**/*; do source "$script"; done
'';
envExtra = ''
export LESSHISTFILE="-"
'';
dotDir = ".config/zsh";
oh-my-zsh = {
@ -221,6 +226,7 @@ in {
}
];
shellAliases = {
cat = "bat";
cp = "cp -i";
mv = "mv -i";
rm = "rm -i";

View file

@ -13,7 +13,6 @@ in {
_1password
age
age-plugin-yubikey
comma
deno
fd
ffmpeg