2019-10-03 21:28:01 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# This file provide user specific environment used as fallback from several tools
|
|
|
|
|
|
|
|
# set PATH so it includes user's private bin if it exists
|
|
|
|
if [ -d "$HOME/bin" ] ; then
|
|
|
|
export PATH=$HOME/bin:$PATH
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Search a TERMINAL for i3
|
|
|
|
for term in kitty termite qterminal urxvt rxvt-unicode sakura gnome-terminal; do
|
|
|
|
if [[ -n `which $term` ]]; then
|
|
|
|
export TERMINAL=`which $term`
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2021-06-25 19:45:35 +00:00
|
|
|
# Pour la batterie des ordinateurs portables (~/bin/battery)
|
2024-11-20 21:51:37 +00:00
|
|
|
export BATPATH="/sys/class/power_supply/BAT1"
|
2021-06-25 19:45:35 +00:00
|
|
|
|
2025-01-10 17:41:18 +00:00
|
|
|
# Permit DBUS to be launched on i3
|
2019-10-03 21:28:01 +00:00
|
|
|
if [ "$0" = "/usr/sbin/lightdm-session" -a "$DESKTOP_SESSION" = "i3" ]; then
|
|
|
|
export $(gnome-keyring-daemon -s)
|
|
|
|
fi
|
2021-06-19 22:13:32 +00:00
|
|
|
|
2024-10-17 09:41:57 +00:00
|
|
|
# Environnement Pyenv
|
|
|
|
export PYENV_ROOT="$HOME/.pyenv"
|
|
|
|
export PATH="$PYENV_ROOT/bin:$PATH"
|
|
|
|
eval "$(pyenv init --path)"
|
|
|
|
|
2025-01-10 17:41:18 +00:00
|
|
|
|
|
|
|
## ATTENTION : ce code n'est plus nécessaire pour le moment.
|
|
|
|
## 1. C'est ZSH (.zprofile) qui va charger SWAY sur les machines Wayland
|
|
|
|
## 2. C'est le .zprofile qui charge aussi .config/environment.d/envvars.conf
|
|
|
|
## 3. Dans le cas de Xorg : on a pas besoin de .config/environment.d/envvars.conf
|
|
|
|
## 4. Dans le cas de Xorg : xinitrc lance i3 # TODO: comment xinitrc se lance ? Par qui ?
|
|
|
|
|
|
|
|
## Démarrage de l'environnement préféré
|
|
|
|
#if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
|
|
|
# case $HOST in
|
|
|
|
# fuz | fuztest)
|
|
|
|
# # Cf. https://wiki.archlinux.org/title/Environment_variables#Per_Wayland_session
|
|
|
|
# variables_file="${HOME}/.config/environment.d/envvars.conf"
|
|
|
|
# if [[ -f "${variables_file}" ]]; then
|
|
|
|
# # charge seulement les lignes sans "#" (non commentées)
|
|
|
|
# for line in `cat "${variables_file}"|grep -Ev '^#'`; do
|
|
|
|
# export "$line"
|
|
|
|
# done
|
|
|
|
# fi
|
|
|
|
# exec sway
|
|
|
|
# ;;
|
|
|
|
# *)
|
|
|
|
# : # on ne fait rien, car c'est .xinitrc qui lance i3
|
|
|
|
# ;;
|
|
|
|
# esac
|
|
|
|
#fi
|
2021-08-09 08:01:52 +00:00
|
|
|
# vim: ts=2 sw=2 et nu
|