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)
|
2021-07-31 11:52:20 +00:00
|
|
|
export BATPATH="/sys/class/power_supply/BAT0"
|
2021-06-25 19:45:35 +00:00
|
|
|
|
2019-10-03 21:28:01 +00:00
|
|
|
# Permit DBUS to be launched
|
|
|
|
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
|
|
|
|
|
|
|
# Démarrage de l'environnement préféré
|
|
|
|
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
2021-06-25 12:13:12 +00:00
|
|
|
case $HOST in
|
|
|
|
fuz | fuztest)
|
|
|
|
exec sway
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
: # on ne fait rien, car c'est .xinitrc qui lance i3
|
|
|
|
;;
|
|
|
|
esac
|
2021-06-19 22:13:32 +00:00
|
|
|
fi
|