Compare commits

...

5 Commits

Author SHA1 Message Date
a8d17796e6 Remove element 2024-02-23 21:51:28 +01:00
a04f26343d Sync journal via nextcloud 2024-02-23 21:51:28 +01:00
970c5a614c Use helix as standard editor 2024-02-23 21:51:28 +01:00
eaf1382493 vim: Update config 2024-02-23 21:51:28 +01:00
53701526be dpms: Update intervals 2024-02-23 21:51:28 +01:00
6 changed files with 53 additions and 20 deletions

View File

@@ -5,7 +5,6 @@ After=windowmanager.target
Wants=blueman.service Wants=blueman.service
Wants=dpms.service Wants=dpms.service
Wants=dunst.service Wants=dunst.service
Wants=element.service
{% for profile, config in (user.firefox_profiles|default({})).items() %} {% for profile, config in (user.firefox_profiles|default({})).items() %}
{% if config.bigger_font|default(false) is sameas false %} {% if config.bigger_font|default(false) is sameas false %}
Wants=firefox@{{ profile }}.service Wants=firefox@{{ profile }}.service

View File

@@ -5,6 +5,5 @@ After=windowmanager.target
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/usr/bin/env xset s off 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 PassEnvironment=DISPLAY
Restart=always

View File

@@ -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

View File

@@ -36,6 +36,10 @@ Plug 'reedes/vim-pencil', Cond(!exists('g:vscode'))
"" markdown "" markdown
Plug 'suan/vim-instant-markdown', Cond(!exists('g:vscode')) 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() call plug#end()
filetype plugin indent on filetype plugin indent on
@@ -98,7 +102,7 @@ set nowritebackup
" == swap == " == swap ==
set swapfile set swapfile
set updatecount=200 set updatecount=200
set updatetime=10000 set updatetime=300
" == undo == " == undo ==
set undolevels=1000 set undolevels=1000
@@ -144,6 +148,8 @@ set termguicolors
" === keybinds === " === keybinds ===
set pastetoggle=<F11> set pastetoggle=<F11>
set signcolumn=yes
let maplocalleader = "ö" let maplocalleader = "ö"
let mapleader = "\<Space>" let mapleader = "\<Space>"
" map <leader>w: w!<cr> " map <leader>w: w!<cr>
@@ -209,6 +215,10 @@ else
syntax enable syntax enable
silent! colorscheme monokai silent! colorscheme monokai
highlight Comment guifg=#64d86b
highlight SpecialComment guifg=#64d86b
highlight Todo guibg=#a9ebad
let g:lightline = { let g:lightline = {
\ 'colorscheme': 'wombat', \ 'colorscheme': 'wombat',
\ 'active': { \ 'active': {
@@ -250,6 +260,8 @@ else
" == limelight == " == limelight ==
let g:limelight_default_coefficient = 0.5 let g:limelight_default_coefficient = 0.5
let g:ale_linters = {'rust': ['rust-analyzer']}
" === functions === " === functions ===
function! DeleteTrailingWS() function! DeleteTrailingWS()
exe "normal mz" exe "normal mz"
@@ -269,6 +281,40 @@ else
let g:rustfmt_autosave = 1 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 " https://stackoverflow.com/a/8585343
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR> 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 endif

View File

@@ -11,8 +11,8 @@ for part in ${_path[@]} ; do
done done
export PATH export PATH
export EDITOR="nvim" export EDITOR="hx"
export VISUAL="nvim" export VISUAL="hx"
export BROWSER="firefox" export BROWSER="firefox"
export PAGER="less" export PAGER="less"

View File

@@ -183,12 +183,12 @@ sb() {
} }
journal() { journal() {
journaldir=~/journal/ journaldir=~/sync/journal/
file=~/journal/$(date +%Y-%m-%d).md file="$journaldir/$(date +%Y-%m-%d).md"
if [[ ! -e $file ]] ; then if [[ ! -e $file ]] ; then
cp $journaldir/template.md $file || return cp $journaldir/template.md $file || return
fi fi
vim +Goyo +PencilSoft $file $EDITOR $file
} }
syncfolder() { syncfolder() {