Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:configs [2006/12/15 12:53] cyril created |
linux:configs [2016/02/19 16:35] (current) cyril [Your own locale] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Configuration of some software ====== | ====== Configuration of some software ====== | ||
+ | ===== Linux ===== | ||
+ | |||
+ | ==== Your own locale ==== | ||
+ | |||
+ | Maybe you don't like any predefined locale ; it was my case. | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | * English messages (because french messages are often strangely translated, and there is less information on the internet) | ||
+ | * " | ||
+ | * " | ||
+ | * " " (space) as thousands separator, because it is the French standard, and not so bad | ||
+ | * French monetary (except decimal and thousands separators) | ||
+ | * French for other features (telephone, address, measurement etc) | ||
+ | |||
+ | Rename the file to " | ||
+ | |||
+ | Add " | ||
+ | |||
+ | Now you can use the '' | ||
===== ZSH ===== | ===== ZSH ===== | ||
+ | ==== Config files ==== | ||
+ | |||
+ | As for all shells, there are several configuration files, loaded in the order : | ||
+ | < | ||
+ | .zshenv | ||
+ | .zprofile | ||
+ | .zshrc | ||
+ | .zlogin | ||
+ | .zlogout | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== Prompt ==== | ||
A nice prompt which prints only the two first and two last folder names of the current path (instead of the whole path or only the last folder) : | A nice prompt which prints only the two first and two last folder names of the current path (instead of the whole path or only the last folder) : | ||
<code bash> | <code bash> | ||
- | export PS1=" | + | if [ "`id -u`" -eq 0 ]; then |
+ | # root prompt : blue | ||
+ | export PS1=" | ||
+ | else | ||
+ | # user prompt : red | ||
+ | | ||
+ | fi | ||
</ | </ | ||
+ | |||
+ | It gives something like : | ||
+ | < | ||
+ | 17:59 cyril@cyrilr / | ||
+ | </ | ||
+ | |||
+ | ==== Use the directory stack ==== | ||
+ | |||
+ | Zsh permits to use the directory stack very easily, in '' | ||
+ | <code bash> | ||
+ | alias d=' | ||
+ | setopt auto_pushd | ||
+ | setopt pushd_ignore_dups | ||
+ | setopt pushd_silent | ||
+ | </ | ||
+ | |||
+ | Then you can type '' | ||
+ | |||
+ | ==== History size ==== | ||
+ | |||
+ | It is always painful to lose what you have typed in your shell 20 lines above. You can tune it in '' | ||
+ | |||
+ | < | ||
+ | export HISTORY=500 | ||
+ | export HISTSIZE=500 | ||
+ | export SAVEHIST=500 | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Key bindings ==== | ||
+ | |||
+ | In order to use // | ||
+ | |||
+ | < | ||
+ | bindkey ' | ||
+ | bindkey ' | ||
+ | bindkey ' | ||
+ | bindkey ' | ||
+ | bindkey ' | ||
+ | bindkey ' | ||
+ | bindkey ' | ||
+ | |||
+ | bindkey ' | ||
+ | bindkey ' | ||
+ | |||
+ | bindkey ' | ||
+ | bindkey ' | ||
+ | |||
+ | bindkey ' | ||
+ | bindkey ' | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Aliases ==== | ||
+ | |||
+ | Still in '' | ||
+ | |||
+ | <code bash> | ||
+ | ### ls | ||
+ | alias ll='ls -l' | ||
+ | alias la='ls -a' | ||
+ | alias lla=' | ||
+ | |||
+ | ### misc | ||
+ | alias c=' | ||
+ | alias less=' | ||
+ | alias s='cd ..' | ||
+ | alias d=' | ||
+ | |||
+ | ### df & du | ||
+ | alias df='df --human-readable' | ||
+ | |||
+ | # sorted du in one pass | ||
+ | alias du='du -a -x --max-depth=1 --human-readable > / | ||
+ | cat / | ||
+ | cat / | ||
+ | cat / | ||
+ | cat / | ||
+ | cat / | ||
+ | |||
+ | # sorted du in two pass | ||
+ | #alias du='du -a -x --max-depth=1 -b > / | ||
+ | # du -a -x --max-depth=1 --human-readable > / | ||
+ | # paste / | ||
+ | </ | ||
+ | |||
===== MRXVT ===== | ===== MRXVT ===== | ||
+ | ==== History size ==== | ||
+ | It is always painful to lose what you have typed in your shell 20 lines above. You can tune it in '' | ||
+ | < | ||
+ | mrxvt.saveLines: | ||
+ | </ | ||
+ | ==== Appearence ==== | ||
+ | |||
+ | < | ||
+ | mrxvt.showMenu: | ||
+ | mrxvt.background: | ||
+ | mrxvt.foreground: | ||
+ | mrxvt.scrollbarStyle: | ||
+ | mrxvt.itabBackground: | ||
+ | mrxvt.scrollColor: | ||
+ | mrxvt.troughColor: | ||
+ | mrxvt.tabBackground: | ||
+ | </ | ||
+ | |||
+ | ==== Shortcuts ==== | ||
+ | |||
+ | < | ||
+ | Mrxvt.macro.Shift+Left: | ||
+ | Mrxvt.macro.Shift+Right: | ||
+ | Mrxvt.macro.Primary+Shift+Return: | ||
+ | Mrxvt.macro.Ctrl+t: | ||
+ | Mrxvt.macro.Ctrl+Shift+w: | ||
+ | </ | ||
+ | |||
+ | ==== Other tunings ==== | ||
+ | |||
+ | < | ||
+ | mrxvt.syncTabTitle: | ||
+ | mrxvt.syncTabIcon: | ||
+ | </ |