From f3a7fc82d96071c88dc23a40f5a0cca0b3dcacb5 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Sun, 4 Jun 2023 16:24:58 +0200 Subject: [PATCH] Remaniement : configuration de zsh --- etc/zsh/zshrc | 10 ++++++++++ home/zprofile | 24 ++++++++++++++++++++++++ home/zshenv | 2 ++ home/zshrc | 9 --------- 4 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 etc/zsh/zshrc create mode 100644 home/zprofile create mode 100644 home/zshenv diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc new file mode 100644 index 0000000..fff5d1f --- /dev/null +++ b/etc/zsh/zshrc @@ -0,0 +1,10 @@ +sourcefiles() { + if [ -d "$1" ]; then + for i in "${1}/"*; do + . "$1" + done + fi +} + +sourcefiles /usr/local/etc/sh/shrc.d + diff --git a/home/zprofile b/home/zprofile new file mode 100644 index 0000000..11bdc6e --- /dev/null +++ b/home/zprofile @@ -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 + diff --git a/home/zshenv b/home/zshenv new file mode 100644 index 0000000..4f3f33a --- /dev/null +++ b/home/zshenv @@ -0,0 +1,2 @@ +export EDITOR=nvim + diff --git a/home/zshrc b/home/zshrc index bf9f787..9422bda 100644 --- a/home/zshrc +++ b/home/zshrc @@ -12,15 +12,6 @@ autoload -Uz compinit compinit # 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 # create a zkbd compatible hash; # to add other keys to this hash, see: man 5 terminfo