From bb31dbfd4e788f0efcbb0e6ab8264a12116aa672 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 7 Mar 2020 23:40:57 +0100 Subject: xmonad brightness handling --- .vimrc | 13 +++++++------ grep.vim | 18 ++++++++++++++++++ install.sh | 7 ++++++- xmonad.hs | 7 ++----- 4 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 grep.vim diff --git a/.vimrc b/.vimrc index 9d7059e..7a329af 100644 --- a/.vimrc +++ b/.vimrc @@ -106,26 +106,27 @@ nnoremap l :ls " file manipulation with leader nnoremap w :w nnoremap x :x - " open vimrc in split nnoremap rc :vsplit $MYVIMRC " source vimrc nnoremap src :source $MYVIMRC - " file toggle nnoremap z zi - " create c function body from prototype nnoremap gcf A{} - " put semicolon at the end of line nnoremap ; mqA;`q +" grep +" nnoremap gw :silent grep -R .:copen +" nnoremap gW :silent execute "grep! -R " . shellescape(expand("")) . " .":copen +" nnoremap gn :cnext +" nnoremap gp :cprevious + + " remove trailing white space on save autocmd BufWritePre * %s/\s\+$//e - " initialise buf for fold toggle autocmd BufReadPre * :normal zMzi - " real tab in c file for school projects autocmd Filetype c setlocal noexpandtab diff --git a/grep.vim b/grep.vim new file mode 100644 index 0000000..3b80fa1 --- /dev/null +++ b/grep.vim @@ -0,0 +1,18 @@ +nnoremap g :set operatorfunc=GrepOpg@ +vnoremap g :call GrepOp(visualmode()) + +function! s:GrepOp(type) + let saved = @@ + + if a:type ==# 'v' + execute "normal! `y" + elseif a:type ==# 'char' + execute "normal! `[v`]y" + else + return + endif + + silent execute "grep! -R " . shellescape(@@) . " ." + copen + let @@ = saved +endfunction diff --git a/install.sh b/install.sh index 4076d59..1929eb8 100755 --- a/install.sh +++ b/install.sh @@ -10,6 +10,8 @@ # Creating links ln -sf $DOTDIR/.zshrc $HOME/.zshrc ln -sf $DOTDIR/.vimrc $HOME/.vimrc +[ ! -d $HOME/.vim/plugin ] && mkdir -p $HOME/.vim/plugin +ln -sf $DOTDIR/grep.vim $HOME/.vim/plugin/grep.vim [ ! -d $HOME/.xmonad ] && mkdir $HOME/.xmonad ln -sf $DOTDIR/xmonad.hs $HOME/.xmonad/xmonad.hs @@ -26,8 +28,11 @@ ln -sf $DOTDIR/redshift.conf $HOME/.config/redshift.conf ################ # vim Plug -curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ +PLUGFILE=$HOME/.vim/autoload/plug.vim +if [ ! -f $PLUGFILE ]; then +curl -fLo $PLUGFILE --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +fi vim -c "PlugInstall" -c "qa" # zsh pluggins diff --git a/xmonad.hs b/xmonad.hs index eb9edb3..d64f95b 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -27,9 +27,6 @@ myStartupHook = do myKeys = [ ("", spawn "pulseaudio-ctl up") , ("", spawn "pulseaudio-ctl down") , ("", spawn "pulseaudio-ctl mute") + , ("", spawn "xbacklight -inc 5") + , ("", spawn "xbacklight -dec 5") ] - -- , ("", spawn "playerctl play-pause") - -- , ("", spawn "playerctl previous") - -- , ("", spawn "playerctl next") - -- , ("", spawn "lux -a 5%") - -- , ("", spawn "lux -s 5%") -- cgit From a07ae4a5994380a1a5f40823ce40ac8fd4e6644a Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 9 Mar 2020 12:37:02 +0100 Subject: Added vimrc fold marker --- .gitconfig | 2 +- .vimrc | 94 ++++++++++++++++++++++++++++++++++++++++++++------------------ grep.vim | 9 ++++++ 3 files changed, 77 insertions(+), 28 deletions(-) diff --git a/.gitconfig b/.gitconfig index 577206f..2aa7aac 100644 --- a/.gitconfig +++ b/.gitconfig @@ -2,7 +2,7 @@ name = Charles email = sircharlesaze@gmail.com [credential] - helper = cache + helper = store username = HappyTramp [log] decorate = full diff --git a/.vimrc b/.vimrc index 7a329af..ec90935 100644 --- a/.vimrc +++ b/.vimrc @@ -2,10 +2,15 @@ " vimrc " """""""""" -" load pluggins +" load pluggins {{{ source $HOME/dotfiles/.pluggins.vim +" }}} -" common +""""""""""" +" options " +""""""""""" + +" common {{{ let mapleader = ' ' " set leader key to space let maplocalleader = '-' " set file local leader key to backslash set nocompatible " not compatible with vi @@ -21,61 +26,77 @@ set scrolloff=2 " line padding when scrolling set textwidth=89 " when line wrap occurs set encoding=utf-8 " utf-8 encoding filetype plugin indent on " allow to add specific rules for certain type of file +" }}} -" browse list with tab +" browse list with tab {{{ set wildmode=longest,list,full set wildmenu " tab to cycle through completion options set path+=** " recursive :find +"}}} -" intuitif split opening +" intuitif split opening {{{ set splitbelow set splitright set fcs+=vert:\ " no split separator +" }}} -" tab +" tab {{{ set expandtab " tab to space set tabstop=4 " tab size set shiftwidth=4 set smarttab set autoindent set smartindent +" }}} -" file search +" file search {{{ set ignorecase " case insensitive set smartcase set hlsearch " match highlight set incsearch +" }}} -" status +" status {{{ set laststatus=2 " always a statusline (all window) set showcmd " show current partial command in the bottom right set noshowmode " dont show current mode (i.e --INSERT--) +" }}} -" fold +" fold {{{ set foldmethod=indent " create fold based on the text indent +" }}} -" ctrlp pluggin +" ctrlp pluggin {{{ " directory to ignore when searching in file tree 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'] +" }}} + +""""""""""""""" +" colorscheme " +""""""""""""""" -" colorscheme +" one {{{ let g:onedark_terminal_italics=1 colorscheme onedark let g:lightline = {} let g:lightline.colorscheme = 'one' " lightline theme to onedark +" }}} + """""""""""" " mappings " """""""""""" -" split navigation +" split navigation {{{ nnoremap nnoremap nnoremap nnoremap +" }}} +" common {{{ " 'Y' yank to the end of the line noremap Y y$ " solves annoying delay went exiting insert mode @@ -98,35 +119,54 @@ nnoremap ) 10j " tag nagigation nnoremap ] nnoremap t -" buffer navigation +" }}} + +" buffer navigation {{{ nnoremap n :bn nnoremap p :bp nnoremap :b# nnoremap l :ls -" file manipulation with leader -nnoremap w :w -nnoremap x :x -" open vimrc in split +" }}} + +" vimrc {{{ nnoremap rc :vsplit $MYVIMRC -" source vimrc nnoremap src :source $MYVIMRC -" file toggle -nnoremap z zi +" }}} + +" c {{{ " create c function body from prototype nnoremap gcf A{} " put semicolon at the end of line nnoremap ; mqA;`q - -" grep -" nnoremap gw :silent grep -R .:copen -" nnoremap gW :silent execute "grep! -R " . shellescape(expand("")) . " .":copen -" nnoremap gn :cnext -" nnoremap gp :cprevious - - +" quickfix window toggle +" }}} + +" quickfix window toggle {{{ +nnoremap q :call QuickfixToggle() +let g:quickfix_is_open = 0 +if !exists('*QuickfixToggle') + function QuickfixToggle() + if g:quickfix_is_open + cclose + let g:quickfix_is_open = 0 + else + copen + let g:quickfix_is_open = 1 + endif + endfunction +endif +" }}} + +" hook {{{ " remove trailing white space on save autocmd BufWritePre * %s/\s\+$//e " initialise buf for fold toggle autocmd BufReadPre * :normal zMzi +" }}} + +" filetype {{{ " real tab in c file for school projects autocmd Filetype c setlocal noexpandtab +" vim fold method to marker +autocmd Filetype vim setlocal foldmethod=marker +" }}} diff --git a/grep.vim b/grep.vim index 3b80fa1..625dfa1 100644 --- a/grep.vim +++ b/grep.vim @@ -13,6 +13,15 @@ function! s:GrepOp(type) endif silent execute "grep! -R " . shellescape(@@) . " ." + silent redraw! + let g:quickfix_is_open = 1 copen let @@ = saved endfunction + + +" nnoremap gw :silent grep -R .:copen +" nnoremap gW :silent execute "grep! -R " . shellescape(expand("")) . " .":copen + +nnoremap gn :cnext +nnoremap gp :cprevious -- cgit From ebb061bc953b647bc2944e4f203f2d3fd30d181d Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 13 Mar 2020 18:17:19 +0100 Subject: xmonad fullscreen without borders --- .vimrc | 2 ++ .zsh_aliases | 9 +++++++-- grep.vim | 4 ---- xmonad.hs | 32 ++++++++++++++++++-------------- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/.vimrc b/.vimrc index ec90935..cc4fdad 100644 --- a/.vimrc +++ b/.vimrc @@ -94,6 +94,7 @@ nnoremap nnoremap nnoremap nnoremap +nnoremap s= = " }}} " common {{{ @@ -166,6 +167,7 @@ autocmd BufReadPre * :normal zMzi " filetype {{{ " real tab in c file for school projects +autocmd BufReadPre,BufNewFile *.h,*.c set filetype=c autocmd Filetype c setlocal noexpandtab " vim fold method to marker autocmd Filetype vim setlocal foldmethod=marker diff --git a/.zsh_aliases b/.zsh_aliases index 6644105..72b727f 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -18,7 +18,7 @@ alias sudo="sudo " # enable color (the search for aliases continues) # ls alias ll="ls -lFh" alias la="ls -a" -alias lla="ls -al" +alias lla="ls -alh" alias lss="ls -Ssh" # tree @@ -65,4 +65,9 @@ alias zshrc="vim $DOTFILES/.zshrc && source $DOTFILES/.zshrc" alias zshaliasrc="vim $DOTFILES/.zsh_aliases && source $DOTFILES/.zshrc" alias vimrc="vim $DOTFILES/.vimrc" alias vimplugrc="vim $DOTFILES/.pluggins.vim" -alias xmonadrc="vim $DOTFILES/xmonad.hs && cp $DOTFILES/xmonad.hs $HOME/.xmonad/xmonad.hs" +alias xmonadrc="vim $DOTFILES/xmonad.hs" + +# parent directory jump +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' diff --git a/grep.vim b/grep.vim index 625dfa1..32181f7 100644 --- a/grep.vim +++ b/grep.vim @@ -19,9 +19,5 @@ function! s:GrepOp(type) let @@ = saved endfunction - -" nnoremap gw :silent grep -R .:copen -" nnoremap gW :silent execute "grep! -R " . shellescape(expand("")) . " .":copen - nnoremap gn :cnext nnoremap gp :cprevious diff --git a/xmonad.hs b/xmonad.hs index d64f95b..99a35e8 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -5,28 +5,32 @@ import XMonad.Config.Desktop import XMonad.Util.SpawnOnce import XMonad.Util.EZConfig(additionalKeysP) -myModMask = mod4Mask -myTerminal = "konsole" -myTextEditor = "vim" -myBorderWidth = 2 +-- Layouts +import XMonad.Layout.NoBorders + main = do xmonad $ desktopConfig - { modMask = myModMask - , terminal = myTerminal - , startupHook = myStartupHook - , borderWidth = myBorderWidth + { modMask = mod4Mask -- mod key to super + , terminal = "konsole" + , borderWidth = 1 + , focusFollowsMouse = False -- don't change window based on mouse position (need to click) , normalBorderColor = "#292d3e" , focusedBorderColor = "#bbc5ff" + , layoutHook = myLayouts + , startupHook = myStartupHook } `additionalKeysP` myKeys +myLayouts = tiled ||| Mirror tiled ||| noBorders Full + where tiled = Tall 1 (3 / 100) (3 / 5) + myStartupHook = do spawnOnce "redshift -c /home/charles/.config/redshift.conf &" spawnOnce "xinput disable 'ETPS/2 Elantech Touchpad' &" -myKeys = [ ("", spawn "pulseaudio-ctl up") - , ("", spawn "pulseaudio-ctl down") - , ("", spawn "pulseaudio-ctl mute") - , ("", spawn "xbacklight -inc 5") - , ("", spawn "xbacklight -dec 5") - ] +myKeys = [ ("", spawn "pulseaudio-ctl up") + , ("", spawn "pulseaudio-ctl down") + , ("", spawn "pulseaudio-ctl mute") + , ("", spawn "xbacklight -inc 5") + , ("", spawn "xbacklight -dec 5") + ] -- cgit From 66c963bb41213bc09dac88b201ba67ba4d0835ad Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 28 Mar 2020 22:25:24 +0100 Subject: Added vim pluggin: quick-scope --- .pluggins.vim | 1 + .vimrc | 22 +++++++++++++++------- xmonad.hs | 6 ++++-- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.pluggins.vim b/.pluggins.vim index c3951a5..2312e9a 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -5,6 +5,7 @@ call plug#begin() Plug 'tpope/vim-eunuch' " basic unix command in vim Plug 'tomtom/tcomment_vim' " mininal commenter Plug 'itchyny/lightline.vim' " minimal status bar + Plug 'unblevable/quick-scope' " highlight first char to jump to word " bloat?? Plug 'romainl/vim-cool' " disable highlight after search diff --git a/.vimrc b/.vimrc index cc4fdad..684528c 100644 --- a/.vimrc +++ b/.vimrc @@ -66,13 +66,6 @@ set noshowmode " dont show current mode (i.e --INSERT--) set foldmethod=indent " create fold based on the text indent " }}} -" ctrlp pluggin {{{ -" directory to ignore when searching in file tree -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'] -" }}} - """"""""""""""" " colorscheme " """"""""""""""" @@ -172,3 +165,18 @@ autocmd Filetype c setlocal noexpandtab " vim fold method to marker autocmd Filetype vim setlocal foldmethod=marker " }}} + +"""""""""""" +" pluggins " +"""""""""""" + +" ctrlp {{{ +" directory to ignore when searching in file tree +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'] +" }}} + +" quick-scope {{{ +let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] +" }}} diff --git a/xmonad.hs b/xmonad.hs index 99a35e8..90c536e 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -21,8 +21,10 @@ main = do , startupHook = myStartupHook } `additionalKeysP` myKeys -myLayouts = tiled ||| Mirror tiled ||| noBorders Full - where tiled = Tall 1 (3 / 100) (3 / 5) +myLayouts = tiledBigMaster ||| Mirror tiledEven ||| noBorders Full + where tiledBigMaster = Tall 1 (3 / 100) (3 / 5) + tiledEven = Tall 1 (3 / 100) (1 / 2) + myStartupHook = do spawnOnce "redshift -c /home/charles/.config/redshift.conf &" -- cgit From f7bd76cf8f012781a18bf6b3d50bd2a9ef7dac30 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 30 Mar 2020 20:53:59 +0200 Subject: Add vim doxygen/norm comment style --- .vimrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.vimrc b/.vimrc index 684528c..3416740 100644 --- a/.vimrc +++ b/.vimrc @@ -132,7 +132,9 @@ nnoremap src :source $MYVIMRC nnoremap gcf A{} " put semicolon at the end of line nnoremap ; mqA;`q -" quickfix window toggle +" doxygen format comments +autocmd Filetype c setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ +autocmd Filetype h setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ " }}} " quickfix window toggle {{{ -- cgit From 6cb4a877a2e9a59c3c17d477333840e5ae13ed82 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 31 Mar 2020 11:31:22 +0200 Subject: Removed .bashrc default junk --- .bashrc | 88 +++++------------------------------------------------------------ .vimrc | 4 +-- 2 files changed, 8 insertions(+), 84 deletions(-) diff --git a/.bashrc b/.bashrc index 9f2f3d0..a7c7c06 100644 --- a/.bashrc +++ b/.bashrc @@ -1,85 +1,12 @@ -# 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 +########### +# .bashrc # +########### +alias ls='ls --color=auto' +alias grep='grep --color=auto' 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" @@ -94,9 +21,6 @@ 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 +# set XDG paths export XDG_CONFIG_HOME="/home/charles/.config/" export XDG_DATA_HOME="/home/charles/.data/" diff --git a/.vimrc b/.vimrc index 3416740..1fc69f0 100644 --- a/.vimrc +++ b/.vimrc @@ -74,7 +74,7 @@ set foldmethod=indent " create fold based on the text indent let g:onedark_terminal_italics=1 colorscheme onedark let g:lightline = {} -let g:lightline.colorscheme = 'one' " lightline theme to onedark +let g:lightline.colorscheme = 'jellybeans' " lightline theme to onedark " }}} @@ -134,7 +134,7 @@ nnoremap gcf A{} nnoremap ; mqA;`q " doxygen format comments autocmd Filetype c setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ -autocmd Filetype h setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ +autocmd Filetype cpp setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ " }}} " quickfix window toggle {{{ -- cgit From 10d80f8d2858de6da4a73073e3f68dfd269d6cff Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 31 Mar 2020 11:51:43 +0200 Subject: Install script refactoring --- install.sh | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index 1929eb8..96d1496 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,16 @@ #!/bin/sh +create_dotfile_link() +{ + ln -sf $DOTDIR/$1 $HOME/$2 + echo "Created link for $1 to $HOME/$2" +} + +create_dotfile_link_same() +{ + create_dotfile_link $1 $1 +} + ########################### # dotfiles install script # ########################### @@ -8,44 +19,48 @@ [ -z $DOTDIR ] && DOTDIR=`pwd` # Creating links -ln -sf $DOTDIR/.zshrc $HOME/.zshrc -ln -sf $DOTDIR/.vimrc $HOME/.vimrc +create_dotfile_link_same .zshrc +create_dotfile_link_same .bashrc +create_dotfile_link_same .vimrc [ ! -d $HOME/.vim/plugin ] && mkdir -p $HOME/.vim/plugin -ln -sf $DOTDIR/grep.vim $HOME/.vim/plugin/grep.vim +create_dotfile_link grep.vim .vim/plugin/grep.vim [ ! -d $HOME/.xmonad ] && mkdir $HOME/.xmonad -ln -sf $DOTDIR/xmonad.hs $HOME/.xmonad/xmonad.hs +create_dotfile_link xmonad.hs .xmonad/xmonad.hs -ln -sf $DOTDIR/.gdbinit $HOME/.gdbinit -ln -sf $DOTDIR/.ghci $HOME/.ghci -ln -sf $DOTDIR/.gitconfig $HOME/.gitconfig +create_dotfile_link_same .gdbinit +create_dotfile_link_same .ghci +create_dotfile_link_same .gitconfig [ ! -d $HOME/.config ] && mkdir $HOME/.config -ln -sf $DOTDIR/redshift.conf $HOME/.config/redshift.conf +create_dotfile_link redshift.conf .config/redshift.conf ################ # dependencies # ################ +[ $# -ge 1 ] || [ "$1" = "--ln" ] && exit 0 +echo "Installing Dependencies" + # vim Plug PLUGFILE=$HOME/.vim/autoload/plug.vim -if [ ! -f $PLUGFILE ]; then -curl -fLo $PLUGFILE --create-dirs \ - https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -fi +PLUGURL='https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' +[ ! -f $PLUGFILE ] && echo "Downloading plug.vim" && \ + curl -fLo $PLUGFILE --create-dirs $PLUGURL +echo "Installing plug.vim Pluggins" vim -c "PlugInstall" -c "qa" # zsh pluggins [ ! -d $HOME/.zsh ] && make $HOME/.zsh # pure theme -[ ! -d $HOME/.zsh/pure ] && \ +[ ! -d $HOME/.zsh/pure ] && echo "Installing zsh pure theme" && \ git clone https://github.com/sindresorhus/pure \ $HOME/.zsh/pure # syntax hightlighting -[ ! -d $HOME/.zsh/zsh-syntax-highlighting ] && \ +[ ! -d $HOME/.zsh/zsh-syntax-highlighting ] && echo "Installing zsh syntax highlighting plugin" && \ git clone https://github.com/zsh-users/zsh-syntax-highlighting \ $HOME/.zsh/zsh-syntax-highlighting # you should use -[ ! -d $HOME/.zsh/zsh-you-should-use ] && \ +[ ! -d $HOME/.zsh/zsh-you-should-use ] && echo "Installing zsh you should use plugin" && \ git clone https://github.com/MichaelAquilina/zsh-you-should-use \ $HOME/.zsh/zsh-you-should-use -- cgit From 5828534933ffd5ca23c6e47b7c12a4a2637e01f0 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 14 Apr 2020 13:06:17 +0200 Subject: Added vim functions to help with boilerplate in c++ files --- .alacritty.yml | 43 ++++++++++++++++++++++++++++++++++++++++++ .ghci | 2 +- .pluggins.vim | 8 +++++++- .vimrc | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- .zsh_aliases | 12 +++++++++++- .zshrc | 18 +++++++++++++----- redshift.conf | 2 +- 7 files changed, 130 insertions(+), 14 deletions(-) create mode 100644 .alacritty.yml diff --git a/.alacritty.yml b/.alacritty.yml new file mode 100644 index 0000000..ddfce65 --- /dev/null +++ b/.alacritty.yml @@ -0,0 +1,43 @@ +############# +# alacritty # +############# + +# font +font: + size: 9 + normal: + family: Fira Code + + + offset: + x: 0 + y: 0 + +# colorscheme (Dracula) +colors: + # Default colors + primary: + background: '#282a36' + foreground: '#f8f8f2' + + # Normal colors + normal: + black: '#000000' + red: '#ff5555' + green: '#50fa7b' + yellow: '#f1fa8c' + blue: '#caa9fa' + magenta: '#ff79c6' + cyan: '#8be9fd' + white: '#bfbfbf' + + # Bright colors + bright: + black: '#575b70' + red: '#ff6e67' + green: '#5af78e' + yellow: '#f4f99d' + blue: '#caa9fa' + magenta: '#ff92d0' + cyan: '#9aedfe' + white: '#e6e6e6' diff --git a/.ghci b/.ghci index ec73138..31f559e 100644 --- a/.ghci +++ b/.ghci @@ -1 +1 @@ -:set prompt λ> +:set prompt "λ " diff --git a/.pluggins.vim b/.pluggins.vim index 2312e9a..9289f7f 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -1,6 +1,5 @@ " plugins call plug#begin() - Plug 'joshdick/onedark.vim' " theme Plug 'ctrlpvim/ctrlp.vim' " Ctrl-P similar to vsc Plug 'tpope/vim-eunuch' " basic unix command in vim Plug 'tomtom/tcomment_vim' " mininal commenter @@ -11,4 +10,11 @@ call plug#begin() Plug 'romainl/vim-cool' " disable highlight after search Plug 'justinmk/vim-syntax-extra' " better syntax highlight Plug 'sheerun/vim-polyglot' " better syntax highlight + + " s19 at home + Plug 'pbondoer/vim-42header' " 42 header + + " themes + Plug 'joshdick/onedark.vim' " onedark + Plug 'dracula/vim', {'as': 'vim'} " dracula call plug#end() diff --git a/.vimrc b/.vimrc index 1fc69f0..a8d3bf4 100644 --- a/.vimrc +++ b/.vimrc @@ -20,11 +20,13 @@ set numberwidth=1 " line numbers gutter autowidth set cursorline " highlight current line set noshowmatch " dont jump to pair bracket set autoread " reload files when changes happen outside vim +set autowrite " auto write buf on certain events set hidden " keep change in buffer when quitting window set noswapfile " disable swap files set scrolloff=2 " line padding when scrolling set textwidth=89 " when line wrap occurs set encoding=utf-8 " utf-8 encoding +set formatoptions-=t " do not auto break line > 89 character filetype plugin indent on " allow to add specific rules for certain type of file " }}} @@ -37,7 +39,7 @@ set path+=** " recursive :find " intuitif split opening {{{ set splitbelow set splitright -set fcs+=vert:\ " no split separator +set fcs+=vert:│ " split separator " }}} " tab {{{ @@ -64,6 +66,7 @@ set noshowmode " dont show current mode (i.e --INSERT--) " fold {{{ set foldmethod=indent " create fold based on the text indent +set nofoldenable " not folded by default " }}} """"""""""""""" @@ -73,6 +76,14 @@ set foldmethod=indent " create fold based on the text indent " one {{{ let g:onedark_terminal_italics=1 colorscheme onedark +" }}} +" dracula {{{ +let g:dracula_bold = 1 +let g:dracula_italic = 1 +let g:dracula_colorterm = 0 +" colorscheme dracula +" }}} +" lightline {{{ let g:lightline = {} let g:lightline.colorscheme = 'jellybeans' " lightline theme to onedark " }}} @@ -87,6 +98,10 @@ nnoremap nnoremap nnoremap nnoremap +" nnoremap +" nnoremap +" nnoremap +" nnoremap nnoremap s= = " }}} @@ -129,7 +144,29 @@ nnoremap src :source $MYVIMRC " c {{{ " create c function body from prototype -nnoremap gcf A{} +nnoremap gcf A{}j + +" initialise a school header file +function PutHeaderBoilerPlate() + let l:filename = join(split(toupper(expand('%:t')), '\.'), "_") + " echom l:filename + call append(12, "#ifndef " . l:filename) + call append(13, "# define " . l:filename) + call append(15, "#endif") +endfunction +nnoremap gch :Stdheader:call PutHeaderBoilerPlate() + +function PutCoplienForm(name) + let l:default_constructor = a:name . "();\n" + let l:copy_constructor = a:name . "(" . a:name . " const& other);\n" + let l:copy_operator = "void operator=(" . a:name . " const& other);\n" + let l:destructor = "~" . a:name . "();\n" + + execute "normal iclass " . a:name . "\n{\npublic:\n" . l:default_constructor . l:copy_constructor . l:copy_operator . l:destructor . "\nprivate:\n};\n" + execute "normal <2{" +endfunction +command! PutCoplienFormFile call PutCoplienForm(split(expand('%:t'), '\.')[0]) + " put semicolon at the end of line nnoremap ; mqA;`q " doxygen format comments @@ -138,7 +175,9 @@ autocmd Filetype cpp setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ " }}} " quickfix window toggle {{{ -nnoremap q :call QuickfixToggle() +nnoremap qt :call QuickfixToggle() +nnoremap qn :cnext +nnoremap qp :cprevious let g:quickfix_is_open = 0 if !exists('*QuickfixToggle') function QuickfixToggle() @@ -153,11 +192,13 @@ if !exists('*QuickfixToggle') endif " }}} +" make {{{ +nnoremap m :make all +" }}} + " hook {{{ " remove trailing white space on save autocmd BufWritePre * %s/\s\+$//e -" initialise buf for fold toggle -autocmd BufReadPre * :normal zMzi " }}} " filetype {{{ @@ -177,8 +218,16 @@ autocmd Filetype vim setlocal foldmethod=marker 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'] +let g:ctrlp_working_path_mode = 'rw' " }}} " quick-scope {{{ let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] " }}} + +" man-plugin {{{ +runtime! ftplugin/man.vim +let g:ft_man_open_mode = 'vert' " open in a vertical split +let g:ft_man_no_sect_fallback = 2 " if page specified fallback to page 2 (syscall pages) +" autocmd Filetype man unmap q: hmmmm?? +" }}} diff --git a/.zsh_aliases b/.zsh_aliases index 72b727f..b40891a 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -32,6 +32,10 @@ alias treeI="tree -I '__pycache__' -I '*.o' -I vendor" alias m="man" alias m2="man 2" alias m3="man 3" +alias manv="man -P 'vim -M +MANPAGER -'" # vim has man pager +alias manv2="man 2 -P 'vim -M +MANPAGER -'" +alias manv3="man 3 -P 'vim -M +MANPAGER -'" +alias manv5="man 5 -P 'vim -M +MANPAGER -'" # git alias ga="git add" @@ -57,7 +61,7 @@ alias gstp="git stash pop" alias lpassp="lpass show --password --clip" # put password in clipboard # helper to switch between dual and single monitor setup -alias dual='xrandr --output LVDS1 --primary --left-of VGA1 --output VGA1 --auto' +alias dual='xrandr --output LVDS1 --primary --below VGA1 --output VGA1 --auto' alias single='xrandr --output VGA1 --off' # edit config files @@ -71,3 +75,9 @@ alias xmonadrc="vim $DOTFILES/xmonad.hs" alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' + +alias norm='ruby -I/home/charles/norminette/vendor/bundle/ruby/2.7.0/gems/parseconfig-1.0.8/lib/ ~/norminette/norminette.rb' + +getrfc() { + curl "https://ietf.org/rfc/rfc$1.txt" > "$HOME/rfc/rfc$1.txt" +} diff --git a/.zshrc b/.zshrc index 7512fcf..6bd7b11 100644 --- a/.zshrc +++ b/.zshrc @@ -52,7 +52,7 @@ function chpwd() { # add command-not-found package suggestion #source /etc/zsh_command_not_found -# color in man +# color in man (less pager) export LESS_TERMCAP_mb=$'\e[1;32m' export LESS_TERMCAP_md=$'\e[1;32m' export LESS_TERMCAP_me=$'\e[0m' @@ -60,16 +60,22 @@ 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 +export LESS_TERMCAP_mr=$(tput rev) +export LESS_TERMCAP_mh=$(tput dim) +export LESS_TERMCAP_ZN=$(tput ssubm) +export LESS_TERMCAP_ZV=$(tput rsubm) +export LESS_TERMCAP_ZO=$(tput ssupm) +export LESS_TERMCAP_ZW=$(tput rsupm) + +#XDG export XDG_CONFIG_HOME="/home/charles/.config/" export XDG_DATA_HOME="/home/charles/.data/" export EDITOR="vim" export TERM="xterm-256color" -# set tab to 4 spaces -tabs 4 +# mail +export MAIL='charles.cabergs@gmail.com' # ignore filetypes in autocomplete fignore=(o hi) @@ -80,3 +86,5 @@ source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # prompt export YSU_MESSAGE_POSITION="after" # you-should-use message after command output source $HOME/.zsh/zsh-you-should-use/you-should-use.plugin.zsh # alias reminder +# set tab to 4 spaces +tabs 4 diff --git a/redshift.conf b/redshift.conf index f012aba..32fff4f 100644 --- a/redshift.conf +++ b/redshift.conf @@ -1,5 +1,5 @@ [redshift] -temp-day=3000 +temp-day=2800 temp-night=2600 ; transition day/night -- cgit From 36c19a33127316bea52d46130d53035a328eb1c5 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 26 Apr 2020 08:33:18 +0200 Subject: Change colorscheme to solarized and switched to st --- .pluggins.vim | 15 ++++++++------- .vimrc | 51 +++++++++++++++++++++++++++++++++------------------ .zsh_aliases | 1 + xmonad.hs | 2 +- 4 files changed, 43 insertions(+), 26 deletions(-) diff --git a/.pluggins.vim b/.pluggins.vim index 9289f7f..d3f66ea 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -4,17 +4,18 @@ call plug#begin() Plug 'tpope/vim-eunuch' " basic unix command in vim Plug 'tomtom/tcomment_vim' " mininal commenter Plug 'itchyny/lightline.vim' " minimal status bar - Plug 'unblevable/quick-scope' " highlight first char to jump to word - - " bloat?? - Plug 'romainl/vim-cool' " disable highlight after search - Plug 'justinmk/vim-syntax-extra' " better syntax highlight Plug 'sheerun/vim-polyglot' " better syntax highlight " s19 at home Plug 'pbondoer/vim-42header' " 42 header " themes - Plug 'joshdick/onedark.vim' " onedark - Plug 'dracula/vim', {'as': 'vim'} " dracula + " Plug 'joshdick/onedark.vim' " onedark + " Plug 'dracula/vim', {'as': 'vim'} " dracula + Plug 'altercation/vim-colors-solarized' " solarized + + " intresting but not used + " Plug 'unblevable/quick-scope' " highlight first char to jump to word + " Plug 'romainl/vim-cool' " disable highlight after search + " Plug 'justinmk/vim-syntax-extra' " better syntax highlight call plug#end() diff --git a/.vimrc b/.vimrc index a8d3bf4..dc57121 100644 --- a/.vimrc +++ b/.vimrc @@ -15,7 +15,7 @@ let mapleader = ' ' " set leader key to space let maplocalleader = '-' " set file local leader key to backslash set nocompatible " not compatible with vi set number " line number -set relativenumber " line number relative to cursor +" set relativenumber " line number relative to cursor set numberwidth=1 " line numbers gutter autowidth set cursorline " highlight current line set noshowmatch " dont jump to pair bracket @@ -74,18 +74,26 @@ set nofoldenable " not folded by default """"""""""""""" " one {{{ -let g:onedark_terminal_italics=1 -colorscheme onedark +" let g:onedark_terminal_italics=1 +" colorscheme onedark " }}} " dracula {{{ -let g:dracula_bold = 1 -let g:dracula_italic = 1 -let g:dracula_colorterm = 0 +" let g:dracula_bold = 1 +" let g:dracula_italic = 1 +" let g:dracula_colorterm = 0 " colorscheme dracula " }}} +" solarized {{{ +set t_Co=16 +let g:solarized_termcolors=16 +let g:solarized_visibility='low' " visibility of invisible chars with set list +set background=dark +colorscheme solarized +" }}} " lightline {{{ let g:lightline = {} -let g:lightline.colorscheme = 'jellybeans' " lightline theme to onedark +let g:lightline.colorscheme = 'solarized' " lightline theme to solarized +" let g:lightline.colorscheme = 'jellybeans' " lightline theme to onedark " }}} @@ -144,7 +152,7 @@ nnoremap src :source $MYVIMRC " c {{{ " create c function body from prototype -nnoremap gcf A{}j +nnoremap gcf A{}j " initialise a school header file function PutHeaderBoilerPlate() @@ -156,22 +164,27 @@ function PutHeaderBoilerPlate() endfunction nnoremap gch :Stdheader:call PutHeaderBoilerPlate() -function PutCoplienForm(name) +" put semicolon at the end of line +nnoremap ; mqA;`q +" doxygen format comments +autocmd Filetype c setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ +autocmd Filetype cpp setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ +" }}} + +" cpp {{{ +" Put Coplien Form boilerplate class +function PutCoplienFormFunc(name) let l:default_constructor = a:name . "();\n" - let l:copy_constructor = a:name . "(" . a:name . " const& other);\n" - let l:copy_operator = "void operator=(" . a:name . " const& other);\n" + let l:copy_constructor = a:name . "(const " . a:name . "& other);\n" + let l:copy_operator = a:name . "& operator=(const " . a:name . "& other);\n" let l:destructor = "~" . a:name . "();\n" execute "normal iclass " . a:name . "\n{\npublic:\n" . l:default_constructor . l:copy_constructor . l:copy_operator . l:destructor . "\nprivate:\n};\n" execute "normal <2{" endfunction -command! PutCoplienFormFile call PutCoplienForm(split(expand('%:t'), '\.')[0]) - -" put semicolon at the end of line -nnoremap ; mqA;`q -" doxygen format comments -autocmd Filetype c setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ -autocmd Filetype cpp setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ +" Put Coplien Form boilerplate according to filename +command! PutCoplienFormFile call PutCoplienFormFunc(split(expand('%:t'), '\.')[0]) +command! -nargs=1 PutCoplienForm call PutCoplienFormFunc("") " }}} " quickfix window toggle {{{ @@ -205,6 +218,8 @@ autocmd BufWritePre * %s/\s\+$//e " real tab in c file for school projects autocmd BufReadPre,BufNewFile *.h,*.c set filetype=c autocmd Filetype c setlocal noexpandtab +" std::cout << ... << std::endl; shortcut +autocmd Filetype cpp nnoremap cout istd::cout << << std::endl;2F Date: Sun, 26 Apr 2020 11:52:38 +0200 Subject: More logical order for xmonad new window --- .pluggins.vim | 2 +- .zsh_aliases | 3 ++- xmonad.hs | 27 +++++++++++++++++---------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.pluggins.vim b/.pluggins.vim index d3f66ea..e57ec19 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -5,6 +5,7 @@ call plug#begin() Plug 'tomtom/tcomment_vim' " mininal commenter Plug 'itchyny/lightline.vim' " minimal status bar Plug 'sheerun/vim-polyglot' " better syntax highlight + Plug 'romainl/vim-cool' " disable highlight after search " s19 at home Plug 'pbondoer/vim-42header' " 42 header @@ -16,6 +17,5 @@ call plug#begin() " intresting but not used " Plug 'unblevable/quick-scope' " highlight first char to jump to word - " Plug 'romainl/vim-cool' " disable highlight after search " Plug 'justinmk/vim-syntax-extra' " better syntax highlight call plug#end() diff --git a/.zsh_aliases b/.zsh_aliases index 2ae7101..fd2ec8b 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -14,6 +14,7 @@ alias v="vim" alias mkdir="mkdir -p" alias gdb="gdb -q" # disable long intro message alias sudo="sudo " # enable color (the search for aliases continues) +alias m="make" # ls alias ll="ls -lFh" @@ -29,7 +30,7 @@ alias t3="tree -L 3" alias treeI="tree -I '__pycache__' -I '*.o' -I vendor" # man -alias m="man" +alias m1="man 1" alias m2="man 2" alias m3="man 3" alias manv="man -P 'vim -M +MANPAGER -'" # vim has man pager diff --git a/xmonad.hs b/xmonad.hs index 5535420..5420664 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -8,6 +8,9 @@ import XMonad.Util.EZConfig(additionalKeysP) -- Layouts import XMonad.Layout.NoBorders +-- Hooks +import XMonad.Hooks.InsertPosition + main = do xmonad $ desktopConfig @@ -19,20 +22,24 @@ main = do , focusedBorderColor = "#bbc5ff" , layoutHook = myLayouts , startupHook = myStartupHook + , manageHook = myManageHook } `additionalKeysP` myKeys -myLayouts = tiledBigMaster ||| Mirror tiledEven ||| noBorders Full +myLayouts = tiledBigMaster -- bigger master for code and smaller slave for compiling + ||| Mirror tiledEven -- 50/50 horizontal split + ||| noBorders Full -- disable borders for fullscreen layout where tiledBigMaster = Tall 1 (3 / 100) (3 / 5) tiledEven = Tall 1 (3 / 100) (1 / 2) - myStartupHook = do - spawnOnce "redshift -c /home/charles/.config/redshift.conf &" - spawnOnce "xinput disable 'ETPS/2 Elantech Touchpad' &" - -myKeys = [ ("", spawn "pulseaudio-ctl up") - , ("", spawn "pulseaudio-ctl down") - , ("", spawn "pulseaudio-ctl mute") - , ("", spawn "xbacklight -inc 5") - , ("", spawn "xbacklight -dec 5") + spawnOnce "redshift -c /home/charles/.config/redshift.conf &" -- start redshift + spawnOnce "xinput disable 'ETPS/2 Elantech Touchpad' &" -- disable touchpad + +myManageHook = insertPosition End Newer -- insert new window at the end of the current layout + +myKeys = [ ("", spawn "pulseaudio-ctl up") -- volume up + , ("", spawn "pulseaudio-ctl down") -- volume down + , ("", spawn "pulseaudio-ctl mute") -- volume mute + , ("", spawn "xbacklight -inc 5") -- backlight up + , ("", spawn "xbacklight -dec 5") -- backlight down ] -- cgit From e9530ee0b4e9706fb0fcb82fa3cb87d57a5b540d Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 9 May 2020 18:09:25 +0200 Subject: vim glsl syntax hightlight, TERM=st, bluetooth/man/make aliases --- .pluggins.vim | 30 +++++++++++++++++------------- .zsh_aliases | 15 +++++++++++---- .zshrc | 3 ++- 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.pluggins.vim b/.pluggins.vim index e57ec19..8ced0a6 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -1,21 +1,25 @@ -" plugins +"""""""""""""""" +" vim pluggins " +"""""""""""""""" + call plug#begin() - Plug 'ctrlpvim/ctrlp.vim' " Ctrl-P similar to vsc - Plug 'tpope/vim-eunuch' " basic unix command in vim - Plug 'tomtom/tcomment_vim' " mininal commenter - Plug 'itchyny/lightline.vim' " minimal status bar - Plug 'sheerun/vim-polyglot' " better syntax highlight - Plug 'romainl/vim-cool' " disable highlight after search + Plug 'ctrlpvim/ctrlp.vim' " Ctrl-P similar to vsc + Plug 'tpope/vim-eunuch' " basic unix command in vim + Plug 'tomtom/tcomment_vim' " mininal commenter + Plug 'itchyny/lightline.vim' " minimal status bar + Plug 'HappyTramp/vim-syntax-extra' " syntax highlight of C operators + Plug 'romainl/vim-cool' " disable highlight after search + Plug 'tikhomirov/vim-glsl' " glsl hightlight " s19 at home - Plug 'pbondoer/vim-42header' " 42 header + Plug 'pbondoer/vim-42header' " 42 header " themes - " Plug 'joshdick/onedark.vim' " onedark - " Plug 'dracula/vim', {'as': 'vim'} " dracula - Plug 'altercation/vim-colors-solarized' " solarized + " Plug 'joshdick/onedark.vim' " onedark + " Plug 'dracula/vim', {'as': 'vim'} " dracula + Plug 'altercation/vim-colors-solarized' " solarized " intresting but not used - " Plug 'unblevable/quick-scope' " highlight first char to jump to word - " Plug 'justinmk/vim-syntax-extra' " better syntax highlight + " Plug 'sheerun/vim-polyglot' " better syntax highlight + " Plug 'unblevable/quick-scope' " highlight first char to jump to word call plug#end() diff --git a/.zsh_aliases b/.zsh_aliases index fd2ec8b..2d2e87b 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -14,7 +14,6 @@ alias v="vim" alias mkdir="mkdir -p" alias gdb="gdb -q" # disable long intro message alias sudo="sudo " # enable color (the search for aliases continues) -alias m="make" # ls alias ll="ls -lFh" @@ -30,14 +29,18 @@ alias t3="tree -L 3" alias treeI="tree -I '__pycache__' -I '*.o' -I vendor" # man -alias m1="man 1" -alias m2="man 2" -alias m3="man 3" +alias ma="man" +alias ma1="man 1" +alias ma2="man 2" +alias ma3="man 3" alias manv="man -P 'vim -M +MANPAGER -'" # vim has man pager alias manv2="man 2 -P 'vim -M +MANPAGER -'" alias manv3="man 3 -P 'vim -M +MANPAGER -'" alias manv5="man 5 -P 'vim -M +MANPAGER -'" +# make +alias m="make" + # git alias ga="git add" alias gaa="git add --all" @@ -83,3 +86,7 @@ alias norm='ruby -I/home/charles/norminette/vendor/bundle/ruby/2.7.0/gems/parsec getrfc() { curl "https://ietf.org/rfc/rfc$1.txt" > "$HOME/rfc/rfc$1.txt" } + +# bluetooth +alias bton='echo power on | bluetoothctl' +alias btoff='echo power off | bluetoothctl' diff --git a/.zshrc b/.zshrc index 6bd7b11..42dde40 100644 --- a/.zshrc +++ b/.zshrc @@ -72,7 +72,8 @@ export XDG_CONFIG_HOME="/home/charles/.config/" export XDG_DATA_HOME="/home/charles/.data/" export EDITOR="vim" -export TERM="xterm-256color" +export TERM="st-256color" +# export TERM="xterm-256color" # mail export MAIL='charles.cabergs@gmail.com' -- cgit