Remaniement : configuration de zsh

This commit is contained in:
Hippolyte Chauvin 2023-06-04 16:24:58 +02:00
parent ae805651ec
commit f3a7fc82d9
4 changed files with 36 additions and 9 deletions

10
etc/zsh/zshrc Normal file
View file

@ -0,0 +1,10 @@
sourcefiles() {
if [ -d "$1" ]; then
for i in "${1}/"*; do
. "$1"
done
fi
}
sourcefiles /usr/local/etc/sh/shrc.d

24
home/zprofile Normal file
View file

@ -0,0 +1,24 @@
# Lines added by ahurac
# Prepenth the local bin directory to the path array
typeset -U path PATH
addpath() {
if [ -d "$1" ]; then
path=("$1" $path)
fi
}
addpath ~/.local/bin
addpath ~/.local/share/minecraft/servers/bin
# Fastfetch
fastfetch
# Start Hyprland if the tty is 1
if [ "$(tty)" = /dev/tty1 ]; then
exec Hyprland
else
true
fi

2
home/zshenv Normal file
View file

@ -0,0 +1,2 @@
export EDITOR=nvim

View file

@ -12,15 +12,6 @@ autoload -Uz compinit
compinit compinit
# End of lines added by compinstall # End of lines added by compinstall
# Source the system wid bash configuration
shrc_d=/usr/local/etc/sh/shrc.d
if [ -d "$shrc_d" ]; then
for i in "${shrc_d}/"*; do
. "$i"
done
fi
unset shrc_d
# Bindings # Bindings
# create a zkbd compatible hash; # create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo # to add other keys to this hash, see: man 5 terminfo