commit 4f695010c786559e373f4235d203bca9eacfa023
parent ab2dcc28478df084e9ec180fae33f5f1a1dadf07
Author: Wim Dupont <wim@wimdupont.com>
Date: Sat, 19 Mar 2022 19:24:04 +0100
init
Diffstat:
A | Xresources | | | 52 | ++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | vimrc | | | 65 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 117 insertions(+), 0 deletions(-)
diff --git a/Xresources b/Xresources
@@ -0,0 +1,52 @@
+URxvt.scrollBar: false
+
+! fake transparancy (displays wallpaper)
+URxvt*transparent: true
+urxvt*shading: 18
+
+! special
+*.foreground: #e7e7cb
+*.background: #1e1e1e
+*.cursorColor: #e7e7cb
+
+! black
+*.color0: #1e1e1e
+*.color8: #5f5a60
+
+! red
+*.color1: #cf6a4c
+*.color9: #cf6a4c
+
+! green
+*.color2: #8f9d6a
+*.color10: #8f9d6a
+
+! yellow
+*.color3: #f9ee98
+*.color11: #f9ee98
+
+! blue
+*.color4: #6280DB
+*.color12: #6280DB
+
+! magenta
+*.color5: #9b859d
+*.color13: #9b859d
+
+! cyan
+*.color6: #afc4db
+*.color14: #afc4db
+
+! white
+*.color7: #a7a7a7
+*.color15: #ffffff
+
+URxvt*font: xft:Monospace:bold:pixelsize=15
+URxvt*boldFont: xft:Monospace:bold:pixelsize=15
+
+URxvt.perl-ext-common: default,resize-font
+
+URxvt.keysym.C-j: resize-font:smaller
+URxvt.keysym.C-k: resize-font:bigger
+URxvt.keysym.C-equal: resize-font:reset
+URxvt.keysym.C-h: resize-font:show
diff --git a/vimrc b/vimrc
@@ -0,0 +1,65 @@
+" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
+" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
+" you can find below. If you wish to change any of those settings, you should
+" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
+" everytime an upgrade of the vim packages is performed. It is recommended to
+" make changes after sourcing archlinux.vim since it alters the value of the
+" 'compatible' option.
+
+" This line should not be removed as it ensures that various options are
+" properly set to work with the Vim-related packages.
+runtime! archlinux.vim
+
+" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
+" Or better yet, read /usr/share/vim/vim80/vimrc_example.vim or the vim manual
+" and configure vim to your own liking!
+
+" do not load defaults if ~/.vimrc is missing
+"let skip_defaults_vim=1
+
+"set spell
+set tw=0
+set wrapmargin=1
+set nu
+set hlsearch
+
+let t:is_transparent = 1
+let t:is_book = 0
+
+function! Toggle_transparent()
+ if t:is_transparent == 0
+ hi Normal guibg=NONE ctermbg=NONE
+ let t:is_transparent = 1
+ else
+ hi Normal guibg=#111111 ctermbg=black
+ let t:is_transparent = 0
+ endif
+endfunction
+
+function! Toggle_bookmode()
+ if t:is_book == 0
+ set tw=80
+ set wrapmargin=0
+ call Format()
+ let t:is_book = 1
+ else
+ set tw=0
+ set wrapmargin=1
+ call Format()
+ let t:is_book = 0
+ endif
+endfunction
+
+function! Format()
+ call feedkeys("gggqG")
+ call Clear_whitespace()
+endfunction
+
+function! Clear_whitespace()
+ :%s/\ *\ /\ /g
+endfunction
+
+nnoremap <leader>t : call Toggle_transparent()<CR>
+nnoremap <leader>b : call Toggle_bookmode()<CR>
+nnoremap <leader>f : call Format()<CR>
+nnoremap <leader>c : call Clear_whitespace()<CR>