Compare commits
28 commits
Author | SHA1 | Date | |
---|---|---|---|
6d67c096b3 | |||
2663f8a594 | |||
3690d11118 | |||
868a666c2a | |||
c54411a2d9 | |||
1402d131d4 | |||
3576e74de0 | |||
97df895805 | |||
35b369884e | |||
|
3c6a1b5bd1 | ||
|
4bf7a51c46 | ||
|
6c0afe7a41 | ||
2dedcfda5a | |||
561a0647be | |||
4900f4aaa4 | |||
38e95dcf37 | |||
2a0b70e655 | |||
838387ffe3 | |||
34dc4b46ab | |||
7b889ab340 | |||
36be565e69 | |||
|
7c4689bcbf | ||
|
a2ff339214 | ||
|
0c129dad17 | ||
ccd5b5ea0c | |||
4d786a09ac | |||
7286eb65cb | |||
|
d52be339b6 |
17 changed files with 138 additions and 62 deletions
|
@ -25,10 +25,14 @@ alias gdel="git reset --hard ; git clean -f"
|
|||
alias glast="git log -1 HEAD --stat"
|
||||
alias gd="git difftool"
|
||||
alias gsp="git stage -p"
|
||||
alias gflog="git log -- "
|
||||
alias gb="git branch"
|
||||
# docker
|
||||
alias dcu="docker-compose up"
|
||||
alias dcd="docker-compose down"
|
||||
alias dcr="docker-compose down && docker-compose up -d"
|
||||
alias dcu="docker compose up"
|
||||
alias dlogs="docker compose logs -f"
|
||||
alias dcd="docker compose down"
|
||||
alias dcr="docker compose down && docker compose up -d"
|
||||
alias dps="docker ps --no-trunc --all --format 'table {{.Names}}\t{{.Status}}\t{{.State}}\t{{.CreatedAt}}\t{{.RunningFor}}\t{{.Size}}'"
|
||||
# safeguard
|
||||
alias mv="mv -i "
|
||||
alias cp="cp -i "
|
||||
|
|
|
@ -43,8 +43,10 @@ export LESS_TERMCAP_us=$'\E[01;36m'
|
|||
# bash history bei mehreren Session
|
||||
shopt -s histappend
|
||||
|
||||
# bach History Zeitstempel am Anfang der Zeile
|
||||
# bash History Zeitstempel am Anfang der Zeile
|
||||
export HISTTIMEFORMAT='[%F_%T] '
|
||||
# https://askubuntu.com/questions/15926/how-to-avoid-duplicate-entries-in-bash-history
|
||||
export HISTCONTROL=ignoreboth:erasedups
|
||||
|
||||
# typo bei cd entfernen
|
||||
shopt -s cdspell
|
||||
|
|
|
@ -8,6 +8,7 @@ BLACK='\[\e[30m\]'
|
|||
RESET='\[\e[0m\]'
|
||||
ORANGE='\[\e[0;33m\]'
|
||||
# git-symbole: * unstaged, + staged, $ stashed, % untracked
|
||||
source /usr/lib/git-core/git-sh-prompt
|
||||
export GIT_PS1_SHOWUNTRACKEDFILES=1
|
||||
export GIT_PS1_SHOWDIRTYSTATE=1
|
||||
export GIT_PS1_SHOWSTASHSTATE=1
|
||||
|
|
|
@ -13,7 +13,8 @@ autocorrect = 20 # https://opensource.com/article/20/11/git-aliases
|
|||
[status]
|
||||
showUntrackedFiles = all
|
||||
[push]
|
||||
default = simple
|
||||
default = current
|
||||
autoSetupRemote = true
|
||||
[pull]
|
||||
rebase = true
|
||||
autostash = true
|
||||
|
@ -28,7 +29,7 @@ wsErrorHighlight = all
|
|||
[fetch]
|
||||
prune = true
|
||||
[safe]
|
||||
directory = ~/dotfiles
|
||||
directory = *
|
||||
[advice]
|
||||
addIgnoredFile = true
|
||||
addEmptyPathspec = false
|
||||
|
|
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
git.mgrote.net*
|
||||
github*
|
||||
github.pub*
|
||||
mgrote.net*
|
||||
mikrotik_ed25519*
|
||||
qnap_papa*
|
||||
known_hosts*
|
|
@ -9,15 +9,15 @@ StrictHostKeyChecking=accept-new
|
|||
|
||||
### mgrote.net
|
||||
Host fileserver3.mgrote.net
|
||||
Host ansible2.mgrote.net
|
||||
Host docker10.mgrote.net
|
||||
Host pve5.mgrote.net
|
||||
Host forgejo.mgrote.net
|
||||
Host ldap.mgrote.net
|
||||
Host pve5-test.mgrote.net
|
||||
Host vm-test-2204.mgrote.net
|
||||
Host vm-test-2404.mgrote.net
|
||||
Host pbs-test.mgrote.net
|
||||
Host pbs.mgrote.net
|
||||
Host munin.mgrote.net
|
||||
Host blocky.mgrote.net
|
||||
Host *.mgrote.net
|
||||
IdentityFile ~/.ssh/mgrote.net
|
||||
|
|
90
.tmux.conf
90
.tmux.conf
|
@ -1,37 +1,69 @@
|
|||
set-option -g set-titles on # Automatically set window title
|
||||
set-option -g status-position top # position the status bar at top of screen
|
||||
set-option -g monitor-activity off # Deaktiviere "Markierung" aktiver Fenster
|
||||
set-option -g renumber-windows on # Automatische Neu-Nummerierung der Fenster aktivieren; Beispielsweise nach dem Schließen eines Fensters
|
||||
set-option -g base-index 1 # Nummerierung der Fenster und Teilfenster jeweils mit 1 beginnen
|
||||
set -g pane-base-index 1 # Nummerierung der Fenster und Teilfenster jeweils mit 1 beginnen
|
||||
set-option -g status-right "#(hostname -f)" # Statuszeile - rechts
|
||||
# Automatically set window title
|
||||
set-window-option -g automatic-rename on
|
||||
set-option -g set-titles on
|
||||
|
||||
# position the status bar at top of screen
|
||||
set-option -g status-position top
|
||||
|
||||
# Deaktiviere "Markierung" aktiver Fenster
|
||||
set-option -g monitor-activity off
|
||||
|
||||
# Automatische Neu-Nummerierung der Fenster aktivieren; Beispielsweise nach dem Schließen eines Fensters
|
||||
set-option -g renumber-windows on
|
||||
|
||||
# Nummerierung der Fenster und Teilfenster jeweils mit 1 beginnen
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
|
||||
# Statuszeile
|
||||
set-option -g status-right "#(hostname -f)"
|
||||
set -g status-right-length 100
|
||||
|
||||
# resize
|
||||
set-option -gw aggressive-resize on
|
||||
set -g default-terminal screen-256color # Farb-Optionen für Shell-Fenster
|
||||
set -g history-limit 50000 # increase scrollback buffer size
|
||||
set -g mouse on # Maus-Unterstützung aktivieren
|
||||
set-window-option -g clock-mode-style 24 # Uhrzeit auf 24h Format
|
||||
set-window-option -g pane-base-index 1 # Nummerierung der Fenster und Teilfenster jeweils mit 1 beginnen:
|
||||
set-window-option -g automatic-rename on # Automatically set window title
|
||||
|
||||
#------------ Buttons ------------#
|
||||
bind k select-pane -U # Wechsle Fenster mit vim keybindings
|
||||
bind j select-pane -D # Wechsle Fenster mit vim keybindings
|
||||
bind h select-pane -L # Wechsle Fenster mit vim keybindings
|
||||
bind l select-pane -R # Wechsle Fenster mit vim keybindings
|
||||
unbind '"' # alte Tastenkombination deaktivieren
|
||||
unbind % # alte Tastenkombination deaktivieren
|
||||
bind | split-window -h # Vertikal splitten
|
||||
bind - split-window -v # Horizontal splitten
|
||||
# Farb-Optionen für Shell-Fenster
|
||||
set -g default-terminal screen-256color
|
||||
|
||||
set -s escape-time 0 # address vim mode switching delay (http://superuser.com/a/252717/65504)
|
||||
set -g display-time 4000 # tmux messages are displayed for 4 seconds
|
||||
# increase scrollback buffer size
|
||||
set -g history-limit 50000
|
||||
|
||||
# schließe windows mit prefix + w
|
||||
bind w killw
|
||||
# öffne windows mit prefix + t
|
||||
bind t new-window
|
||||
# gehe in copy mode und starte suche
|
||||
# Maus-Unterstützung aktivieren
|
||||
set -g mouse on
|
||||
|
||||
# Wechsle Fenster mit vim keybindings
|
||||
bind k select-pane -U
|
||||
bind j select-pane -D
|
||||
bind h select-pane -L
|
||||
bind l select-pane -R
|
||||
|
||||
# display more of the session name
|
||||
set -g status-left-length 20
|
||||
|
||||
# Splits
|
||||
unbind '"'
|
||||
unbind %
|
||||
# setze Bind auf logische Zeichen & öffne in Pane in aktuellen Dir
|
||||
# https://github.com/jbranchaud/til/blob/master/tmux/open-new-splits-to-the-current-directory.md
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# Address vim mode switching delay (http://superuser.com/a/252717/65504)
|
||||
set -s escape-time 0
|
||||
|
||||
# tmux messages are displayed for 4 seconds
|
||||
set -g display-time 4000
|
||||
|
||||
# gehe in copy mode und starte suche
|
||||
# prefix + f
|
||||
set-window-option -g mode-keys vi
|
||||
bind f copy-mode\; send-keys ?
|
||||
|
||||
# Focus events enabled for terminals that support them
|
||||
set -g focus-events on
|
||||
|
||||
# Move Panes interactively
|
||||
# https://www.reddit.com/r/commandline/comments/8wv0w6/interactively_moving_panes_to_other_windows/
|
||||
unbind m
|
||||
bind-key m choose-tree -Z "join-pane -t '%%'"
|
||||
|
|
25
.vimrc
25
.vimrc
|
@ -244,10 +244,6 @@ function! ToggleNERDTreeFind()
|
|||
endif
|
||||
endfunction
|
||||
|
||||
" yaml einrückung
|
||||
autocmd FileType yaml setlocal ai ts=2 sw=2 et
|
||||
autocmd FileType yml setlocal ai ts=2 sw=2 et
|
||||
|
||||
" timeouts
|
||||
set timeoutlen=100
|
||||
|
||||
|
@ -255,3 +251,24 @@ set timeoutlen=100
|
|||
if &diff
|
||||
colorscheme nord
|
||||
endif
|
||||
|
||||
augroup spell
|
||||
autocmd!
|
||||
autocmd FileType * highlight SpellBad cterm=underline ctermfg=red ctermbg=NONE
|
||||
autocmd FileType * set spellfile=~/dotfiles/vim/spell/own.add
|
||||
autocmd FileType * set spellsuggest=fast,10
|
||||
autocmd FileType * set spell spelllang=de_de,en
|
||||
augroup END
|
||||
" z= Korrektur
|
||||
" ]s/[s gehe vor/zurück nächsten fehlerhaften wort
|
||||
" zg add to dictionary
|
||||
|
||||
augroup yaml
|
||||
autocmd!
|
||||
autocmd FileType yml setlocal ai ts=2 sw=2 et
|
||||
autocmd FileType yaml,yml setlocal ai ts=2 sw=2 et
|
||||
augroup END
|
||||
|
||||
" polyglot
|
||||
" disable reindenting of the current line in insert mode
|
||||
autocmd BufEnter * set indentexpr=
|
||||
|
|
|
@ -1,28 +1,33 @@
|
|||
#!/bin/bash
|
||||
case "$1" in
|
||||
--help | -h)
|
||||
cat <<EOF
|
||||
--help | -h)
|
||||
cat <<EOF
|
||||
|
||||
Description:
|
||||
"git checkout" on steroids
|
||||
Description:
|
||||
"git checkout" on steroids
|
||||
|
||||
Usage:
|
||||
gc [--help|--new-branch] [branch]
|
||||
Usage:
|
||||
gc [--help|--new-branch] [branch]
|
||||
|
||||
Options:
|
||||
-h, --help Print this help.
|
||||
-b, --new-branch Create a new Branch instead changing to an existing branch.
|
||||
Options:
|
||||
-h, --help Print this help.
|
||||
-b, --new-branch Create a new Branch instead changing to an existing branch.
|
||||
|
||||
Author:
|
||||
michael.grote@posteo.de - git.mgrote.net
|
||||
Author:
|
||||
michael.grote@posteo.de - git.mgrote.net
|
||||
EOF
|
||||
;;
|
||||
--new-branch | -b)
|
||||
(git checkout --quiet -b "$2" && git push --set-upstream "$(git remote | head -n 1)" "$2" && echo '>>> Create new branch "'"$2"'"') || (git checkout --quiet "$2" > /dev/null 2>&1 && echo '>>> Branch already exists, checking out... ')
|
||||
;;
|
||||
*)
|
||||
if [ -n "$1" ] ; then (echo ">>> Try local checkout" && git checkout --quiet "$1" > /dev/null 2>&1) || (echo ">>> Try remote checkout" && git checkout --quiet -b "$1" origin/"$1" > /dev/null 2>&1 || echo ">>> Unkown branch! ")
|
||||
else
|
||||
(git checkout --quiet master > /dev/null 2>&1 && echo '>>> Try checking out master') || (git checkout --quiet main > /dev/null 2>&1 && echo '>>> Try checking out main') || (git checkout --quiet release > /dev/null 2>&1 && echo '>>> Try checking out release')
|
||||
fi
|
||||
;;
|
||||
--new-branch | -b)
|
||||
(git checkout --quiet -b "$2" && echo '>>> Create new branch "'"$2"'"') || \
|
||||
(git checkout --quiet "$2" > /dev/null 2>&1 && echo '>>> Branch already exists, checking out... ')
|
||||
;;
|
||||
*)
|
||||
if [ -n "$1" ] ; then
|
||||
(echo ">>> Try local checkout" && git checkout --quiet "$1" > /dev/null 2>&1) || \
|
||||
(echo ">>> Try remote checkout" && git checkout --quiet -b "$1" origin/"$1" > /dev/null 2>&1 || echo ">>> Unkown branch! ")
|
||||
else
|
||||
(git checkout --quiet master > /dev/null 2>&1 && echo '>>> Try checking out master') || \
|
||||
(git checkout --quiet main > /dev/null 2>&1 && echo '>>> Try checking out main') || \
|
||||
(git checkout --quiet release > /dev/null 2>&1 && echo '>>> Try checking out release')
|
||||
fi
|
||||
esac
|
||||
|
|
|
@ -16,6 +16,7 @@ function update {
|
|||
cd "$d" || exit > /dev/null
|
||||
if [ -d ".git" ]; then
|
||||
echo -e "\n${HIGHLIGHT}Updating pwd$NORMAL"
|
||||
echo $PWD
|
||||
git add .
|
||||
git stash
|
||||
git pull
|
||||
|
|
|
@ -2,13 +2,17 @@
|
|||
# Aufruf: wget https://git.mgrote.net/mg/dotfiles/raw/branch/master/scripts/setup_minimal.sh && bash ./setup_minimal.sh
|
||||
cd ~
|
||||
|
||||
sudo apt update && sudo apt install git tmux vim ripgrep ca-certificates
|
||||
sudo apt update && sudo apt install git tmux vim ripgrep ca-certificates curl wget tree keychain
|
||||
|
||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||
git clone https://git.mgrote.net/mg/dotfiles ~/dotfiles
|
||||
|
||||
ln -s ~/dotfiles/.tmux.conf ~/.tmux.conf
|
||||
ln -s ~/dotfiles/.vimrc ~/.vimrc
|
||||
ln -s ~/dotfiles/.gitconfig ~/.gitconfig
|
||||
ln -s ~/dotfiles/.ssh ~/.ssh
|
||||
|
||||
ln -s ~/dotfiles/vim/spell/ ~/.vim/
|
||||
|
||||
echo "source ~/dotfiles/.bash_extra" >> ~/.bashrc
|
||||
|
||||
|
|
BIN
vim/spell/de.utf-8.spl
Normal file
BIN
vim/spell/de.utf-8.spl
Normal file
Binary file not shown.
BIN
vim/spell/de.utf-8.sug
Normal file
BIN
vim/spell/de.utf-8.sug
Normal file
Binary file not shown.
BIN
vim/spell/en.utf-8.spl
Normal file
BIN
vim/spell/en.utf-8.spl
Normal file
Binary file not shown.
BIN
vim/spell/en.utf-8.sug
Normal file
BIN
vim/spell/en.utf-8.sug
Normal file
Binary file not shown.
2
vim/spell/own.add
Normal file
2
vim/spell/own.add
Normal file
|
@ -0,0 +1,2 @@
|
|||
dotfiles
|
||||
Ansible
|
BIN
vim/spell/own.add.spl
Normal file
BIN
vim/spell/own.add.spl
Normal file
Binary file not shown.
Loading…
Reference in a new issue