Last active
February 6, 2023 10:32
-
-
Save R2-G2/b71248030139bc9648b4b712e25621d5 to your computer and use it in GitHub Desktop.
UN*X setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Ralf Grawunder | |
email = r.grawunder@googlemail.com | |
[push] | |
default = simple | |
[pull] | |
rebase = false | |
[merge] | |
tool = meld | |
[init] | |
templatedir = ~/.gittemplates | |
defaultBranch = master | |
[core] | |
autocrlf = input | |
[alias] | |
silentcommit = commit --allow-empty-message -m '' | |
silentrevert = revert --no-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# System-wide .bashrc file for interactive bash(1) shells. | |
# To enable the settings / commands in this file for login shells as well, | |
# this file has to be sourced in /etc/profile. | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize | |
# set variable identifying the chroot you work in (used in the prompt below) | |
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) | |
fi | |
# set a fancy prompt (non-color, overwrite the one in /etc/profile) | |
# but only if not SUDOing and have SUDO_PS1 set; then assume smart user. | |
if ! [ -n "${SUDO_USER}" -a -n "${SUDO_PS1}" ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |
fi | |
# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default. | |
# If this is an xterm set the title to user@host:dir | |
#case "$TERM" in | |
#xterm*|rxvt*) | |
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' | |
# ;; | |
#*) | |
# ;; | |
#esac | |
# enable bash completion in interactive shells | |
# <R2-Custom-G2> | |
if ! shopt -oq posix; then | |
if [ -f /usr/share/bash-completion/bash_completion ]; then | |
. /usr/share/bash-completion/bash_completion | |
elif [ -f /etc/bash_completion ]; then | |
. /etc/bash_completion | |
fi | |
fi | |
# </R2-Custom-G2> | |
# if the command-not-found package is installed, use it | |
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then | |
function command_not_found_handle { | |
# check because c-n-f could've been removed in the meantime | |
if [ -x /usr/lib/command-not-found ]; then | |
/usr/lib/command-not-found -- "$1" | |
return $? | |
elif [ -x /usr/share/command-not-found/command-not-found ]; then | |
/usr/share/command-not-found/command-not-found -- "$1" | |
return $? | |
else | |
printf "%s: command not found\n" "$1" >&2 | |
return 127 | |
fi | |
} | |
fi | |
# <R2-Custom-G2> | |
export NULLMAILER_NAME=$USER@$HOSTNAME | |
GIT_PROMPT_ONLY_IN_REPO=1 | |
GIT_PROMPT_THEME=TruncatedPwd_WindowTitle_Ubuntu | |
source /opt/bash-git-prompt/gitprompt.sh | |
export HISTSIZE=24576 | |
export PATH=$HOME/.bin:/opt/bin:$PATH | |
alias sudo="sudo " | |
alias sug="sudo update-grub " | |
alias sug2="sudo update-grub2 " | |
alias sagar="sudo apt-get autoremove " | |
alias sagarp="sudo apt-get autoremove --purge " | |
alias sagdu="sudo apt-get dist-upgrade " | |
alias sagi="sudo apt-get install " | |
alias sagiri="sudo apt-get install --reinstall " | |
alias sagr="sudo apt-get remove " | |
alias sagrp="sudo apt-get remove --purge " | |
alias sagu="sudo apt-get update " | |
alias sagui="sudo apt-get update && sudo apt-get install " | |
alias saguiri="sudo apt-get update && sudo apt-get install --reinstall " | |
alias saguu="sudo apt-get update && sudo apt-get upgrade " | |
alias sagudu="sudo apt-get update && sudo apt-get dist-upgrade " | |
alias sagufu="sudo apt-get update && sudo apt-get full-upgrade " | |
alias ug="sug " | |
alias ug2="sug2 " | |
alias agar="sagar " | |
alias agarp="sagarp " | |
alias agdu="sagdu " | |
alias agi="sagi " | |
alias agiri="sagiri " | |
alias agr="sagr " | |
alias agrp="sagrp " | |
alias agu="sagu " | |
alias agui="sagui " | |
alias aguiri="saguiri " | |
alias aguu="saguu " | |
alias agudu="sagudu " | |
alias agufu="sagufu " | |
greeter | |
# </R2-Custom-G2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# System-wide .bashrc file for interactive bash(1) shells. | |
# To enable the settings / commands in this file for login shells as well, | |
# this file has to be sourced in /etc/profile. | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize | |
# set variable identifying the chroot you work in (used in the prompt below) | |
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) | |
fi | |
# set a fancy prompt (non-color, overwrite the one in /etc/profile) | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |
# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default. | |
# If this is an xterm set the title to user@host:dir | |
#case "$TERM" in | |
#xterm*|rxvt*) | |
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' | |
# ;; | |
#*) | |
# ;; | |
#esac | |
# enable bash completion in interactive shells | |
# <R2-Custom-G2> | |
if ! shopt -oq posix; then | |
if [ -f /usr/share/bash-completion/bash_completion ]; then | |
. /usr/share/bash-completion/bash_completion | |
elif [ -f /etc/bash_completion ]; then | |
. /etc/bash_completion | |
fi | |
fi | |
# </R2-Custom-G2> | |
# if the command-not-found package is installed, use it | |
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then | |
function command_not_found_handle { | |
# check because c-n-f could've been removed in the meantime | |
if [ -x /usr/lib/command-not-found ]; then | |
/usr/lib/command-not-found -- "$1" | |
return $? | |
elif [ -x /usr/share/command-not-found/command-not-found ]; then | |
/usr/share/command-not-found/command-not-found -- "$1" | |
return $? | |
else | |
printf "%s: command not found\n" "$1" >&2 | |
return 127 | |
fi | |
} | |
fi | |
# <R2-Custom-G2> | |
export NULLMAILER_NAME=$USER@$HOSTNAME | |
GIT_PROMPT_ONLY_IN_REPO=1 | |
GIT_PROMPT_THEME=TruncatedPwd_WindowTitle_Ubuntu | |
source /opt/bash-git-prompt/gitprompt.sh | |
export HISTSIZE=1024 | |
export PATH=$HOME/.bin:/opt/bin:$PATH | |
alias sudo="sudo " | |
alias sru='sudo rpi-update' | |
alias sagar="sudo apt-get autoremove " | |
alias sagarp="sudo apt-get autoremove --purge " | |
alias sagdu="sudo apt-get dist-upgrade " | |
alias sagi="sudo apt-get install " | |
alias sagiri="sudo apt-get install --reinstall " | |
alias sagr="sudo apt-get remove " | |
alias sagrp="sudo apt-get remove --purge " | |
alias sagu="sudo apt-get update " | |
alias sagui="sudo apt-get update && sudo apt-get install " | |
alias saguiri="sudo apt-get update && sudo apt-get install --reinstall " | |
alias saguu="sudo apt-get update && sudo apt-get upgrade " | |
alias sagudu="sudo apt-get update && sudo apt-get dist-upgrade " | |
alias sagufu="sudo apt-get update && sudo apt-get full-upgrade " | |
alias ru='sru ' | |
alias agar="sagar " | |
alias agarp="sagarp " | |
alias agdu="sagdu " | |
alias agi="sagi " | |
alias agiri="sagiri " | |
alias agr="sagr " | |
alias agrp="sagrp " | |
alias agu="sagu " | |
alias agui="sagui " | |
alias aguiri="saguiri " | |
alias aguu="saguu " | |
alias agudu="sagudu " | |
alias agufu="sagufu " | |
greeter | |
# </R2-Custom-G2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# System-wide .bashrc file for interactive bash(1) shells. | |
# To enable the settings / commands in this file for login shells as well, | |
# this file has to be sourced in /etc/profile. | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize | |
# set variable identifying the chroot you work in (used in the prompt below) | |
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) | |
fi | |
# set a fancy prompt (non-color, overwrite the one in /etc/profile) | |
# but only if not SUDOing and have SUDO_PS1 set; then assume smart user. | |
if ! [ -n "${SUDO_USER}" -a -n "${SUDO_PS1}" ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |
fi | |
# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default. | |
# If this is an xterm set the title to user@host:dir | |
#case "$TERM" in | |
#xterm*|rxvt*) | |
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' | |
# ;; | |
#*) | |
# ;; | |
#esac | |
# enable bash completion in interactive shells | |
# <R2-Custom-G2> | |
if ! shopt -oq posix; then | |
if [ -f /usr/share/bash-completion/bash_completion ]; then | |
. /usr/share/bash-completion/bash_completion | |
elif [ -f /etc/bash_completion ]; then | |
. /etc/bash_completion | |
fi | |
fi | |
# </R2-Custom-G2> | |
# sudo hint | |
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then | |
case " $(groups) " in *\ admin\ *|*\ sudo\ *) | |
if [ -x /usr/bin/sudo ]; then | |
cat <<-EOF | |
To run a command as administrator (user "root"), use "sudo <command>". | |
See "man sudo_root" for details. | |
EOF | |
fi | |
esac | |
fi | |
# if the command-not-found package is installed, use it | |
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then | |
function command_not_found_handle { | |
# check because c-n-f could've been removed in the meantime | |
if [ -x /usr/lib/command-not-found ]; then | |
/usr/lib/command-not-found -- "$1" | |
return $? | |
elif [ -x /usr/share/command-not-found/command-not-found ]; then | |
/usr/share/command-not-found/command-not-found -- "$1" | |
return $? | |
else | |
printf "%s: command not found\n" "$1" >&2 | |
return 127 | |
fi | |
} | |
fi | |
# <R2-Custom-G2> | |
export NULLMAILER_NAME=$USER@$HOSTNAME | |
GIT_PROMPT_ONLY_IN_REPO=1 | |
GIT_PROMPT_THEME=TruncatedPwd_WindowTitle_Ubuntu | |
source /opt/bash-git-prompt/gitprompt.sh | |
export HISTSIZE=131072 | |
export PATH=$HOME/.bin:/opt/bin:$PATH | |
alias sudo="sudo " | |
alias sug="sudo update-grub " | |
alias sug2="sudo update-grub2 " | |
alias sdru="sudo do-release-upgrade " | |
alias sagar="sudo apt-get autoremove " | |
alias sagarp="sudo apt-get autoremove --purge " | |
alias sagdu="sudo apt-get dist-upgrade " | |
alias sagi="sudo apt-get install " | |
alias sagiri="sudo apt-get install --reinstall " | |
alias sagr="sudo apt-get remove " | |
alias sagrp="sudo apt-get remove --purge " | |
alias sagu="sudo apt-get update " | |
alias sagui="sudo apt-get update && sudo apt-get install " | |
alias saguiri="sudo apt-get update && sudo apt-get install --reinstall " | |
alias saguu="sudo apt-get update && sudo apt-get upgrade " | |
alias sagudu="sudo apt-get update && sudo apt-get dist-upgrade " | |
alias sagufu="sudo apt-get update && sudo apt-get full-upgrade " | |
alias ug="sug " | |
alias ug2="sug2 " | |
alias dru="sdru " | |
alias agar="sagar " | |
alias agarp="sagarp " | |
alias agdu="sagdu " | |
alias agi="sagi " | |
alias agiri="sagiri " | |
alias agr="sagr " | |
alias agrp="sagrp " | |
alias agu="sagu " | |
alias agui="sagui " | |
alias aguiri="saguiri " | |
alias aguu="saguu " | |
alias agudu="sagudu " | |
alias agufu="sagufu " | |
greeter | |
# </R2-Custom-G2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/inputrc - global inputrc for libreadline | |
# See readline(3readline) and `info rluserman' for more information. | |
# Be 8 bit clean. | |
set input-meta on | |
set output-meta on | |
# To allow the use of 8bit-characters like the german umlauts, uncomment | |
# the line below. However this makes the meta key not work as a meta key, | |
# which is annoying to those which don't need to type in 8-bit characters. | |
# set convert-meta off | |
# try to enable the application keypad when it is called. Some systems | |
# need this to enable the arrow keys. | |
# set enable-keypad on | |
# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys | |
# do not bell on tab-completion | |
# set bell-style none | |
# set bell-style visible | |
# some defaults / modifications for the emacs mode | |
$if mode=emacs | |
# allow the use of the Home/End keys | |
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
# allow the use of the Delete/Insert keys | |
"\e[3~": delete-char | |
"\e[2~": quoted-insert | |
# mappings for "page up" and "page down" to step to the beginning/end | |
# of the history | |
# "\e[5~": beginning-of-history | |
# "\e[6~": end-of-history | |
# alternate mappings for "page up" and "page down" to search the history | |
# <R2-Custom-G2> | |
"\e[5~": history-search-backward | |
"\e[6~": history-search-forward | |
# </R2-Custom-G2> | |
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving | |
"\e[1;5C": forward-word | |
"\e[1;5D": backward-word | |
"\e[5C": forward-word | |
"\e[5D": backward-word | |
"\e\e[C": forward-word | |
"\e\e[D": backward-word | |
$if term=rxvt | |
"\e[7~": beginning-of-line | |
"\e[8~": end-of-line | |
"\eOc": forward-word | |
"\eOd": backward-word | |
$endif | |
# for non RH/Debian xterm, can't hurt for RH/Debian xterm | |
# "\eOH": beginning-of-line | |
# "\eOF": end-of-line | |
# for freebsd console | |
# "\e[H": beginning-of-line | |
# "\e[F": end-of-line | |
$endif | |
# <R2-Custom-G2> | |
set show-all-if-ambiguous on | |
set completion-ignore-case on | |
# </R2-Custom-G2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/inputrc - global inputrc for libreadline | |
# See readline(3readline) and `info rluserman' for more information. | |
# Be 8 bit clean. | |
set input-meta on | |
set output-meta on | |
# To allow the use of 8bit-characters like the german umlauts, uncomment | |
# the line below. However this makes the meta key not work as a meta key, | |
# which is annoying to those which don't need to type in 8-bit characters. | |
# set convert-meta off | |
# try to enable the application keypad when it is called. Some systems | |
# need this to enable the arrow keys. | |
# set enable-keypad on | |
# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys | |
# do not bell on tab-completion | |
# set bell-style none | |
# set bell-style visible | |
# some defaults / modifications for the emacs mode | |
$if mode=emacs | |
# allow the use of the Home/End keys | |
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
# allow the use of the Delete/Insert keys | |
"\e[3~": delete-char | |
"\e[2~": quoted-insert | |
# mappings for "page up" and "page down" to step to the beginning/end | |
# of the history | |
# "\e[5~": beginning-of-history | |
# "\e[6~": end-of-history | |
# alternate mappings for "page up" and "page down" to search the history | |
# <R2-Custom-G2> | |
"\e[5~": history-search-backward | |
"\e[6~": history-search-forward | |
# </R2-Custom-G2> | |
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving | |
"\e[1;5C": forward-word | |
"\e[1;5D": backward-word | |
"\e[5C": forward-word | |
"\e[5D": backward-word | |
"\e\e[C": forward-word | |
"\e\e[D": backward-word | |
$if term=rxvt | |
"\e[7~": beginning-of-line | |
"\e[8~": end-of-line | |
"\eOc": forward-word | |
"\eOd": backward-word | |
$endif | |
# for non RH/Debian xterm, can't hurt for RH/Debian xterm | |
# "\eOH": beginning-of-line | |
# "\eOF": end-of-line | |
# for freebsd console | |
# "\e[H": beginning-of-line | |
# "\e[F": end-of-line | |
$endif | |
# mappings for up and down arrows search history | |
# "\e[B": history-search-forward | |
# "\e[A": history-search-backward | |
# <R2-Custom-G2> | |
set show-all-if-ambiguous on | |
set completion-ignore-case on | |
# </R2-Custom-G2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/inputrc - global inputrc for libreadline | |
# See readline(3readline) and `info rluserman' for more information. | |
# Be 8 bit clean. | |
set input-meta on | |
set output-meta on | |
# To allow the use of 8bit-characters like the german umlauts, uncomment | |
# the line below. However this makes the meta key not work as a meta key, | |
# which is annoying to those which don't need to type in 8-bit characters. | |
# set convert-meta off | |
# try to enable the application keypad when it is called. Some systems | |
# need this to enable the arrow keys. | |
# set enable-keypad on | |
# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys | |
# do not bell on tab-completion | |
# set bell-style none | |
# set bell-style visible | |
# some defaults / modifications for the emacs mode | |
$if mode=emacs | |
# allow the use of the Home/End keys | |
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
# allow the use of the Delete/Insert keys | |
"\e[3~": delete-char | |
"\e[2~": quoted-insert | |
# mappings for "page up" and "page down" to step to the beginning/end | |
# of the history | |
# "\e[5~": beginning-of-history | |
# "\e[6~": end-of-history | |
# alternate mappings for "page up" and "page down" to search the history | |
# <R2-Custom-G2> | |
"\e[5~": history-search-backward | |
"\e[6~": history-search-forward | |
# </R2-Custom-G2> | |
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving | |
"\e[1;5C": forward-word | |
"\e[1;5D": backward-word | |
"\e[5C": forward-word | |
"\e[5D": backward-word | |
"\e\e[C": forward-word | |
"\e\e[D": backward-word | |
$if term=rxvt | |
"\e[7~": beginning-of-line | |
"\e[8~": end-of-line | |
"\eOc": forward-word | |
"\eOd": backward-word | |
$endif | |
# for non RH/Debian xterm, can't hurt for RH/Debian xterm | |
# "\eOH": beginning-of-line | |
# "\eOF": end-of-line | |
# for freebsd console | |
# "\e[H": beginning-of-line | |
# "\e[F": end-of-line | |
$endif | |
# <R2-Custom-G2> | |
set show-all-if-ambiguous on | |
set completion-ignore-case on | |
# </R2-Custom-G2> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment