Add zsh functions, start tmux right on start.
This commit is contained in:
parent
c926deac3d
commit
b97d67044d
2 changed files with 62 additions and 0 deletions
|
@ -17,6 +17,17 @@
|
|||
|
||||
dotDir = ".config/zsh";
|
||||
|
||||
shellAliases = {
|
||||
grep = "grep --color=auto";
|
||||
cp = "cp -iv";
|
||||
rm = "rm -iv";
|
||||
mkd = "mkdir -pv";
|
||||
less = "less -R";
|
||||
nnn = ''LC_COLLATE="C" nnn -xeaiH'';
|
||||
df = "df -h -x devtmpfs -x tmpfs -x usbfs -x loop";
|
||||
free = "free -mht";
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
# VI Mode escape timeout fix
|
||||
export KEYTIMEOUT=1
|
||||
|
@ -27,6 +38,10 @@
|
|||
bindkey -M vicmd 'k' history-substring-search-up
|
||||
bindkey -M vicmd 'j' history-substring-search-down
|
||||
|
||||
[[ -f "$HOME/.config/zsh/functions.zsh" ]] && source "$HOME/.config/zsh/functions.zsh"
|
||||
'';
|
||||
|
||||
initExtraFirst = ''
|
||||
# Tmux autostart
|
||||
if [ -x "$(command -v tmux)" ] && [ -n "$DISPLAY" ] && [ -z "$TMUX" ]; then
|
||||
exec tmux new-session -A -s default >/dev/null 2>&1
|
||||
|
@ -46,5 +61,9 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
# Link my functions file to ~/.config/zsh/functions.zsh
|
||||
home.file = {
|
||||
".config/zsh/functions.zsh".source = ./configs/zsh-functions.zsh;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue