@@ -2,12 +2,13 @@ Xcursor.size: 20 | |||||
! special | ! special | ||||
*.foreground: #effbff | *.foreground: #effbff | ||||
*.background: #20273a | |||||
!*.background: #20273a | |||||
*.background: #282c34 | |||||
*.cursorColor: #effbff | *.cursorColor: #effbff | ||||
! black | ! black | ||||
*.color0: #000000 | *.color0: #000000 | ||||
*.color8: #4d4d4d | |||||
*.color8: #3d0066 | |||||
! red | ! red | ||||
*.color1: #ff6360 | *.color1: #ff6360 | ||||
@@ -36,3 +37,5 @@ Xcursor.size: 20 | |||||
! white | ! white | ||||
*.color7: #effbff | *.color7: #effbff | ||||
*.color15: #effbff | *.color15: #effbff | ||||
*.color17: #6600cc |
@@ -1,3 +1,5 @@ | |||||
# See dunst(5) for all configuration options | |||||
[global] | [global] | ||||
### Display ### | ### Display ### | ||||
@@ -17,37 +19,57 @@ | |||||
# will be ignored. | # will be ignored. | ||||
follow = mouse | follow = mouse | ||||
# The geometry of the window: | |||||
# [{width}]x{height}[+/-{x}+/-{y}] | |||||
# The geometry of the message window. | |||||
# The height is measured in number of notifications everything else | |||||
# in pixels. If the width is omitted but the height is given | |||||
# ("-geometry x2"), the message window expands over the whole screen | |||||
# (dmenu-like). If width is 0, the window expands to the longest | |||||
# message displayed. A positive x is measured from the left, a | |||||
# negative from the right side of the screen. Y is measured from | |||||
# the top and down respectively. | |||||
# The width can be negative. In this case the actual width is the | |||||
# screen width minus the width defined in within the geometry option. | |||||
geometry = "700x30-30+40" | |||||
# Show how many messages are currently hidden (because of geometry). | |||||
indicate_hidden = yes | |||||
### Geometry ### | |||||
# dynamic width from 0 to 300 | |||||
# width = (0, 300) | |||||
# constant width of 300 | |||||
width = (0, 800) | |||||
# The maximum height of a single notification, excluding the frame. | |||||
height = 800 | |||||
# Position the notification in the top right corner | |||||
origin = top-right | |||||
# Offset from the origin | |||||
offset = 30x40 | |||||
# Scale factor. It is auto-detected if value is 0. | |||||
scale = 0 | |||||
# Maximum number of notification (0 means no limit) | |||||
notification_limit = 0 | |||||
# Shrink window if it's smaller than the width. Will be ignored if | |||||
# width is 0. | |||||
shrink = no | |||||
### Progress bar ### | |||||
# Turn on the progess bar. It appears when a progress hint is passed with | |||||
# for example dunstify -h int:value:12 | |||||
progress_bar = true | |||||
# Set the progress bar height. This includes the frame, so make sure | |||||
# it's at least twice as big as the frame width. | |||||
progress_bar_height = 10 | |||||
# Set the frame width of the progress bar | |||||
progress_bar_frame_width = 1 | |||||
# Set the minimum width for the progress bar | |||||
progress_bar_min_width = 150 | |||||
# Set the maximum width for the progress bar | |||||
progress_bar_max_width = 300 | |||||
# Show how many messages are currently hidden (because of | |||||
# notification_limit). | |||||
indicate_hidden = yes | |||||
# The transparency of the window. Range: [0; 100]. | # The transparency of the window. Range: [0; 100]. | ||||
# This option will only work if a compositing window manager is | # This option will only work if a compositing window manager is | ||||
# present (e.g. xcompmgr, compiz, etc.). | |||||
# present (e.g. xcompmgr, compiz, etc.). (X11 only) | |||||
transparency = 15 | transparency = 15 | ||||
# The height of the entire notification. If the height is smaller | |||||
# than the font height and padding combined, it will be raised | |||||
# to the font height and padding. | |||||
notification_height = 0 | |||||
# Draw a line of "separator_height" pixel height between two | # Draw a line of "separator_height" pixel height between two | ||||
# notifications. | # notifications. | ||||
# Set to 0 to disable. | # Set to 0 to disable. | ||||
@@ -59,9 +81,12 @@ | |||||
# Horizontal padding. | # Horizontal padding. | ||||
horizontal_padding = 8 | horizontal_padding = 8 | ||||
# Padding between text and icon. | |||||
text_icon_padding = 0 | |||||
# Defines width in pixels of frame around the notification window. | # Defines width in pixels of frame around the notification window. | ||||
# Set to 0 to disable. | # Set to 0 to disable. | ||||
frame_width = 1 | |||||
frame_width = 3 | |||||
# Defines color of the frame around the notification window. | # Defines color of the frame around the notification window. | ||||
frame_color = "#41008c" | frame_color = "#41008c" | ||||
@@ -82,11 +107,11 @@ | |||||
# Set to 0 to disable. | # Set to 0 to disable. | ||||
# A client can set the 'transient' hint to bypass this. See the rules | # A client can set the 'transient' hint to bypass this. See the rules | ||||
# section for how to disable this if necessary | # section for how to disable this if necessary | ||||
idle_threshold = 120 | |||||
# idle_threshold = 120 | |||||
### Text ### | ### Text ### | ||||
font = monospace 13 | |||||
font = Monospace 13 | |||||
# The spacing between lines. If the height is smaller than the | # The spacing between lines. If the height is smaller than the | ||||
# font height, it will get raised to the font height. | # font height, it will get raised to the font height. | ||||
@@ -100,7 +125,7 @@ | |||||
# <u>underline</u> | # <u>underline</u> | ||||
# | # | ||||
# For a complete reference see | # For a complete reference see | ||||
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>. | |||||
# <https://developer.gnome.org/pango/stable/pango-Markup.html>. | |||||
# | # | ||||
# strip: This setting is provided for compatibility with some broken | # strip: This setting is provided for compatibility with some broken | ||||
# clients that send markup even though it's not enabled on the | # clients that send markup even though it's not enabled on the | ||||
@@ -114,7 +139,7 @@ | |||||
# | # | ||||
# It's important to note that markup inside the format option will be parsed | # It's important to note that markup inside the format option will be parsed | ||||
# regardless of what this is set to. | # regardless of what this is set to. | ||||
markup = full | |||||
markup = no | |||||
# The format of the message. Possible variables are: | # The format of the message. Possible variables are: | ||||
# %a appname | # %a appname | ||||
@@ -132,16 +157,16 @@ | |||||
# Possible values are "left", "center" and "right". | # Possible values are "left", "center" and "right". | ||||
alignment = left | alignment = left | ||||
# Vertical alignment of message text and icon. | |||||
# Possible values are "top", "center" and "bottom". | |||||
vertical_alignment = center | |||||
# Show age of message if message is older than show_age_threshold | # Show age of message if message is older than show_age_threshold | ||||
# seconds. | # seconds. | ||||
# Set to -1 to disable. | # Set to -1 to disable. | ||||
show_age_threshold = 60 | show_age_threshold = 60 | ||||
# Split notifications into multiple lines if they don't fit into | |||||
# geometry. | |||||
word_wrap = yes | |||||
# When word_wrap is set to no, specify where to make an ellipsis in long lines. | |||||
# Specify where to make an ellipsis in long lines. | |||||
# Possible values are "start", "middle" and "end". | # Possible values are "start", "middle" and "end". | ||||
ellipsize = middle | ellipsize = middle | ||||
@@ -162,11 +187,16 @@ | |||||
# Align icons left/right/off | # Align icons left/right/off | ||||
icon_position = left | icon_position = left | ||||
# Scale small icons up to this size, set to 0 to disable. Helpful | |||||
# for e.g. small files or high-dpi screens. In case of conflict, | |||||
# max_icon_size takes precedence over this. | |||||
min_icon_size = 0 | |||||
# Scale larger icons down to this size, set to 0 to disable | # Scale larger icons down to this size, set to 0 to disable | ||||
max_icon_size = 32 | max_icon_size = 32 | ||||
# Paths to default icons. | # Paths to default icons. | ||||
icon_path = /usr/share/icons/Arc/status/32:/usr/share/icons/Arc/devices/32 | |||||
icon_path = /usr/share/icons/breeze-dark/status/16/:/usr/share/icons/breeze/devices/16/ | |||||
### History ### | ### History ### | ||||
@@ -183,7 +213,7 @@ | |||||
dmenu = /usr/bin/dmenu -p dunst: | dmenu = /usr/bin/dmenu -p dunst: | ||||
# Browser for opening urls in context menu. | # Browser for opening urls in context menu. | ||||
browser = /usr/bin/firefox -new-tab | |||||
browser = /usr/bin/xdg-open | |||||
# Always run rule-defined scripts, even if the notification is suppressed | # Always run rule-defined scripts, even if the notification is suppressed | ||||
always_run_script = true | always_run_script = true | ||||
@@ -194,20 +224,6 @@ | |||||
# Define the class of the windows spawned by dunst | # Define the class of the windows spawned by dunst | ||||
class = Dunst | class = Dunst | ||||
# Print a notification on startup. | |||||
# This is mainly for error detection, since dbus (re-)starts dunst | |||||
# automatically after a crash. | |||||
startup_notification = false | |||||
# Manage dunst's desire for talking | |||||
# Can be one of the following values: | |||||
# crit: Critical features. Dunst aborts | |||||
# warn: Only non-fatal warnings | |||||
# mesg: Important Messages | |||||
# info: all unimportant stuff | |||||
# debug: all less than unimportant stuff | |||||
verbosity = mesg | |||||
# Define the corner radius of the notification window | # Define the corner radius of the notification window | ||||
# in pixel size. If the radius is 0, you have no rounded | # in pixel size. If the radius is 0, you have no rounded | ||||
# corners. | # corners. | ||||
@@ -215,6 +231,22 @@ | |||||
# notification height to avoid clipping text and/or icons. | # notification height to avoid clipping text and/or icons. | ||||
corner_radius = 0 | corner_radius = 0 | ||||
# Ignore the dbus closeNotification message. | |||||
# Useful to enforce the timeout set by dunst configuration. Without this | |||||
# parameter, an application may close the notification sent before the | |||||
# user defined timeout. | |||||
ignore_dbusclose = false | |||||
### Wayland ### | |||||
# These settings are Wayland-specific. They have no effect when using X11 | |||||
# Uncomment this if you want to let notications appear under fullscreen | |||||
# applications (default: overlay) | |||||
# layer = top | |||||
# Set this to true to use X11 output on Wayland. | |||||
force_xwayland = false | |||||
### Legacy | ### Legacy | ||||
# Use the Xinerama extension instead of RandR for multi-monitor support. | # Use the Xinerama extension instead of RandR for multi-monitor support. | ||||
@@ -229,15 +261,21 @@ | |||||
### mouse | ### mouse | ||||
# Defines action of mouse event | |||||
# Defines list of actions for each mouse event | |||||
# Possible values are: | # Possible values are: | ||||
# * none: Don't do anything. | # * none: Don't do anything. | ||||
# * do_action: If the notification has exactly one action, or one is marked as default, | |||||
# invoke it. If there are multiple and no default, open the context menu. | |||||
# * do_action: Invoke the action determined by the action_name rule. If there is no | |||||
# such action, open the context menu. | |||||
# * open_url: If the notification has exactly one url, open it. If there are multiple | |||||
# ones, open the context menu. | |||||
# * close_current: Close current notification. | # * close_current: Close current notification. | ||||
# * close_all: Close all notifications. | # * close_all: Close all notifications. | ||||
# * context: Open context menu for the notification. | |||||
# * context_all: Open context menu for all notifications. | |||||
# These values can be strung together for each mouse event, and | |||||
# will be executed in sequence. | |||||
mouse_left_click = close_current | mouse_left_click = close_current | ||||
mouse_middle_click = do_action | |||||
mouse_middle_click = do_action, close_current | |||||
mouse_right_click = close_all | mouse_right_click = close_all | ||||
# Experimental features that may or may not work correctly. Do not expect them | # Experimental features that may or may not work correctly. Do not expect them | ||||
@@ -250,27 +288,6 @@ | |||||
# where there are multiple screens with very different dpi values. | # where there are multiple screens with very different dpi values. | ||||
per_monitor_dpi = false | per_monitor_dpi = false | ||||
[shortcuts] | |||||
# Shortcuts are specified as [modifier+][modifier+]...key | |||||
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", | |||||
# "mod3" and "mod4" (windows-key). | |||||
# Xev might be helpful to find names for keys. | |||||
# Close notification. | |||||
close = ctrl+space | |||||
# Close all notifications. | |||||
close_all = ctrl+shift+space | |||||
# Redisplay last message(s). | |||||
# On the US keyboard layout "grave" is normally above TAB and left | |||||
# of "1". Make sure this key actually exists on your keyboard layout, | |||||
# e.g. check output of 'xmodmap -pke' | |||||
history = ctrl+grave | |||||
# Context menu. | |||||
context = ctrl+shift+period | |||||
[urgency_low] | [urgency_low] | ||||
# IMPORTANT: colors have to be defined in quotation marks. | # IMPORTANT: colors have to be defined in quotation marks. | ||||
@@ -321,6 +338,7 @@ | |||||
# set_transient | # set_transient | ||||
# timeout | # timeout | ||||
# urgency | # urgency | ||||
# action_name | |||||
# | # | ||||
# Shell-like globbing will get expanded. | # Shell-like globbing will get expanded. | ||||
# | # | ||||
@@ -335,8 +353,6 @@ | |||||
# script appname summary body icon urgency | # script appname summary body icon urgency | ||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL". | # where urgency can be "LOW", "NORMAL" or "CRITICAL". | ||||
# | # | ||||
# NOTE: if you don't want a notification to be displayed, set the format | |||||
# to "". | |||||
# NOTE: It might be helpful to run dunst -print in a terminal in order | # NOTE: It might be helpful to run dunst -print in a terminal in order | ||||
# to find fitting options for rules. | # to find fitting options for rules. | ||||
@@ -375,7 +391,7 @@ | |||||
#[ignore] | #[ignore] | ||||
# # This notification will not be displayed | # # This notification will not be displayed | ||||
# summary = "foobar" | # summary = "foobar" | ||||
# format = "" | |||||
# skip_display = true | |||||
#[history-ignore] | #[history-ignore] | ||||
# # This notification will not be saved in history | # # This notification will not be saved in history | ||||
@@ -0,0 +1,21 @@ | |||||
{ | |||||
"languageserver": { | |||||
"ccls": { | |||||
"command": "ccls", | |||||
"args": ["--log-file=/tmp/ccls.log", "-v=1"], | |||||
"filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"], | |||||
"rootPatterns": [".ccls", "compile_commands.json", ".git/", ".hg/"], | |||||
"initializationOptions": { | |||||
"cache": { | |||||
"directory": "/tmp/ccls" | |||||
}, | |||||
"index": { | |||||
"onChange": true | |||||
}, | |||||
"highlight": { | |||||
"lsRanges": true | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -12,6 +12,12 @@ call plug#begin('~/.vim/plugged') | |||||
"{{ Junegunn Choi Plugins }} | "{{ Junegunn Choi Plugins }} | ||||
Plug 'junegunn/limelight.vim' " Hyperfocus on a range | Plug 'junegunn/limelight.vim' " Hyperfocus on a range | ||||
Plug 'junegunn/fzf.vim' | Plug 'junegunn/fzf.vim' | ||||
"{{ C++ development }} | |||||
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |||||
Plug 'jackguo380/vim-lsp-cxx-highlight' | |||||
Plug 'vim-syntastic/syntastic' | |||||
Plug 'rhysd/vim-clang-format' | |||||
Plug 'lambdalisue/suda.vim' | |||||
call plug#end() | call plug#end() | ||||
" for transparent background | " for transparent background | ||||
@@ -79,6 +85,11 @@ let mapleader="," | |||||
" Don’t add empty newlines at the end of files | " Don’t add empty newlines at the end of files | ||||
set binary | set binary | ||||
set noeol | set noeol | ||||
set smartcase | |||||
set noswapfile | |||||
set nobackup | |||||
set undodir=~/.vim/undodir | |||||
set undofile | |||||
" 256 colors | " 256 colors | ||||
set t_Co=256 | set t_Co=256 | ||||
@@ -120,13 +131,198 @@ set title | |||||
" Show the (partial) command as it’s being typed | " Show the (partial) command as it’s being typed | ||||
set showcmd | set showcmd | ||||
" Use relative line numbers | " Use relative line numbers | ||||
" For C++ plugins | |||||
set hidden | |||||
set nobackup | |||||
set nowritebackup | |||||
set updatetime=300 | |||||
set shortmess+=c | |||||
" Give more space for displaying messages. | |||||
set cmdheight=2 | |||||
set pumheight=5 | |||||
" Always show the signcolumn, otherwise it would shift the text each time | |||||
" diagnostics appear/become resolved. | |||||
if has("nvim-0.5.0") || has("patch-8.1.1564") | |||||
" Recently vim can merge signcolumn and number column into one | |||||
set signcolumn=number | |||||
else | |||||
set signcolumn=yes | |||||
endif | |||||
inoremap <silent><expr> <TAB> | |||||
\ pumvisible() ? "\<C-n>" : | |||||
\ <SID>check_back_space() ? "\<TAB>" : | |||||
\ coc#refresh() | |||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" | |||||
function! s:check_back_space() 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-return> coc#refresh() | |||||
else | |||||
inoremap <silent><expr> <c-@> coc#refresh() | |||||
endif | |||||
" Make <CR> auto-select the first completion item and notify coc.nvim to | |||||
" format on enter, <cr> could be remapped by other vim plugin | |||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() | |||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>" | |||||
" Use `[g` and `]g` to navigate diagnostics | |||||
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. | |||||
nmap <silent> [g <Plug>(coc-diagnostic-prev) | |||||
nmap <silent> ]g <Plug>(coc-diagnostic-next) | |||||
" GoTo code navigation. | |||||
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) | |||||
" Use K to show documentation in preview window. | |||||
nnoremap <silent> K :call <SID>show_documentation()<CR> | |||||
function! s:show_documentation() | |||||
if (index(['vim','help'], &filetype) >= 0) | |||||
execute 'h '.expand('<cword>') | |||||
elseif (coc#rpc#ready()) | |||||
call CocActionAsync('doHover') | |||||
else | |||||
execute '!' . &keywordprg . " " . expand('<cword>') | |||||
endif | |||||
endfunction | |||||
" Highlight the symbol and its references when holding the cursor. | |||||
autocmd CursorHold * silent call CocActionAsync('highlight') | |||||
" Symbol renaming. | |||||
nmap <leader>rn <Plug>(coc-rename) | |||||
" Formatting selected code. | |||||
xmap <leader>f <Plug>(coc-format-selected) | |||||
nmap <leader>f <Plug>(coc-format-selected) | |||||
augroup mygroup | |||||
autocmd! | |||||
" Setup formatexpr specified filetype(s). | |||||
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') | |||||
" Update signature help on jump placeholder. | |||||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') | |||||
augroup end | |||||
" Applying codeAction to the selected region. | |||||
" Example: `<leader>aap` for current paragraph | |||||
xmap <leader>a <Plug>(coc-codeaction-selected) | |||||
nmap <leader>a <Plug>(coc-codeaction-selected) | |||||
" Remap keys for applying codeAction to the current buffer. | |||||
nmap <leader>ac <Plug>(coc-codeaction) | |||||
" Apply AutoFix to problem on the current line. | |||||
nmap <leader>qf <Plug>(coc-fix-current) | |||||
" Run the Code Lens action on the current line. | |||||
nmap <leader>cl <Plug>(coc-codelens-action) | |||||
" Remap <C-f> and <C-b> for scroll float windows/popups. | |||||
if has('nvim-0.4.0') || has('patch-8.2.0750') | |||||
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>" | |||||
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>" | |||||
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>" | |||||
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>" | |||||
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>" | |||||
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>" | |||||
endif | |||||
" Add `:Format` command to format current buffer. | |||||
command! -nargs=0 Format :call CocActionAsync('format') | |||||
" Add `:Fold` command to fold current buffer. | |||||
command! -nargs=? Fold :call CocAction('fold', <f-args>) | |||||
" Add `:OR` command for organize imports of the current buffer. | |||||
command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport') | |||||
let g:lightline = { | |||||
\ 'colorscheme': 'onedark', | |||||
\ 'active': { | |||||
\ 'left': [ [ 'mode', 'paste' ], | |||||
\ [ 'cocstatus', 'readonly', 'filename', 'modified' ] ] | |||||
\ }, | |||||
\ 'component_function': { | |||||
\ 'cocstatus': 'coc#status' | |||||
\ }, | |||||
\ } | |||||
" Use autocmd to force lightline update. | |||||
autocmd User CocStatusChange,CocDiagnosticChange call lightline#update() | |||||
" Mappings for CoCList | |||||
" Show all diagnostics. | |||||
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr> | |||||
" Manage extensions. | |||||
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr> | |||||
" Show commands. | |||||
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr> | |||||
" Find symbol of current document. | |||||
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr> | |||||
" Search workspace symbols. | |||||
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr> | |||||
" Do default action for next item. | |||||
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR> | |||||
" Do default action for previous item. | |||||
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR> | |||||
" Resume latest coc list. | |||||
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR> | |||||
" c++ syntax highlighting | |||||
let g:cpp_class_scope_highlight = 1 | |||||
let g:cpp_member_variable_highlight = 1 | |||||
let g:cpp_class_decl_highlight = 1 | |||||
" c++ linting | |||||
let g:syntastic_cpp_checkers = ['cpplint'] | |||||
let g:syntastic_c_checkers = ['cpplint'] | |||||
let g:syntastic_cpp_cpplint_exec = 'cpplint' | |||||
" The following two lines are optional. Configure it to your liking! | |||||
let g:syntastic_check_on_open = 1 | |||||
let g:syntastic_check_on_wq = 0 | |||||
nnoremap <Leader>f :<C-u>ClangFormat<CR> | |||||
" header guards | |||||
function! s:insert_gates() | |||||
let gatename = substitute(toupper(expand("%:t")), "\\.", "_", "g") | |||||
execute "normal! i#ifndef " . gatename | |||||
execute "normal! o#define " . gatename . " " | |||||
execute "normal! Go#endif /* " . gatename . " */" | |||||
normal! ko | |||||
endfunction | |||||
autocmd BufNewFile *.{h,hpp} call <SID>insert_gates() | |||||
if exists("&relativenumber") | if exists("&relativenumber") | ||||
set relativenumber | set relativenumber | ||||
au BufReadPost * set relativenumber | au BufReadPost * set relativenumber | ||||
endif | |||||
" Start scrolling three lines before the horizontal window border | |||||
endif " Start scrolling three lines before the horizontal window border | |||||
set scrolloff=3 | set scrolloff=3 | ||||
" Toggle spellchecking | |||||
function! ToggleSpellCheck() | |||||
set spell! | |||||
if &spell | |||||
echo "Spellcheck ON" | |||||
else | |||||
echo "Spellcheck OFF" | |||||
endif | |||||
endfunction | |||||
" Better tabbing | " Better tabbing | ||||
vnoremap < <gv | vnoremap < <gv | ||||
@@ -142,9 +338,16 @@ map <Leader>c :w! \| !make <CR> | |||||
map <Leader>r <c-w>v <c-w>l :terminal ./run.sh <c-r>% <CR>a | map <Leader>r <c-w>v <c-w>l :terminal ./run.sh <c-r>% <CR>a | ||||
map <Leader>t :!st&<CR><CR> | map <Leader>t :!st&<CR><CR> | ||||
map <Leader>o :FZF<CR> | map <Leader>o :FZF<CR> | ||||
map <Leader>s :call ToggleSpellCheck()<CR> | |||||
map <Leader>n :NERDTreeToggle<CR> | |||||
map Q gq | |||||
" Insert mode completion | " Insert mode completion | ||||
imap <c-x><c-k> <plug>(fzf-complete-word) | imap <c-x><c-k> <plug>(fzf-complete-word) | ||||
imap <c-x><c-f> <plug>(fzf-complete-path) | imap <c-x><c-f> <plug>(fzf-complete-path) | ||||
imap <c-x><c-l> <plug>(fzf-complete-line) | imap <c-x><c-l> <plug>(fzf-complete-line) | ||||
vnoremap <C-c> "+y | vnoremap <C-c> "+y | ||||
" Write as root | |||||
cnoremap w!! SudaWrite | |||||
colorscheme onedark |
@@ -8,15 +8,15 @@ glx-no-rebind-pixmap = true; | |||||
opacity-rule = [ | opacity-rule = [ | ||||
"90:class_g = 'URxvt'", | "90:class_g = 'URxvt'", | ||||
"90:class_g = 'Alacritty'", | "90:class_g = 'Alacritty'", | ||||
"70:class_g = 'st-256color'", | |||||
"95:class_g = 'St' && focused", | |||||
"80:class_g = 'St' && !focused", | |||||
"90:class_g = 'tabbed'", | "90:class_g = 'tabbed'", | ||||
"95:class_g = 'Emacs'" | "95:class_g = 'Emacs'" | ||||
]; | ]; | ||||
# Blur | # Blur | ||||
#blur-background = true; | |||||
#blur-method = "dual_kawase"; | |||||
#blur-strength = 2; | |||||
blur-background = true; | |||||
blur-method = "dual_kawase"; blur-strength = 3; | |||||
# Fading | # Fading | ||||
fading = false; | fading = false; | ||||
@@ -24,12 +24,18 @@ fade-in-step = 0.05; | |||||
fade-out-step = 0.05; | fade-out-step = 0.05; | ||||
fade-exclude = [ ]; | fade-exclude = [ ]; | ||||
# Rounded corners | |||||
corner-radius=20 | |||||
rounded-corners-exclude= [ | |||||
"class_g = 'dwm'", | |||||
"class_g = 'dmenu'", | |||||
] | |||||
# Other | # Other | ||||
mark-wmwin-focused = true; | mark-wmwin-focused = true; | ||||
mark-ovredir-focused = true; | mark-ovredir-focused = true; | ||||
detect-rounded-corners = true; | detect-rounded-corners = true; | ||||
detect-client-opacity = true; | detect-client-opacity = true; | ||||
refresh-rate = 0; | |||||
dbe = false; | dbe = false; | ||||
unredir-if-possible = true; | unredir-if-possible = true; | ||||
focus-exclude = [ "class_g = 'Cairo-clock'" ]; | focus-exclude = [ "class_g = 'Cairo-clock'" ]; | ||||
@@ -1,8 +1,8 @@ | |||||
# Generated by Powerlevel10k configuration wizard on 2021-03-14 at 16:12 +06. | |||||
# Generated by Powerlevel10k configuration wizard on 2021-11-19 at 13:58 MSK. | |||||
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 15764. | # Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 15764. | ||||
# Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode, | # Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode, | ||||
# 24h time, angled separators, sharp heads, flat tails, 2 lines, disconnected, no frame, | |||||
# compact, many icons, concise, transient_prompt, instant_prompt=verbose. | |||||
# angled separators, sharp heads, flat tails, 2 lines, disconnected, no frame, compact, | |||||
# many icons, concise, transient_prompt, instant_prompt=verbose. | |||||
# Type `p10k configure` to generate another config. | # Type `p10k configure` to generate another config. | ||||
# | # | ||||
# Config for Powerlevel10k with powerline prompt style with colorful background. | # Config for Powerlevel10k with powerline prompt style with colorful background. | ||||
@@ -96,7 +96,7 @@ | |||||
todo # todo items (https://github.com/todotxt/todo.txt-cli) | todo # todo items (https://github.com/todotxt/todo.txt-cli) | ||||
timewarrior # timewarrior tracking status (https://timewarrior.net/) | timewarrior # timewarrior tracking status (https://timewarrior.net/) | ||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/) | taskwarrior # taskwarrior task count (https://taskwarrior.org/) | ||||
time # current time | |||||
# time # current time | |||||
# =========================[ Line #2 ]========================= | # =========================[ Line #2 ]========================= | ||||
newline | newline | ||||
# ip # ip address and bandwidth usage for a specified network interface | # ip # ip address and bandwidth usage for a specified network interface | ||||
@@ -10,6 +10,8 @@ export EDITOR="nvim" | |||||
export TERMINAL="st" | export TERMINAL="st" | ||||
export BROWSER="firefox" | export BROWSER="firefox" | ||||
export LC_CTYPE=ru_RU.UTF-8 | export LC_CTYPE=ru_RU.UTF-8 | ||||
export WECHALLUSER="rinri" | |||||
export WECHALLTOKEN="5F489-F2870-9F223-96264-58717-4AAB4" | |||||
# less + man | # less + man | ||||
export LESS_TERMCAP_mb=$'\e[1;32m' | export LESS_TERMCAP_mb=$'\e[1;32m' | ||||
@@ -24,20 +26,27 @@ export PAGER="less" | |||||
fzfcd () { | fzfcd () { | ||||
cd "$(fd --type d --follow --exclude .git --exclude node_modules | fzf)" | cd "$(fd --type d --follow --exclude .git --exclude node_modules | fzf)" | ||||
} | } | ||||
alias em="emacsclient --create-frame" | |||||
alias ..="cd .." | alias ..="cd .." | ||||
alias ls="ls --color" | alias ls="ls --color" | ||||
alias ll="ls -l --color" | |||||
alias la="ls -a --color" | |||||
alias lal="ls -al --color" | |||||
alias ll="ls --color -l" | |||||
alias la="ls --color -A" | |||||
alias lal="ls --color -Al" | |||||
alias huion="xsetwacom set 'HUION Huion Tablet Pen stylus' Area 4384 3990 24384 15240" | |||||
alias dxyz="ssh root@rinri-d.xyz" | alias dxyz="ssh root@rinri-d.xyz" | ||||
alias mrcon="mcrcon -H rinri-d.xyz -p -t" | |||||
alias vim="nvim" | alias vim="nvim" | ||||
alias minemus="mpv --no-video https://youtu.be/Dg0IjOzopYU" | |||||
alias weebcabin="~/scripts/anime.sh" | |||||
alias cal="cal -m" | alias cal="cal -m" | ||||
alias sudo="doas" | |||||
# Lines configured by zsh-newuser-install | # Lines configured by zsh-newuser-install | ||||
HISTFILE=~/.histfile | HISTFILE=~/.histfile | ||||
HISTSIZE=100000 | HISTSIZE=100000 | ||||
SAVEHIST=100000 | SAVEHIST=100000 | ||||
bindkey -e | |||||
bindkey -v | |||||
# End of lines configured by zsh-newuser-install | # End of lines configured by zsh-newuser-install | ||||
# The following lines were added by compinstall | # The following lines were added by compinstall | ||||
zstyle :compinstall filename '/home/rinri/.zshrc' | zstyle :compinstall filename '/home/rinri/.zshrc' | ||||
@@ -49,12 +58,20 @@ compinit | |||||
_comp_options+=(globdots) | _comp_options+=(globdots) | ||||
bindkey -s '^o' 'fzfcd\n' | bindkey -s '^o' 'fzfcd\n' | ||||
bindkey -M viins '\e.' insert-last-word | |||||
# End of lines added by compinstall | # End of lines added by compinstall | ||||
source ~/src/powerlevel10k/powerlevel10k.zsh-theme | source ~/src/powerlevel10k/powerlevel10k.zsh-theme | ||||
source ~/src/antigen.zsh | |||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | ||||
source /usr/share/fzf/completion.zsh | |||||
source /usr/share/fzf/key-bindings.zsh | |||||
antigen bundle jeffreytse/zsh-vi-mode | |||||
antigen apply | |||||
# The plugin will auto execute this zvm_after_init function | |||||
function zvm_after_init() { | |||||
source /usr/share/fzf/completion.zsh | |||||
source /usr/share/fzf/key-bindings.zsh | |||||
} | |||||
# fzf things | # fzf things | ||||
export FZF_DEFAULT_COMMAND="fd --color=never --type f --type l --follow --exclude .git --exclude node_modules" | export FZF_DEFAULT_COMMAND="fd --color=never --type f --type l --follow --exclude .git --exclude node_modules" | ||||
@@ -5,12 +5,12 @@ | |||||
- Terminal: [st](https://st.suckless.org/) | - Terminal: [st](https://st.suckless.org/) | ||||
- Editor: [neovim](https://neovim.io/) | - Editor: [neovim](https://neovim.io/) | ||||
- Font: DejaVuMono Nerd Patched | - Font: DejaVuMono Nerd Patched | ||||
- X11 Compositor: [picom](https://github.com/yshui/picom) (dual_kawase blur + rounded corners) | |||||
- Music player: [cmus](https://github.com/cmus/cmus) | - Music player: [cmus](https://github.com/cmus/cmus) | ||||
- Video player: [mpv](https://mpv.io/) | - Video player: [mpv](https://mpv.io/) | ||||
- Notifications: [Dunst](https://github.com/dunst-project/dunst) | - Notifications: [Dunst](https://github.com/dunst-project/dunst) | ||||
- Status bar: [slstatus](https://tools.suckless.org/slstatus/) | - Status bar: [slstatus](https://tools.suckless.org/slstatus/) | ||||
- Email client: [neomutt](https://neomutt.org/) + [thunderbird](https://www.thunderbird.net) | |||||
- Wallpaper: [wallhaven](https://wallhaven.cc/w/p8q1x3) (konachan is better) | |||||
- Wallpaper: [pixiv](https://wallhaven.cc/w/p8q1x3) | |||||
## Screenshots | ## Screenshots | ||||
@@ -20,16 +20,16 @@ | |||||
### Neofetch: | ### Neofetch: | ||||
![neofetch](neofetch.jpg) | ![neofetch](neofetch.jpg) | ||||
### Music player and mixer(cmus + pulsemixer): | |||||
### Music player: | |||||
![cmus](cmus.jpg) | ![cmus](cmus.jpg) | ||||
### Text editor(neovim): | |||||
### Text editor (neovim): | |||||
![neovim](vim.jpg) | ![neovim](vim.jpg) | ||||
### Notifications(dunst): | |||||
### Notifications (dunst): | |||||
![dunst](dunst.jpg) | ![dunst](dunst.jpg) | ||||
### Browser(firefox): | |||||
### Browser (firefox): | |||||
![firefox](firefox.jpg) | ![firefox](firefox.jpg) | ||||
### Wallpaper: | ### Wallpaper: | ||||