diff options
| -rw-r--r-- | .bash_aliases | 3 | ||||
| -rw-r--r-- | .bashrc | 102 | ||||
| -rw-r--r-- | .gdbinit | 1 | ||||
| -rw-r--r-- | .ghci | 1 | ||||
| -rw-r--r-- | .gitconfig | 8 | ||||
| -rw-r--r-- | .my.tmuxtheme | 64 | ||||
| -rw-r--r-- | .pluggins.vim | 45 | ||||
| -rw-r--r-- | .profile | 3 | ||||
| -rw-r--r-- | .tmux.conf | 35 | ||||
| -rw-r--r-- | .vimrc | 138 | ||||
| -rw-r--r-- | .zshrc | 116 | ||||
| -rw-r--r-- | Makefile | 72 | ||||
| -rw-r--r-- | README.md | 20 | ||||
| -rw-r--r-- | redshift.conf | 14 |
14 files changed, 5 insertions, 617 deletions
diff --git a/.bash_aliases b/.bash_aliases deleted file mode 100644 index fffa45a..0000000 --- a/.bash_aliases +++ /dev/null @@ -1,3 +0,0 @@ -alias adg='sudo apt update && sudo apt upgrade -y' -alias yoump3='youtube-dl --extract-audio --audio-format mp3' -alias python="python3.7" diff --git a/.bashrc b/.bashrc deleted file mode 100644 index 9f2f3d0..0000000 --- a/.bashrc +++ /dev/null @@ -1,102 +0,0 @@ -# don't put duplicate lines or lines starting with space in the history. -# See bash(1) for more options -HISTCONTROL=ignoreboth - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 - -# 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, unless we know we "want" color) -case "$TERM" in - xterm-color|*-256color) color_prompt=yes;; -esac - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' -fi -unset color_prompt force_color_prompt - -# If this is an xterm set the title to user@host:dir -case "$TERM" in -xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -*) - ;; -esac - -# enable color support of ls and also add handy aliases -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - alias dir='dir --color=auto' - alias vdir='vdir --color=auto' - - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' -fi - -alias ll='ls -l' -alias la='ls -A' - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -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 - -# adding superuser bin to PATH -export PATH="/sbin:$PATH" - -# man with color -export LESS_TERMCAP_mb=$'\e[1;32m' -export LESS_TERMCAP_md=$'\e[1;32m' -export LESS_TERMCAP_me=$'\e[0m' -export LESS_TERMCAP_se=$'\e[0m' -export LESS_TERMCAP_so=$'\e[01;33m' -export LESS_TERMCAP_ue=$'\e[0m' -export LESS_TERMCAP_us=$'\e[1;4;31m' - -export PS1="\n\[$(tput bold)$(tput setaf 2)\]\w\n\[$(tput setaf 1)\]❯ \[$( tput sgr0)\]" - -# node alias -alias node="nodejs" - -# set XDG stuff -export XDG_CONFIG_HOME="/home/charles/.config/" -export XDG_DATA_HOME="/home/charles/.data/" diff --git a/.gdbinit b/.gdbinit deleted file mode 100644 index 9422460..0000000 --- a/.gdbinit +++ /dev/null @@ -1 +0,0 @@ -set disassembly-flavor intel @@ -1 +0,0 @@ -:set prompt λ> diff --git a/.gitconfig b/.gitconfig deleted file mode 100644 index 577206f..0000000 --- a/.gitconfig +++ /dev/null @@ -1,8 +0,0 @@ -[user] - name = Charles - email = sircharlesaze@gmail.com -[credential] - helper = cache - username = HappyTramp -[log] - decorate = full diff --git a/.my.tmuxtheme b/.my.tmuxtheme deleted file mode 100644 index ba03f56..0000000 --- a/.my.tmuxtheme +++ /dev/null @@ -1,64 +0,0 @@ -# -# Powerline Gray Block - Tmux Theme -# Created by Jim Myhrberg <contact@jimeh.me>. -# -# Inspired by vim-powerline: https://github.com/Lokaltog/powerline -# -# Requires terminal to be using a powerline compatible font, find one here: -# https://github.com/Lokaltog/powerline-fonts -# - -# Status update interval -set -g status-interval 1 - -# Basic status bar colors -set -g status-style fg=colour238,bg=colour233 - -# Left side of status bar -set -g status-left-style bg=colour233,fg=colour243 -set -g status-left-length 40 -set -g status-left "#[fg=colour232,bg=colour245,bold] #S #[fg=colour245,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]" - -# Right side of status bar -set -g status-right-style bg=colour233,fg=colour243 -set -g status-right-length 150 -set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour232,bg=colour245,bold] #H " - -# Window status -set -g window-status-format " #I:#W#F " -set -g window-status-current-format " #I:#W#F " - -# Current window status -set -g window-status-current-style bg=colour245,fg=colour232 - -# Window with activity status -set -g window-status-activity-style bg=colour233,fg=colour245 - -# Window separator -set -g window-status-separator "" - -# Window status alignment -set -g status-justify centre - -# Pane border -set -g pane-border-style bg=default,fg=colour235 - -# Active pane border -set -g pane-active-border-style bg=default,fg=colour240 - -# Pane number indicator -set -g display-panes-colour colour233 -set -g display-panes-active-colour colour245 - -# Clock mode -set -g clock-mode-colour colour240 -set -g clock-mode-style 24 - -# Message -set -g message-style bg=colour245,fg=colour232 - -# Command message -set -g message-command-style bg=colour233,fg=colour250 - -# Mode -set -g mode-style bg=colour243,fg=colour232 diff --git a/.pluggins.vim b/.pluggins.vim deleted file mode 100644 index 6e2f7a2..0000000 --- a/.pluggins.vim +++ /dev/null @@ -1,45 +0,0 @@ -" plugins -call plug#begin() - Plug 'scrooloose/nerdtree' " file tree - " Plug 'scrooloose/nerdcommenter' " comment multiple line - "Plug 'vim-airline/vim-airline' " status bar - Plug 'itchyny/lightline.vim' " minimal status bar - " Plug 'jiangmiao/auto-pairs' " pair stuff autocomplete - " Plug 'yuttie/comfortable-motion.vim' " scroll - Plug 'ctrlpvim/ctrlp.vim' " Ctrl-P similar to vsc - "Plug 'lervag/vimtex' " LaTex improvement - " better highlight syntax - Plug 'justinmk/vim-syntax-extra' - "Plug 'junegunn/goyo.vim' " focus mode - Plug 'w0rp/ale' " lint - Plug 'maximbaz/lightline-ale' - Plug 'romainl/vim-cool' " disable highlight after search - "Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install' } " markdown preview with math typeset - Plug 'vim-scripts/awk.vim' - Plug 'sheerun/vim-polyglot' " better syntax highlighting - Plug 'neovimhaskell/haskell-vim' " vim haskell highlighting - Plug 'haya14busa/incsearch.vim' " better incsearch - - - " themes - "Plug 'mhartington/oceanic-next' - "Plug 'joshdick/onedark.vim' - Plug 'morhetz/gruvbox' - Plug 'shinchu/lightline-gruvbox.vim' - Plug 'dracula/vim', { 'as': 'dracula' } - "Plug 'jdkanani/vim-material-theme' - Plug 'ayu-theme/ayu-vim' - "Plug 'vim-airline/vim-airline-themes' - Plug 'connorholyday/vim-snazzy' - Plug 'chriskempson/base16-vim' - - Plug 'tomtom/tcomment_vim' " other min commenter - " Plug 'tpope/vim-commentary' " minimalistic commenter - Plug 'tpope/vim-surround' " surround stuff - Plug 'tpope/vim-eunuch' " command in vim - - "Plug 'terryma/vim-multiple-cursors' - "Plug 'Valloric/YouCompleteMe' " autocomplete - "Plug 'fatih/vim-go' - "Plug 'Yggdroot/indentLine' " indent guide -call plug#end() diff --git a/.profile b/.profile deleted file mode 100644 index 7711501..0000000 --- a/.profile +++ /dev/null @@ -1,3 +0,0 @@ -if [ -z $TMUX ]; then - redshift -c $HOME/.dotfiles/redshift.conf & -fi diff --git a/.tmux.conf b/.tmux.conf deleted file mode 100644 index d023ca5..0000000 --- a/.tmux.conf +++ /dev/null @@ -1,35 +0,0 @@ -unbind C-b -set -g prefix C-f -bind C-f send-prefix - -set -g default-terminal "screen.xterm-256color" -set -g mouse on -setw -g mode-keys vi - -bind '"' split-window -c "#{pane_current_path}" -bind ù split-window -h -c "#{pane_current_path}" -bind c new-window -c "#{pane_current_path}" - -unbind [ -bind y copy-mode -unbind p -bind p paste-buffer -bind-key -t vi-copy 'v' begin-selection -bind-key -t vi-copy 'y' copy-selection -bind-key -t vi-copy 'r' rectangle-toggle - -bind -t vi-copy y copy-pipe "xclip -sel clip -i" - -source-file $HOME/dotfiles/.my.tmuxtheme - -set -sg escape-time 0 - -unbind l -bind k select-pane -U -bind j select-pane -D -bind l select-pane -R -bind h select-pane -L - -bind v previous-window - -unbind m @@ -1,137 +1,5 @@ -if &term =~# '^screen' - let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" - let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" - set termguicolors " overwrite terminal theme -endif +syn on +set relativenumber -so $HOME/dotfiles/.pluggins.vim " source pluggins +nmap gcc 0i//<ESC> -let mapleader = ' ' - -syntax enable -set hidden -set noswapfile -set nocompatible -filetype plugin indent on " add specific rules for certain file type -set number relativenumber -" browse list with tab -set wildmode=longest,list,full -set wildmenu -set path+=** " for recursive :find -" more intuitif split opening -set splitbelow -set splitright -set fcs+=vert:\ " split separator -" easier split navigation -nnoremap <C-J> <C-W><C-J> -nnoremap <C-K> <C-W><C-K> -nnoremap <C-L> <C-W><C-L> -nnoremap <C-H> <C-W><C-H> -" spit resizing -nnoremap zh <C-W>> -nnoremap zl <C-W>< -nnoremap zj <C-W>- -nnoremap zk <C-W>+ -" tab to space -" set expandtab -" set tabstop=4 -" set shiftwidth=4 -" set smarttab -" set autoindent -" set smartindent -" search -set ignorecase -set smartcase -set hlsearch -set incsearch -" other -set ruler -set laststatus=2 " always a statusline -set scrolloff=2 " 2 line above scroll -set showcmd -set cursorline " highlight current line -set noshowmode " unnecessary with status bar" -set noshowmatch - -set autoread " reload files when changes happen outside vim - -" where to place the .swp files -" set backupdir=~/.vim-tmp,~/.tmp,~/tmp,~/var/tmp -" set directory=~/.vim-tmp,~/.tmp,~/tmp,~/var/tmp -" directory to ignore when searching in file tree (works with ctrlp) -set wildignore=*/tmp/*,*.o,*.so,*.swp,*.zip,*/node_modules/*,*/vendor/*,.bundle/*,bin/*,.git/* -" ctrlp ignore all stuff in the .gitignore -let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] - -" ALE -highlight clear ALEErrorSign -highlight clear ALEWarningSign -let g:ale_sign_error = '>' -let g:ale_sign_warning = '-' -let g:ale_lint_on_text_changed = 'never' -let g:ale_lint_on_enter = 0 -let g:ale_echo_msg_error_str = 'E' -let g:ale_echo_msg_warning_str = 'W' -let g:ale_echo_msg_format = '[%linter%] %s [%severity%]' -let g:ale_linters = { - \ 'python': ['flake8'] - \ } -let g:ale_fixers = { - \ 'python': ['autopep8'] - \ } - -" let g:gruvbox_italic=1 -let g:gruvbox_contrast_dark="hard" -colorscheme gruvbox -set background=dark -let g:lightline = {} -let g:lightline.colorscheme = 'jellybeans' -" let g:lightline.component_expand = { -" \ 'linter_checking': 'lightline#ale#checking', -" \ 'linter_warnings': 'lightline#ale#warnings', -" \ 'linter_errors': 'lightline#ale#errors', -" \ 'linter_ok': 'lightline#ale#ok', -" \ } -" let g:lightline.component_type = { -" \ 'linter_checking': 'left', -" \ 'linter_warnings': 'warning', -" \ 'linter_errors': 'error', -" \ 'linter_ok': 'left', -" \ } -" let g:lightline.active = { 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ]] } - -let base16colorspace=256 - -" NERDTree shortcut -map <Leader>d :NERDTreeToggle<CR> -map <Leader>f :NERDTreeFocus<CR> - -" Global copy and paste -vnoremap <C-l> "+y -noremap <C-m> "+P - -" 'Y' yank to the end of the line -:noremap Y y$ - -" remove trailing white space on save -autocmd BufWritePre * %s/\s\+$//e - -" solves annoying delay went exiting insert mode -imap <ESC> <C-C> -imap jj <ESC> - -" remove visual mode keybinding -map Q <ESC> - -" c source and header files comment formats for vim-commentary -" autocmd Filetype c setlocal commentstring=// %s -" autocmd Filetype h setlocal commentstring=// %s - -set encoding=utf-8 - -set textwidth=89 " when line wrap occurs - -" incsearch mapping -map / <Plug>(incsearch-forward) -map ? <Plug>(incsearch-backward) -map g/ <Plug>(incsearch-stay) @@ -1,118 +1,2 @@ -export ZSH="$HOME/.oh-my-zsh" - -ZSH_THEME="" -# ZSH_THEME="robbyrussell" -HYPHEN_INSENSITIVE="true" -DISABLE_MAGIC_FUNCTIONS=true -HIST_STAMPS="dd/mm/yyyy" - -#school stuff -ZSH_DISABLE_COMPFIX=true - -export FPATH="$FPATH:$HOME/.zsh/pure" - -plugins=(colorize git zsh-syntax-highlighting) -source $ZSH/oh-my-zsh.sh - -autoload -U promptinit; promptinit -prompt pure - -bindkey -v -export KEYTIMEOUT=1 - -setopt auto_cd -setopt pushd_ignore_dups -setopt list_rows_first -setopt extendedglob - -# alias expansion -bindkey "^ " _expand_alias # ctrl+space to expand -bindkey " " magic-space # space to avoid expansion -bindkey -M isearch " " magic-space - -# alt-arrow to go forward/backward a word -# bindkey "^[[C" forward-word -# bindkey "^[[D" backward-word - -alias -g G='| grep' -alias -g L='| less' -alias -g LO='192.168.0.' -alias -g HUB="https://github.com/HappyTramp/" -alias rr='rm -r' -alias ll="ls -lFh" -alias la="ls -a" -alias lA="ls -al" -alias lss="ls -Ssh" -alias less="less -N" -alias mkdir="mkdir -p" -alias tree="tree -I '__pycache__'" alias v="vim" -alias :q="exit" -alias :sp="tmux split-window" -alias :vsp="tmux split-window -h" -alias nmaplan="sudo nmap -sP '192.168.0.*'" -alias gdb="gdb -q" -alias node="nodejs" -alias python="python3.7" -alias info="info --vi-keys" alias moula="gcc -Wall -Wextra -Werror" -alias norm="norminette" -alias normch="norm *.c *.h" -alias list-c-includes-paths="echo | gcc -E -Wp,-v -" -alias yoump3='youtube-dl --extract-audio --audio-format mp3' -alias adg="sudo apt update && sudo apt upgrade" - -function chpwd() { - file_count=$(ls | wc -w) - if [ $file_count -lt 30 ]; then - ls - else - echo "$(pwd) contains $file_count files" - fi -} - -# behavior on enter -# function precmd() { -# echo $0; -# if ["${0}" -eq ""]; then -# ls -# else -# $1 -# fi; -# } - -export DOTFILES=$HOME/dotfiles -alias zshrc="vim $DOTFILES/.zshrc && source $DOTFILES/.zshrc" -alias vimrc="vim $DOTFILES/.vimrc" -alias vimplugrc="vim $DOTFILES/.vimrc -c 'vsp $DOTFILES/.pluggins.vim'" -alias tmuxrc="vim $DOTFILES/.tmux.conf && tmux source-file $DOTFILES/.tmux.conf" - -# vim keys in tab completion menu (https://www.youtube.com/watch?v=eLEo4OQ-cuQ) -bindkey -M menuselect 'h' vi-backward-char -bindkey -M menuselect 'k' vi-up-line-or-history -bindkey -M menuselect 'l' vi-forward-char -bindkey -M menuselect 'j' vi-down-line-or-history -bindkey -v '^?' backward-delete-char - -# add command-not-found package suggestion -#source /etc/zsh_command_not_found - -# add /sbin to $PATH -export PATH="/sbin:/usr/local/sbin:/usr/sbin:$PATH" -# add my bin -export PATH="$HOME/bin:$PATH" - -# man with color -export LESS_TERMCAP_mb=$'\e[1;32m' -export LESS_TERMCAP_md=$'\e[1;32m' -export LESS_TERMCAP_me=$'\e[0m' -export LESS_TERMCAP_se=$'\e[0m' -export LESS_TERMCAP_so=$'\e[01;33m' -export LESS_TERMCAP_ue=$'\e[0m' -export LESS_TERMCAP_us=$'\e[1;4;31m' - -# XDG stuff -export XDG_CONFIG_HOME="/home/charles/.config/" -export XDG_DATA_HOME="/home/charles/.data/" - -export EDITOR="vim" diff --git a/Makefile b/Makefile deleted file mode 100644 index 6a759c0..0000000 --- a/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -DOTDIR = $(HOME)/dotfiles -ZSHRC = .zshrc -VIMRC = .vimrc -TMUXCONF = .tmux.conf -BASHRC = .bashrc -BASHALIAS = .bash_aliases -PROFILE = .profile -GHCI = .ghci -GDB = .gdbinit -GITCONFIG = .gitconfig -CONFFILES = $(HOME)/$(ZSHRC) $(HOME)/$(VIMRC) $(HOME)/$(TMUXCONF) $(HOME)/$(BASHRC) \ - $(HOME)/$(BASHALIAS) $(HOME)/$(PROFILE) $(HOME)/$(GHCI) $(HOME)/$(GDB) \ - $(HOME)/$(GITCONFIG) - -.PHONY: all -all: $(CONFFILES) - -$(HOME)/$(ZSHRC): $(DOTDIR)/$(ZSHRC) - touch $@ - echo "source $<" > $@ - -$(HOME)/$(VIMRC): $(DOTDIR)/$(VIMRC) - touch $@ - echo "so $<" > $@ - -$(HOME)/$(TMUXCONF): $(DOTDIR)/$(TMUXCONF) - touch $@ - echo "source-file $<" > $@ - -$(HOME)/$(BASHRC): $(DOTDIR)/$(BASHRC) - touch $@ - echo "source $<" > $@ - -$(HOME)/$(BASHALIAS): $(DOTDIR)/$(BASHALIAS) - touch $@ - echo "source $<" > $@ - -$(HOME)/$(PROFILE): $(DOTDIR)/$(PROFILE) - touch $@ - echo "source $<" > $@ - -$(HOME)/$(GHCI): $(DOTDIR)/$(GHCI) - touch $@ - cat $< > $@ - -$(HOME)/$(GDB): $(DOTDIR)/$(GDB) - touch $@ - cat $< > $@ - -$(HOME)/$(GITCONFIG): $(DOTDIR)/$(GITCONFIG) - touch $@ - cat $< >> $@ - -.PHONY: clean -clean: - rm -f $(CONFFILES) - -.PHONY: re -re: clean all - -# .PHONY: dependencies -# dependencies: -# @echo "Installing vim-plug (plugin manager)" -# curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ -# https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -# @echo "Installing vim plugins" -# vim -c "PlugInstall" -c "qa" -# @echo "Installing oh-my-zsh" - # sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" - # @echo "Installing zsh-syntax-highlighting" - # git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ - # ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting @@ -1,21 +1,5 @@ # Configuration files -## Installation +## Exam branch -1. backup your current configuration files, they will be overwrite -2. `cd` in this repo -3. run `make` - -## Tools I use - -* [vim](https://github.com/vim/vim): terminal text editor -* [zsh](https://www.zsh.org/): interactive shell -* [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh): plugins and themes for zsh -* [tmux](https://github.com/tmux/tmux): multiple terminal/panel -* [redshift](https://github.com/jonls/redshift): change screen color temperature - -The tmux theme can be found [here](https://github.com/jimeh/tmux-themepack). - -## School 19 Config - -Configuration for school 19 can be found on the [s19](https://github.com/HappyTramp/dotfiles/tree/s19) branch. +Minimal config files for exams diff --git a/redshift.conf b/redshift.conf deleted file mode 100644 index f012aba..0000000 --- a/redshift.conf +++ /dev/null @@ -1,14 +0,0 @@ -[redshift] -temp-day=3000 -temp-night=2600 - -; transition day/night -fade=1 - -; manual location (geo location not working) -location-provider=manual - -; latitude and longitude -[manual] -lat=50.8008858 -lon=4.2886091 |
