summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2019-05-26 22:37:12 +0200
committerMiguel <m.i@gmx.at>2019-05-26 22:37:12 +0200
commit4d9ec9a46e0085588a896679573461601dd76bfc (patch)
tree98f8c6575d8b1fe8ead124fed0706cff598b054d
parent3c634f69fe1e67c109c20a8dc5a594dc10bff0fe (diff)
some improvements
-rw-r--r--vim/README.md2
-rw-r--r--vim/vimrc94
-rwxr-xr-xxmonad/checkmail.sh3
-rwxr-xr-xxmonad/nvidia-temp.sh6
-rw-r--r--xmonad/xmobarrc10
-rw-r--r--xmonad/xmonad.hs19
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 <leader>- ddp
@@ -138,6 +129,10 @@ filetype plugin indent on
" {{{ BASICS
+" {{{ spelling OFF
+" set spell
+" }}}
+
" {{{ mapleaders
" use <space> but remap to _ so it is visible for 'showcmd'
nmap <space> _
@@ -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 <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
@@ -191,13 +186,9 @@ nnoremap <C-H> <C-W><C-H>
" {{{ 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 <esc>
" retab
-map <leader>rt :retab!<CR>
+" map <leader>rt :retab!<CR>
" toggle tabs visibility
noremap <leader>t :set invlist<CR>
" easy editing and sourcing of vimrc
-nnoremap <leader>sv :source $MYVIMRC<cr>
+" nnoremap <leader>sv :source $MYVIMRC<cr>
nnoremap <leader>ev :e $MYVIMRC<cr>
" turn off search highlight
nnoremap <leader>h :nohlsearch<cr>
" toggle visibility of trailing whitespaces
-nnoremap <leader>w :match Error /\v +$/<cr>
+nnoremap <leader>w :match ErrorMsg /\v +$/<cr>
nnoremap <leader>W :match<cr>
" toggle and navigate quickfix window
@@ -310,23 +305,23 @@ nnoremap <leader>bp :MBEbp<cr>
nnoremap <leader>bd :MBEbd<cr>
" make
-nnoremap <leader>mm :silent make!<cr>
-nnoremap <leader>mc :silent make! clean<cr>
-nnoremap <leader>mn :silent make! new<cr>
-nnoremap <leader>mr :silent make!<cr>:call system("make run &")<cr>
-nnoremap <leader>md :silent make!<cr>:call system("make debug &")<cr>
-nnoremap <leader>ms :silent make! stop<cr>
-nnoremap <leader>mf :silent make! %:r<cr>:redraw! <cr>
-nnoremap <leader>mx :silent make! %:r <bar> !./%:r<cr>
+" nnoremap <leader>mm :silent make!<cr>
+" nnoremap <leader>mc :silent make! clean<cr>
+" nnoremap <leader>mn :silent make! new<cr>
+" nnoremap <leader>mr :silent make!<cr>:call system("make run &")<cr>
+" nnoremap <leader>md :silent make!<cr>:call system("make debug &")<cr>
+" nnoremap <leader>ms :silent make! stop<cr>
+" nnoremap <leader>mf :silent make! %:r<cr>:redraw! <cr>
+" nnoremap <leader>mx :silent make! %:r <bar> !./%:r<cr>
" session handling
-nnoremap <leader>ss :call Session_save()<cr>
-nnoremap <leader>sl :call Session_load()<cr>
+" nnoremap <leader>ss :call Session_save()<cr>
+" nnoremap <leader>sl :call Session_load()<cr>
" layout
nnoremap <leader>ln :NERDTreeToggle<cr>
nnoremap <leader>lt :TagbarToggle<cr>
-nnoremap <leader>lg :ConqueGdb<cr>
+"nnoremap <leader>lg :ConqueGdb<cr>
nnoremap <leader>lm :MBEToggle<cr>
nnoremap <leader>lq :copen<cr>
@@ -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<fc="#93a1a1"><fn=1></fn>$MAILS</fc>$B"
- echo "$A<fc="#93a1a1"><fn=1></fn></fc>$B"
+ #echo "$A<fc="#93a1a1"><fn=1></fn></fc>$B"
+ echo "$A<fn=1></fn>$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","<total0> <total1> <total2> <total3> <total4> <total5> <total6> <total7>%",
"-L","10","-H","65","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10
- , Run Network "eno1" ["-t","rx <rx> tx <tx>",
- "-L","100","-H","5000","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10
+ , Run Network "eno1" ["-t","r <rx> t <tx>",
+ "-S","True","-L","1000000","-H","10000000","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10
, Run Memory ["-t","<usedratio>%",
"-L","20","-H","60","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10
@@ -24,7 +24,7 @@ Config {
, Run Swap ["-t","<usedratio>%",
"-L","1","-H","10","--low","#93a1a1","--normal","#b58900","--high","#dc322f"] 10
- , Run Date "%a %d %b %Y %H:%M:%S" "date" 10
+ , Run Date "<fn=1></fn> <fc=#93a1a1>%a %d %b %Y</fc> <action=hamster-time-tracker><fn=1></fn> <fc=#93a1a1>%H:%M:%S</fc></action>" "date" 10
, Run DiskU [ ("/", "root:<fc=#93a1a1><free></fc>"),
("/mnt/sdd1", "data:<fc=#93a1a1><free></fc>"),
@@ -32,7 +32,7 @@ Config {
("/mnt/win", "fat:<fc=#93a1a1><free></fc>")] [] 20
, Run CoreTemp ["-t", "<core0> <core1> <core2> <core3>",
- "-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 <action=xterm -e htop><fn=1></fn> %multicpu% %coretemp%°C</action> <action=nvidia-settings><fn=1></fn> %gputemp%</action> <fn=1></fn> %memory% (%swap%) %disku% - <fc=#93a1a1>%date%</fc> <action=`pavucontrol`><fn=1></fn> </action><action=`systemctl suspend`><fn=1></fn></action>"
+ , template = "%StdinReader%}{%mymails% <action=xterm -e sudo iftop><fn=1></fn> %eno1% </action><action=xterm -e htop><fn=1></fn> %multicpu% <fn=1></fn> %coretemp%°C</action> <action=nvidia-settings><fn=1></fn> %gputemp%</action> <fn=1></fn> %memory% (%swap%) <fn=1></fn> %disku% %date% <action=`pavucontrol`><fn=1></fn> </action><action=`systemctl suspend`><fn=1></fn></action>"
}
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 -> "<fc=#dc322f>"++x++"</fc>"), --red
ppVisible = (\x -> "<fc=#859900>"++x++"</fc>"), --green
ppHidden = (\x -> "<fc=#b58900>"++x++"</fc>"), --yellow
- ppHiddenNoWindows = (\x -> "<fc=#93a1a1>"++x++"</fc>") --gray
--- ppVisibleNoWindows = Just (\x-> "<fc=#268bd2>"++x++"</fc>") --blue
+ ppHiddenNoWindows = (\x -> "<fc=#93a1a1>"++x++"</fc>"), --gray
+ ppVisibleNoWindows = Just (\x-> "<fc=#268bd2>"++x++"</fc>") --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)]
]
++