p4ch0u self modification
This commit is contained in:
parent
5984c2914a
commit
53aef00acd
4 changed files with 81 additions and 29 deletions
|
@ -1,8 +1,13 @@
|
||||||
|
# /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.
|
||||||
|
@ -14,6 +19,11 @@
|
||||||
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
|
||||||
|
@ -21,3 +31,6 @@ if (( $+commands[fortune] )); then
|
||||||
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,9 +1,13 @@
|
||||||
|
# /etc/zsh/zprofile: system-wide .zprofile file for zsh(1).
|
||||||
|
#
|
||||||
|
# This file is sourced only for login shells (i.e. shells
|
||||||
|
# invoked with "-" as the first character of argv[0], and
|
||||||
|
# shells invoked with the -l flag.)
|
||||||
|
#
|
||||||
|
# Global Order: zshenv, zprofile, zshrc, zlogin
|
||||||
#
|
#
|
||||||
# Executes commands at login pre-zshrc.
|
# Executes commands at login pre-zshrc.
|
||||||
#
|
#
|
||||||
# Authors:
|
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Browser
|
# Browser
|
||||||
|
@ -17,8 +21,8 @@ fi
|
||||||
# Editors
|
# Editors
|
||||||
#
|
#
|
||||||
|
|
||||||
export EDITOR='nano'
|
export EDITOR='vim'
|
||||||
export VISUAL='nano'
|
export VISUAL='vim'
|
||||||
export PAGER='less'
|
export PAGER='less'
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -26,7 +30,7 @@ export PAGER='less'
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ -z "$LANG" ]]; then
|
if [[ -z "$LANG" ]]; then
|
||||||
export LANG='en_US.UTF-8'
|
export LANG='fr_FR.UTF-8'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -43,10 +47,18 @@ typeset -gU cdpath fpath mailpath path
|
||||||
|
|
||||||
# Set the list of directories that Zsh searches for programs.
|
# Set the list of directories that Zsh searches for programs.
|
||||||
path=(
|
path=(
|
||||||
|
$HOME/git/linux-config/dotfiles/bin
|
||||||
|
"$(ruby -e 'print Gem.user_dir')/bin"
|
||||||
/usr/local/{bin,sbin}
|
/usr/local/{bin,sbin}
|
||||||
|
$HOME/.cabal/bin
|
||||||
|
$HOME/.xmonad/bin
|
||||||
|
$HOME/bin
|
||||||
|
$HOME/.gem/ruby/2.2.0/bin
|
||||||
|
$HOME/miniconda3/bin
|
||||||
$path
|
$path
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Less
|
# Less
|
||||||
#
|
#
|
||||||
|
@ -57,6 +69,9 @@ path=(
|
||||||
export LESS='-F -g -i -M -R -S -w -X -z-4'
|
export LESS='-F -g -i -M -R -S -w -X -z-4'
|
||||||
|
|
||||||
# Set the Less input preprocessor.
|
# Set the Less input preprocessor.
|
||||||
|
#if (( $+commands[lesspipe.sh] )); then
|
||||||
|
# export LESSOPEN='| /usr/bin/env lesspipe.sh %s 2>&-'i
|
||||||
|
#fi
|
||||||
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
|
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
|
||||||
if (( $#commands[(i)lesspipe(|.sh)] )); then
|
if (( $#commands[(i)lesspipe(|.sh)] )); then
|
||||||
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
|
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
|
||||||
|
@ -67,7 +82,7 @@ fi
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ ! -d "$TMPDIR" ]]; then
|
if [[ ! -d "$TMPDIR" ]]; then
|
||||||
export TMPDIR="/tmp/$LOGNAME"
|
export TMPDIR="/tmp/$USER"
|
||||||
mkdir -p -m 700 "$TMPDIR"
|
mkdir -p -m 700 "$TMPDIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -76,4 +91,18 @@ TMPPREFIX="${TMPDIR%/}/zsh"
|
||||||
# Setting PATH for Python 3.6
|
# Setting PATH for Python 3.6
|
||||||
# The original version is saved in .zprofile.pysave
|
# The original version is saved in .zprofile.pysave
|
||||||
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
|
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
|
||||||
|
|
||||||
export PATH
|
export PATH
|
||||||
|
if [[ ! -d "$TMPPREFIX" ]]; then
|
||||||
|
mkdir -p "$TMPPREFIX"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configuration GnuPG
|
||||||
|
eval $(gpg-agent --daemon --enable-ssh-support --enable-putty-support)
|
||||||
|
eval $(ssh-agent -s)
|
||||||
|
#
|
||||||
|
export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH
|
||||||
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
||||||
|
|
||||||
|
#Token
|
||||||
|
export KEY_TOKEN=''
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
if [[ -z "$PATH" || "$PATH" == "/bin:/usr/bin" ]]
|
||||||
|
then
|
||||||
|
export PATH="$HOME/git/linux-config/dotfiles/bin:/usr/local/bin:/usr/bin:/bin:/usr/games"
|
||||||
|
fi
|
||||||
|
|
||||||
# Ensure that a non-login, non-interactive shell has a defined environment.
|
# Ensure that a non-login, non-interactive shell has a defined environment.
|
||||||
if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
|
#if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
|
||||||
source "${ZDOTDIR:-$HOME}/.zprofile"
|
# source "${ZDOTDIR:-$HOME}/.zprofile"
|
||||||
fi
|
#fi
|
||||||
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue