parent
5984c2914a
commit
53aef00acd
@ -1,23 +1,36 @@
|
|||||||
|
# /etc/zsh/zlogin: system-wide .zlogin file for zsh(1).
|
||||||
#
|
#
|
||||||
# Executes commands at login post-zshrc.
|
# This file is sourced only for login shells. It
|
||||||
|
# should contain commands that should be executed only
|
||||||
|
# in login shells. It should be used to set the terminal
|
||||||
|
# type and run a series of external commands (fortune,
|
||||||
|
# msgs, from, etc.)
|
||||||
|
# Executes commands at login post-zshrc
|
||||||
#
|
#
|
||||||
# Authors:
|
# Global Order: zshenv, zprofile, zshrc, zlogin
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Execute code that does not affect the current session in the background.
|
# Execute code that does not affect the current session in the background.
|
||||||
{
|
{
|
||||||
# Compile the completion dump to increase startup speed.
|
# Compile the completion dump to increase startup speed.
|
||||||
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
|
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
|
||||||
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
|
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
|
||||||
zcompile "$zcompdump"
|
zcompile "$zcompdump"
|
||||||
fi
|
fi
|
||||||
} &!
|
} &!
|
||||||
|
|
||||||
|
# Ajouter ceci dans ~/.zlogin ou ~/.zprofile pour lancer startx au demarrage de la session
|
||||||
|
#[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx # Pour lancer 1 seul VM
|
||||||
|
#[[ -z $DISPLAY && $XDG_VTNR -le 2 ]] && exec startx # Autre variante pour lancer plusieurs VM avec la config par defaut de .xinitrc sur les tty1,2et3.
|
||||||
|
[[ -z $DISPLAY && $XDG_VTNR -eq 3 ]] && exec startx ~/.xinitrc xmonad # Pour lancer kde sur le tty3
|
||||||
|
|
||||||
# Print a random, hopefully interesting, adage.
|
# Print a random, hopefully interesting, adage.
|
||||||
if (( $+commands[fortune] )); then
|
if (( $+commands[fortune] )); then
|
||||||
if [[ -t 0 || -t 1 ]]; then
|
if [[ -t 0 || -t 1 ]]; then
|
||||||
fortune -s
|
fortune -s
|
||||||
print
|
print
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
||||||
|
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
|
# /etc/zsh/zlogout: system-wide .zlogout file for zsh(1).
|
||||||
#
|
#
|
||||||
# Executes commands at logout.
|
|
||||||
#
|
|
||||||
# Authors:
|
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
||||||
#
|
|
||||||
|
|
||||||
# Print the message.
|
# Print the message.
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
|
|
||||||
Thank you. Come again!
|
Thank you. Come again!
|
||||||
-- $USER
|
-- $USER
|
||||||
EOF
|
EOF
|
||||||
|
#
|
||||||
|
@ -1,11 +1,25 @@
|
|||||||
|
# /etc/zsh/zshenv: system-wide .zshenv file for zsh(1).
|
||||||
#
|
#
|
||||||
|
# This file is sourced on all invocations of the shell.
|
||||||
|
# If the -f flag is present or if the NO_RCS option is
|
||||||
|
# set within this file, all other initialization files
|
||||||
|
# are skipped.
|
||||||
# Defines environment variables.
|
# Defines environment variables.
|
||||||
#
|
#
|
||||||
# Authors:
|
# This file should contain commands to set the command
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# search path, plus other important environment variables.
|
||||||
|
# This file should not contain commands that produce
|
||||||
|
# output or assume the shell is attached to a tty.
|
||||||
#
|
#
|
||||||
|
# Global Order: zshenv, zprofile, zshrc, zlogin
|
||||||
|
|
||||||
# Ensure that a non-login, non-interactive shell has a defined environment.
|
if [[ -z "$PATH" || "$PATH" == "/bin:/usr/bin" ]]
|
||||||
if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
|
then
|
||||||
source "${ZDOTDIR:-$HOME}/.zprofile"
|
export PATH="$HOME/git/linux-config/dotfiles/bin:/usr/local/bin:/usr/bin:/bin:/usr/games"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Ensure that a non-login, non-interactive shell has a defined environment.
|
||||||
|
#if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
|
||||||
|
# source "${ZDOTDIR:-$HOME}/.zprofile"
|
||||||
|
#fi
|
||||||
|
#
|
||||||
|
Loading…
Reference in new issue