From 718e7ea6e19717c67060648b366dcbbc837535e3 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 23 May 2020 11:49:58 +0200 Subject: vim change mapping, sublime text config, some alias --- .gdbinit | 1 + .pluggins.vim | 2 +- .vimrc | 4 ++++ .zsh_aliases | 11 +++++++---- .zshrc | 13 +++++-------- Preferences.sublime-settings | 11 +++++++++++ xmonad.hs | 18 +++++++++--------- 7 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 Preferences.sublime-settings diff --git a/.gdbinit b/.gdbinit index 9422460..b61f392 100644 --- a/.gdbinit +++ b/.gdbinit @@ -1 +1,2 @@ set disassembly-flavor intel +set listsize 25 diff --git a/.pluggins.vim b/.pluggins.vim index 8ced0a6..20c2dab 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -12,7 +12,7 @@ call plug#begin() Plug 'tikhomirov/vim-glsl' " glsl hightlight " s19 at home - Plug 'pbondoer/vim-42header' " 42 header + Plug 'HappyTramp/vim-42header' " 42 header " themes " Plug 'joshdick/onedark.vim' " onedark diff --git a/.vimrc b/.vimrc index dc57121..6d49624 100644 --- a/.vimrc +++ b/.vimrc @@ -136,6 +136,10 @@ nnoremap ) 10j " tag nagigation nnoremap ] nnoremap t +" common change until +nnoremap cu ct_ +nnoremap cp ct) +nnoremap c, ct, " }}} " buffer navigation {{{ diff --git a/.zsh_aliases b/.zsh_aliases index 2d2e87b..cfded2f 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -3,7 +3,6 @@ ############### # color -alias ls="ls --color" alias grep="grep --color=auto" alias tree="tree -C" alias pacman="pacman --color=auto" @@ -16,7 +15,8 @@ alias gdb="gdb -q" # disable long intro message alias sudo="sudo " # enable color (the search for aliases continues) # ls -alias ll="ls -lFh" +alias ls='ls --color -F' +alias ll="ls -lh" alias la="ls -a" alias lla="ls -alh" alias lss="ls -Ssh" @@ -66,8 +66,8 @@ 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 --below VGA1 --output VGA1 --auto' -alias single='xrandr --output VGA1 --off' +alias dual='xrandr --output LVDS-1 --primary --below VGA-1 --output VGA-1 --auto' +alias single='xrandr --output VGA-1 --off' # edit config files alias zshrc="vim $DOTFILES/.zshrc && source $DOTFILES/.zshrc" @@ -90,3 +90,6 @@ getrfc() { # bluetooth alias bton='echo power on | bluetoothctl' alias btoff='echo power off | bluetoothctl' + +# pdf selector +alias openpdf='zathura `ls -1 *.pdf | dmenu` &' diff --git a/.zshrc b/.zshrc index 42dde40..b3e9722 100644 --- a/.zshrc +++ b/.zshrc @@ -34,19 +34,16 @@ bindkey -v '^?' backward-delete-char bindkey -v export KEYTIMEOUT=1 -setopt auto_cd # cd without `cd` command +setopt auto_cd # cd without `cd` command # setopt pushd_ignore_dups -# setopt list_rows_first +setopt list_rows_first # cycle through row first in menu # setopt extendedglob # executed when changind directory function chpwd() { - file_count=$(ls | wc -w) - if [ $file_count -lt 30 ]; then - tree -L 1 - else - echo "$(pwd) contains $file_count files" - fi + content=`ls | wc -l` + ([ $content -lt 30 ] && tree -L 1) || + echo "$(pwd) contains $content entries" } # add command-not-found package suggestion diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings new file mode 100644 index 0000000..684ad2e --- /dev/null +++ b/Preferences.sublime-settings @@ -0,0 +1,11 @@ +{ + "color_scheme": "Packages/Solarized Color Scheme/Solarized (dark).sublime-color-scheme", + "font_face": "Fira Code", + "highlight_line": true, + "ignored_packages": + [ + "Vintage" + ], + "line_padding_top": 5, + "theme": "Adaptive.sublime-theme" +} diff --git a/xmonad.hs b/xmonad.hs index 5420664..72bda69 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -11,18 +11,18 @@ import XMonad.Layout.NoBorders -- Hooks import XMonad.Hooks.InsertPosition - -main = do - xmonad $ desktopConfig - { modMask = mod4Mask -- mod key to super - , terminal = "st" - , borderWidth = 1 - , focusFollowsMouse = False -- don't change window based on mouse position (need to click) - , normalBorderColor = "#292d3e" +-- xmonad :: XConfig -> IO () +-- https://hackage.haskell.org/package/xmonad-0.15/docs/XMonad-Core.html#t:XConfig +main = xmonad $ desktopConfig + { normalBorderColor = "#292d3e" , focusedBorderColor = "#bbc5ff" + , terminal = "st" , layoutHook = myLayouts - , startupHook = myStartupHook , manageHook = myManageHook + , modMask = mod4Mask -- mod key to super + , borderWidth = 1 + , startupHook = myStartupHook + , focusFollowsMouse = False -- don't change window based on mouse position (need to click) } `additionalKeysP` myKeys myLayouts = tiledBigMaster -- bigger master for code and smaller slave for compiling -- cgit