New PS1, gitbranch in vim, working lock

This commit is contained in:
CramMK
2020-01-21 16:19:28 +01:00
parent aec5acf42f
commit d4548eb17e
4 changed files with 19 additions and 15 deletions

Submodule dotdrop updated: d242742d24...74ffe6a1b4

View File

@@ -1,21 +1,23 @@
######################## git_branch() {
### bashrc from Marc ### git branch 2>/dev/null | grep '^*' | colrm 1 2
######################## }
CHAR="\[\033[1;93m\]$\[\033[m\]" CHAR="\[\033[1;93m\]$\[\033[m\]"
NAME="\[\033[1;32m\]\u\[\033[m\]" NAME="\[\033[1;32m\]\u\[\033[m\]"
HOST="\[\033[0;37m\]\h\[\033[m\]" HOST="\[\033[0;37m\]\h\[\033[m\]"
GIT="\[\033[1;91m\](\$(git_branch))\[\033[m\]"
DIR="\[\033[1;94m\]\w\[\033[m\]" DIR="\[\033[1;94m\]\w\[\033[m\]"
export PS1="${NAME}@${HOST}:${DIR} ${CHAR} " export PS1="${NAME}@${HOST}:${DIR} ${GIT} ${CHAR} "
# dotfile management
alias dotdrop="~/dotfiles/dotdrop.sh --cfg=~/dotfiles/config.yaml" alias dotdrop="~/dotfiles/dotdrop.sh --cfg=~/dotfiles/config.yaml"
# shortcuts
alias ..="cd .." alias ..="cd .."
alias ll="ls -l" alias ll="ls -l"
alias la="ls -la" alias la="ls -la"
alias rm="rm -i" alias rm="rm -i"
alias bashrc="vim ~/.bashrc"
alias sourcebashrc="source ~/.bashrc"
alias sbash="sourcebashrc"
alias vimrc="vim ~/.vimrc"
# Source global definitions # Source global definitions
if [ -f /etc/bashrc ]; then if [ -f /etc/bashrc ]; then

View File

@@ -180,7 +180,7 @@ bar {
status_command i3status status_command i3status
} }
bindsym $mod+Shift+b exec "xlock -mode blank -startCmd /opt/genua/bin/isweg -endCmd /opt/genua/bin/isda" bindsym $mod+Shift+b exec "xlock -mode blank -startCmd /share/bin/isweg -endCmd /share/bin/isda"
bindsym $mod+Shift+d exec "xlock -mode matrix" bindsym $mod+Shift+d exec "xlock -mode matrix"
bindsym Ctrl+Shift+1 exec --no-startup-id setxkbmap us bindsym Ctrl+Shift+1 exec --no-startup-id setxkbmap us

View File

@@ -1,7 +1,3 @@
" #######################
" ### vimrc from Marc ###
" #######################
" Vundle Plugin Manager - START " Vundle Plugin Manager - START
" Required " Required
set nocompatible set nocompatible
@@ -14,6 +10,7 @@ Plugin 'jiangmiao/auto-pairs'
Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/nerdtree'
Plugin 'editorconfig/editorconfig-vim' Plugin 'editorconfig/editorconfig-vim'
Plugin 'maxboisvert/vim-simple-complete' Plugin 'maxboisvert/vim-simple-complete'
Plugin 'itchyny/vim-gitbranch'
" Colorscheme " Colorscheme
Plugin 'joshdick/onedark.vim' Plugin 'joshdick/onedark.vim'
@@ -28,12 +25,17 @@ filetype plugin indent on
" NerdTree " NerdTree
let NERDTreeShowHidden=1 let NERDTreeShowHidden=1
" Lightline Statusbar " Lightline Statusbar
" absolutepath or filename
set laststatus=2 set laststatus=2
let g:lightline = { let g:lightline = {
\ 'colorscheme': 'wombat', \ 'colorscheme': 'wombat',
\ 'active': { \ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'absolutepath', 'modified' ] ], \ 'left': [ [ 'mode', 'paste' ],
\} \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name'
\ },
\ } \ }
" Onedark Colorscheme " Onedark Colorscheme
let g:onedark_hide_endofbuffer=1 let g:onedark_hide_endofbuffer=1