From 4d9ec9a46e0085588a896679573461601dd76bfc Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 26 May 2019 22:37:12 +0200 Subject: some improvements --- vim/README.md | 2 +- vim/vimrc | 94 ++++++++++++++++++++++++--------------------------- xmonad/checkmail.sh | 3 +- xmonad/nvidia-temp.sh | 6 ++-- xmonad/xmobarrc | 10 +++--- xmonad/xmonad.hs | 19 ++++++----- 6 files changed, 67 insertions(+), 67 deletions(-) diff --git a/vim/README.md b/vim/README.md index ef26c2e..ce66158 100644 --- a/vim/README.md +++ b/vim/README.md @@ -9,7 +9,7 @@ Dependancies Requires Vundle.vim which is available from github. -I found the foloowing on vim.org. +I found the following on vim.org. * syntax/htmljinja.vim * syntax/jinja.vim diff --git a/vim/vimrc b/vim/vimrc index 20a0f21..fd0d8d9 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1,10 +1,12 @@ """"""""""""""""""""""""""""""""""""" " Miguel's .vimrc " " Author: m.i@gmx.at " -" Last Update: 2019-02-02 " +" Last Update: 2019-05-25 " """"""""""""""""""""""""""""""""""""" " {{{ NOTES +" THIS LOOSE NOTES REQUIRE REVIEW! +" external links to browser " https://wiki.haskell.org/99_questions/Solutions/34 " http://www.stephendiehl.com/posts/vim_2016.html " https://github.com/lukerandall/haskellmode-vim @@ -46,7 +48,6 @@ " Do something about the input problems in ConqueGDB/Term (YouCompl?) " implement a plugin for fast-reading (check if one exists first ;)) " plugins on vim.org etc. -" " syntastic! https://github.com/vim-syntastic/syntastic " vimproc! https://github.com/Shougo/vimproc.vim " pathogen / vundle DONE @@ -74,24 +75,15 @@ " CScope / CCTree " inline reference/ (stlrefvim?) " emmet.io (webdev) - " }}} " {{{ VUNDLE - +" as required by https://github.com/VundleVim/Vundle.vim set nocompatible filetype off - -" set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim - -" can call vundle#begin('~/some/path/here') call vundle#begin() - -" let Vundle manage Vundle, required Plugin 'gmarik/Vundle.vim' - -" plugins " Plugin 'Valloric/YouCompleteMe' Plugin 'scrooloose/nerdtree' Plugin 'altercation/vim-colors-solarized' @@ -99,18 +91,17 @@ Plugin 'fholgado/minibufexpl.vim' Plugin 'majutsushi/tagbar' Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-sensible' -Plugin 'Shougo/vimproc.vim' +" Plugin 'Shougo/vimproc.vim' +Plugin 'MarcWeber/vim-addon-mw-utils' +Plugin 'tomtom/tlib_vim' +Plugin 'garbas/vim-snipmate' +Plugin 'honza/vim-snippets' " Plugin 'vim-scripts/Conque-GDB' " Plugin 'dracula/vim' " Plugin 'git://ex40.softwarefools.com/vim-potion.git' " Plugin 'git://ex40.softwarefools.com/vim-colortune.git' - -" All of your Plugins must be added before the following line call vundle#end() filetype plugin indent on -" To ignore plugin indent changes, instead use: -" filetype plugin on - " }}} "{{{ DISABLED @@ -124,8 +115,8 @@ filetype plugin indent on " let g:potion_command = "/home/miguel/int/dev/potion/bin/potion" -"set wrap -"set showbreak=>_ +" set wrap +" set showbreak=>_ " move line under the cursor up and down. " nnoremap - ddp @@ -138,6 +129,10 @@ filetype plugin indent on " {{{ BASICS +" {{{ spelling OFF +" set spell +" }}} + " {{{ mapleaders " use but remap to _ so it is visible for 'showcmd' nmap _ @@ -147,29 +142,28 @@ let maplocalleader="\_" " {{{ misc +set nocompatible set foldmethod=marker set nowrap - -set nocompatible set backspace=2 " set ruler set showcmd set number set hidden -" set cursorcolumn -" set cursorline +"set cursorcolumn +set cursorline " save before making etc. set autowrite " some nice candy -set laststatus=2 +set laststatus=2 "always show status line on last window set wildmenu " indent -set autoindent -set cindent +" set autoindent +" set cindent " mouse support in xterm set mouse=a @@ -181,6 +175,7 @@ set previewheight=25 " set splitbelow " set splitright +" easy move between windows nnoremap nnoremap nnoremap @@ -191,13 +186,9 @@ nnoremap " {{{ statusline set statusline=%f " Path to the file set statusline+=%= " Switch to the right side -set statusline+=%l " Current line -set statusline+=/ " Separator -set statusline+=%L " Total lines -set statusline+=, " comma -set statusline+=%c " Column -set statusline+=\ (%P) " Percentage -set statusline& " reset? +set statusline+=%l,%c " Current line,column +set statusline+=\ (%L,%P) " Percentage +"set statusline& " reset " }}} " {{{ terminal width / colocolumn @@ -233,9 +224,13 @@ else set background=dark endif - set background=dark +set background=dark colorscheme solarized + +hi SpellBad ctermfg=white +hi SpellBad ctermbg=red + syntax sync fromstart " }}} @@ -283,20 +278,20 @@ nnoremap ? ?\v inoremap jk " retab -map rt :retab! +" map rt :retab! " toggle tabs visibility noremap t :set invlist " easy editing and sourcing of vimrc -nnoremap sv :source $MYVIMRC +" nnoremap sv :source $MYVIMRC nnoremap ev :e $MYVIMRC " turn off search highlight nnoremap h :nohlsearch " toggle visibility of trailing whitespaces -nnoremap w :match Error /\v +$/ +nnoremap w :match ErrorMsg /\v +$/ nnoremap W :match " toggle and navigate quickfix window @@ -310,23 +305,23 @@ nnoremap bp :MBEbp nnoremap bd :MBEbd " make -nnoremap mm :silent make! -nnoremap mc :silent make! clean -nnoremap mn :silent make! new -nnoremap mr :silent make!:call system("make run &") -nnoremap md :silent make!:call system("make debug &") -nnoremap ms :silent make! stop -nnoremap mf :silent make! %:r:redraw! -nnoremap mx :silent make! %:r !./%:r +" nnoremap mm :silent make! +" nnoremap mc :silent make! clean +" nnoremap mn :silent make! new +" nnoremap mr :silent make!:call system("make run &") +" nnoremap md :silent make!:call system("make debug &") +" nnoremap ms :silent make! stop +" nnoremap mf :silent make! %:r:redraw! +" nnoremap mx :silent make! %:r !./%:r " session handling -nnoremap ss :call Session_save() -nnoremap sl :call Session_load() +" nnoremap ss :call Session_save() +" nnoremap sl :call Session_load() " layout nnoremap ln :NERDTreeToggle nnoremap lt :TagbarToggle -nnoremap lg :ConqueGdb +"nnoremap lg :ConqueGdb nnoremap lm :MBEToggle nnoremap lq :copen @@ -344,6 +339,7 @@ augroup END " {{{ markdown augroup filetype_markdown autocmd! + autocmd FileType markdown setlocal spell " autocmd FileType markdown setlocal spell " autocmd FileType markdown setlocal list augroup END diff --git a/xmonad/checkmail.sh b/xmonad/checkmail.sh index a8037e5..e61d2a9 100755 --- a/xmonad/checkmail.sh +++ b/xmonad/checkmail.sh @@ -12,7 +12,8 @@ case $MAILS in ;; *) #echo "$A$MAILS$B" - echo "$A$B" + #echo "$A$B" + echo "$A$B" ;; esac diff --git a/xmonad/nvidia-temp.sh b/xmonad/nvidia-temp.sh index fa40e91..6cddd1c 100755 --- a/xmonad/nvidia-temp.sh +++ b/xmonad/nvidia-temp.sh @@ -16,13 +16,13 @@ get_color() HIGH=$3 if test $TEMP -lt $LOW then - COL=gray90 + COL=#93a1a1 else if test $TEMP -lt $HIGH then - COL=lightblue + COL=#268bd2 else - COL=red + COL=#dc322f fi fi diff --git a/xmonad/xmobarrc b/xmonad/xmobarrc index f81f60f..b1ef843 100644 --- a/xmonad/xmobarrc +++ b/xmonad/xmobarrc @@ -15,8 +15,8 @@ Config { , Run MultiCpu ["-t"," %", "-L","10","-H","65","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10 - , Run Network "eno1" ["-t","rx tx ", - "-L","100","-H","5000","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10 + , Run Network "eno1" ["-t","r t ", + "-S","True","-L","1000000","-H","10000000","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10 , Run Memory ["-t","%", "-L","20","-H","60","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10 @@ -24,7 +24,7 @@ Config { , Run Swap ["-t","%", "-L","1","-H","10","--low","#93a1a1","--normal","#b58900","--high","#dc322f"] 10 - , Run Date "%a %d %b %Y %H:%M:%S" "date" 10 + , Run Date "%a %d %b %Y %H:%M:%S" "date" 10 , Run DiskU [ ("/", "root:"), ("/mnt/sdd1", "data:"), @@ -32,7 +32,7 @@ Config { ("/mnt/win", "fat:")] [] 20 , Run CoreTemp ["-t", " ", - "-L", "30", "-H", "60", "-l", "#93a1a1", "-n", "#268bd2", "-h", "#dc322f"] 50 + "-L", "40", "-H", "60", "-l", "#93a1a1", "-n", "#268bd2", "-h", "#dc322f"] 50 , Run Com "/home/miguel/git/dotfiles/xmonad/checkmail.sh" [] "mymails" 30 , Run Com "/home/miguel/git/dotfiles/xmonad/nvidia-temp.sh" [] "gputemp" 30 @@ -41,5 +41,5 @@ Config { , sepChar = "%" , alignSep = "}{" - , template = "%StdinReader%}{%mymails% - %eno1% KB/s  %multicpu% %coretemp%°C  %gputemp%  %memory% (%swap%) %disku% - %date% " + , template = "%StdinReader%}{%mymails%  %eno1%  %multicpu%  %coretemp%°C  %gputemp%  %memory% (%swap%)  %disku% %date% " } diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs index 3119cf8..3975878 100644 --- a/xmonad/xmonad.hs +++ b/xmonad/xmonad.hs @@ -1,6 +1,7 @@ -- -- Miguel's Xmonad Config. --- Last Update: 2019-02-10 +-- Last Update: 2019-05-18 +-- Runs on xmonad 0.15 -- import XMonad @@ -76,10 +77,11 @@ main = do xmproc <- spawnPipe $ "/usr/bin/xmobar "++configPath++"/xmobarrc" --xmonad $ withUrgencyHookC LibNotifyUrgencyHook {} urgencyConfig {suppressWhen=UH.Never,remindWhen=UH.Repeatedly 10 5} xmonad $ withUrgencyHookC BorderUrgencyHook { urgencyBorderColor = "#ff0000" } urgencyConfig {suppressWhen=UH.Never,remindWhen=UH.Dont} -- remind does not work anyway :( --- $ docks + $ docks $ ewmh defaultConfig { workspaces = (map snd myWorkspaces) ,borderWidth = 2 + ,normalBorderColor = "#586e75" ,focusedBorderColor = "#eee8d5" -- ,focusFollowsMouse = False @@ -105,8 +107,8 @@ main = do takeTopFocus >>( dynamicLogWithPP $ xmobarPP { -- ppOrder = reverse, --- ppSort = mkWsSort $ getXineramaPhysicalWsCompare horizontalScreenOrderer, --getSortByXineramaPhysicalRule def, - ppSort = getSortByXineramaPhysicalRule, + ppSort = mkWsSort $ getXineramaPhysicalWsCompare horizontalScreenOrderer, --getSortByXineramaPhysicalRule def, +-- ppSort = getSortByXineramaPhysicalRule, -- ppSort = mkWsSort $ getXineramaPhysicalWsCompare, -- ppSort = mkWsSort $ getXineramaWsCompare, ppOutput = hPutStrLn xmproc, @@ -114,8 +116,8 @@ main = do ppCurrent = (\x -> ""++x++""), --red ppVisible = (\x -> ""++x++""), --green ppHidden = (\x -> ""++x++""), --yellow - ppHiddenNoWindows = (\x -> ""++x++"") --gray --- ppVisibleNoWindows = Just (\x-> ""++x++"") --blue + ppHiddenNoWindows = (\x -> ""++x++""), --gray + ppVisibleNoWindows = Just (\x-> ""++x++"") --blue }) } `additionalKeys` ( @@ -123,10 +125,11 @@ main = do ((mod4Mask, xK_F1 ), spawn "xterm -e vim ~/.xmonad/xmonad.hs") ,((mod4Mask , xK_b ), sendMessage ToggleStruts) ,((mod4Mask, xK_p ), spawn "dmenu_run -nb '#073642' -nf '#fdf6e3' -sb '#268bd2' -sf '#073642' -fn 'DejaVu Sans-10'") - ,((mod4Mask, xK_x ), spawn "slock") + ,((mod4Mask, xK_l ), spawn "slock") ,((mod4Mask, xK_m ), spawn "xterm -e \"fetchmail&&sleep 2\"") ,((mod4Mask, xK_c ), spawn "xterm -e \"echo clipboard&&xclip -o -selection clipboard&&echo&&echo&&echo primary&&xclip -o -selection p&&echo&&echo&&echo [press enter]&&read\"") ,((mod4Mask, xK_s ), spawn "import /tmp/screen.png && feh -. /tmp/screen.png") + ,((mod4Mask, xK_semicolon ), sendMessage Expand) -- , ((mod4Mask, xK_m ), spawn "notify-send \"$( fetchmail )\"") --,((mod4Mask .|. shiftMask, xK_x ), spawn "ans=$(zenity --list --text 'wanna restart?' --radiolist --column 'Pick' --column 'Opinion' TRUE '' FALSE 'sudo shutdown -r now' FALSE 'sudo shutdown -h now' ); $ans") @@ -149,7 +152,7 @@ main = do ++ [ ((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) -- Replace 'mod1Mask' with your mod key of choice. - | (key, sc) <- zip [xK_q,xK_w, xK_e, xK_r] [3,2,0,1] -- change to match your screen order + | (key, sc) <- zip [xK_q,xK_w, xK_e, xK_r] [2,3,0,1] -- change to match your screen order , (f, m) <- [(W.view, 0), (W.shift, shiftMask)] ] ++ -- cgit v1.2.3