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 = { programs.zsh = {
shellAliases.cat = "bat --theme=\"$(dark-mode-ternary 'Catppuccin Mocha' 'Catppuccin Latte')\"";
initExtra = '' initExtra = ''
zadm_sync() { zadm_sync() {
export STARSHIP_CONFIG__PALETTE="catppuccin_$(dark-mode-ternary mocha latte)" 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 fast-theme "XDG:catppuccin-$(dark-mode-ternary mocha latte)" >/dev/null
} }
add-zsh-hook precmd zadm_sync add-zsh-hook precmd zadm_sync

View file

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

View file

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