Compare commits
5 Commits
a2df62dc2b
...
a8d17796e6
| Author | SHA1 | Date | |
|---|---|---|---|
| a8d17796e6 | |||
| a04f26343d | |||
| 970c5a614c | |||
| eaf1382493 | |||
| 53701526be |
@@ -5,7 +5,6 @@ After=windowmanager.target
|
||||
Wants=blueman.service
|
||||
Wants=dpms.service
|
||||
Wants=dunst.service
|
||||
Wants=element.service
|
||||
{% for profile, config in (user.firefox_profiles|default({})).items() %}
|
||||
{% if config.bigger_font|default(false) is sameas false %}
|
||||
Wants=firefox@{{ profile }}.service
|
||||
|
||||
@@ -5,6 +5,5 @@ After=windowmanager.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/env xset s off
|
||||
ExecStart=/usr/bin/env xset dpms 0 0 300
|
||||
ExecStart=/usr/bin/env xset dpms 0 0 0
|
||||
PassEnvironment=DISPLAY
|
||||
Restart=always
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
[Unit]
|
||||
BindsTo=autostart.target
|
||||
After=windowmanager.target
|
||||
After=i3.service
|
||||
|
||||
ConditionPathExists=%h/.var/run/features/element
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/env element-desktop
|
||||
PassEnvironment=DISPLAY
|
||||
Restart=always
|
||||
48
vim/vimrc
48
vim/vimrc
@@ -36,6 +36,10 @@ Plug 'reedes/vim-pencil', Cond(!exists('g:vscode'))
|
||||
"" markdown
|
||||
Plug 'suan/vim-instant-markdown', Cond(!exists('g:vscode'))
|
||||
|
||||
Plug 'dense-analysis/ale', Cond(!exists('g:vscode'))
|
||||
|
||||
Plug 'neoclide/coc.nvim', Cond(!exists('g:vscode'), {'branch': 'release'})
|
||||
|
||||
|
||||
call plug#end()
|
||||
filetype plugin indent on
|
||||
@@ -98,7 +102,7 @@ set nowritebackup
|
||||
" == swap ==
|
||||
set swapfile
|
||||
set updatecount=200
|
||||
set updatetime=10000
|
||||
set updatetime=300
|
||||
|
||||
" == undo ==
|
||||
set undolevels=1000
|
||||
@@ -144,6 +148,8 @@ set termguicolors
|
||||
" === keybinds ===
|
||||
set pastetoggle=<F11>
|
||||
|
||||
set signcolumn=yes
|
||||
|
||||
let maplocalleader = "ö"
|
||||
let mapleader = "\<Space>"
|
||||
" map <leader>w: w!<cr>
|
||||
@@ -209,6 +215,10 @@ else
|
||||
syntax enable
|
||||
silent! colorscheme monokai
|
||||
|
||||
highlight Comment guifg=#64d86b
|
||||
highlight SpecialComment guifg=#64d86b
|
||||
highlight Todo guibg=#a9ebad
|
||||
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'wombat',
|
||||
\ 'active': {
|
||||
@@ -250,6 +260,8 @@ else
|
||||
" == limelight ==
|
||||
let g:limelight_default_coefficient = 0.5
|
||||
|
||||
let g:ale_linters = {'rust': ['rust-analyzer']}
|
||||
|
||||
" === functions ===
|
||||
function! DeleteTrailingWS()
|
||||
exe "normal mz"
|
||||
@@ -269,6 +281,40 @@ else
|
||||
|
||||
let g:rustfmt_autosave = 1
|
||||
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ coc#pum#visible() ? coc#pum#next(1) :
|
||||
\ CheckBackspace() ? "\<Tab>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
||||
|
||||
" Make <CR> to accept selected completion item or notify coc.nvim to format
|
||||
" <C-g>u breaks current undo, please make your own choice.
|
||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
||||
function! CheckBackspace() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
if has('nvim')
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
else
|
||||
inoremap <silent><expr> <c-@> coc#refresh()
|
||||
endif
|
||||
|
||||
if has('nvim')
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
else
|
||||
inoremap <silent><expr> <c-@> coc#refresh()
|
||||
endif
|
||||
|
||||
" https://stackoverflow.com/a/8585343
|
||||
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
||||
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
endif
|
||||
|
||||
@@ -11,8 +11,8 @@ for part in ${_path[@]} ; do
|
||||
done
|
||||
export PATH
|
||||
|
||||
export EDITOR="nvim"
|
||||
export VISUAL="nvim"
|
||||
export EDITOR="hx"
|
||||
export VISUAL="hx"
|
||||
export BROWSER="firefox"
|
||||
|
||||
export PAGER="less"
|
||||
|
||||
@@ -183,12 +183,12 @@ sb() {
|
||||
}
|
||||
|
||||
journal() {
|
||||
journaldir=~/journal/
|
||||
file=~/journal/$(date +%Y-%m-%d).md
|
||||
journaldir=~/sync/journal/
|
||||
file="$journaldir/$(date +%Y-%m-%d).md"
|
||||
if [[ ! -e $file ]] ; then
|
||||
cp $journaldir/template.md $file || return
|
||||
fi
|
||||
vim +Goyo +PencilSoft $file
|
||||
$EDITOR $file
|
||||
}
|
||||
|
||||
syncfolder() {
|
||||
|
||||
Reference in New Issue
Block a user