aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bashrc12
-rw-r--r--.repos/dwm/config.h47
-rwxr-xr-x.scripts/leds8
-rwxr-xr-x.scripts/panic3
-rwxr-xr-x.scripts/wallset8
-rw-r--r--.vimrc26
-rw-r--r--.xinitrc1
7 files changed, 71 insertions, 34 deletions
diff --git a/.bashrc b/.bashrc
index efe5b46..4631e9a 100644
--- a/.bashrc
+++ b/.bashrc
@@ -24,12 +24,14 @@ export ASAN_OPTIONS=verify_asan_link_order=0
umask 027
+alias c='cd'
alias ls='ls --color=auto'
+alias l='ls'
alias vi='vim'
alias v='vim'
alias zat='setsid -f zathura'
alias mtoot='madonctl -i chaos.social toot'
-alias toot='vipe | mtoot --stdin'
+alias toot='vipe | mtoot --stdin &>/dev/null || echo failure'
alias npm="node --dns-result-order=ipv4first $(which npm)"
alias gi='git init'
@@ -51,9 +53,6 @@ set -o noclobber # no > misuse; >| instead
set -o notify
set -o vi
-stty susp undef
-bind -x '"\C-z":"fg"'
-
f() {
RG_PREFIX="rga --files-with-matches"
local file
@@ -82,3 +81,8 @@ e() {
}
. ~/.scripts/z.sh
+. /usr/share/fzf/key-bindings.bash
+. /usr/share/fzf/completion.bash
+
+stty susp undef
+bind -x '"\C-z":"fg"'
diff --git a/.repos/dwm/config.h b/.repos/dwm/config.h
index 33a6d78..138cdef 100644
--- a/.repos/dwm/config.h
+++ b/.repos/dwm/config.h
@@ -22,7 +22,8 @@ typedef struct {
const char *name;
const void *cmd;
} Sp;
-const char *spcmd1[] = {"term", "-t", "spterm", NULL };
+const char *spcmd0[] = {"term", "-t", "spterm1", NULL };
+const char *spcmd1[] = {"term", "-t", "spterm2", NULL };
const char *spcmd2[] = {"term", "-t", "spcalc", "-e", "python3", "-q", NULL };
const char *spcmd3[] = {"keepassxc", NULL };
const char *spcmd4[] = {"term", "-t", "mail", "-e", "neomutt", NULL };
@@ -31,9 +32,11 @@ const char *spcmd6[] = {"term", "-t", "spalsa", "-e", "alsamixer", NULL };
const char *spcmd7[] = {"term", "-t", "spcale", "-e", "calcurse", NULL };
const char *spcmd8[] = {"term", "-t", "sptop", "-e", "htop", NULL };
const char *spcmd9[] = {"term", "-t", "spnode", "-e", "node", NULL };
+const char *spcmd10[] = {"term", "-t", "vimterm", "-e", "vim", NULL };
static Sp scratchpads[] = {
/* name cmd */
- {"spterm", spcmd1},
+ {"spterm1", spcmd0},
+ {"spterm2", spcmd1},
{"spcalc", spcmd2},
{"keepassxc", spcmd3},
{"mail", spcmd4},
@@ -42,6 +45,7 @@ static Sp scratchpads[] = {
{"spcale", spcmd7},
{"sptop", spcmd8},
{"spnode", spcmd9},
+ {"vimterm", spcmd10},
};
/* tagging */
@@ -52,15 +56,17 @@ static const Rule rules[] = {
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
- { NULL, NULL, "spterm", SPTAG(0), 1, -1 },
- { NULL, NULL, "spcalc", SPTAG(1), 1, -1 },
- { NULL, "keepassxc",NULL, SPTAG(2), 1, -1 },
- { NULL, NULL, "mail", SPTAG(3), 1, -1 },
- { NULL, NULL, "weather", SPTAG(4), 1, -1 },
- { NULL, NULL, "spalsa", SPTAG(5), 1, -1 },
- { NULL, NULL, "spcale", SPTAG(6), 1, -1 },
- { NULL, NULL, "sptop", SPTAG(7), 1, -1 },
- { NULL, NULL, "spnode", SPTAG(8), 1, -1 },
+ { NULL, NULL, "spterm1", SPTAG(0), 1, -1 },
+ { NULL, NULL, "spterm2", SPTAG(1), 1, -1 },
+ { NULL, NULL, "spcalc", SPTAG(2), 1, -1 },
+ { NULL, "keepassxc",NULL, SPTAG(3), 1, -1 },
+ { NULL, NULL, "mail", SPTAG(4), 1, -1 },
+ { NULL, NULL, "weather", SPTAG(5), 1, -1 },
+ { NULL, NULL, "spalsa", SPTAG(6), 1, -1 },
+ { NULL, NULL, "spcale", SPTAG(7), 1, -1 },
+ { NULL, NULL, "sptop", SPTAG(8), 1, -1 },
+ { NULL, NULL, "spnode", SPTAG(9), 1, -1 },
+ { NULL, NULL, "vimterm", SPTAG(10), 1, -1 },
};
/* layout(s) */
@@ -124,14 +130,16 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0 } },
- { MODKEY, XK_apostrophe,togglescratch,{.ui = 1} },
- { MODKEY|ShiftMask, XK_l, togglescratch, {.ui = 2 } },
- { MODKEY|ShiftMask, XK_m, togglescratch, {.ui = 3 } },
- { MODKEY|ShiftMask, XK_w, togglescratch, {.ui = 4 } },
- { MODKEY|ShiftMask, XK_a, togglescratch, {.ui = 5 } },
- { MODKEY|ShiftMask, XK_c, togglescratch, {.ui = 6 } },
- { MODKEY|ShiftMask, XK_h, togglescratch, {.ui = 7 } },
- { MODKEY|ShiftMask, XK_apostrophe,togglescratch,{.ui = 8} },
+ { MODKEY|ControlMask|ShiftMask, XK_Return, togglescratch, {.ui = 1 } },
+ { MODKEY, XK_apostrophe,togglescratch,{.ui = 2} },
+ { MODKEY|ShiftMask, XK_l, togglescratch, {.ui = 3 } },
+ { MODKEY|ShiftMask, XK_m, togglescratch, {.ui = 4 } },
+ { MODKEY|ShiftMask, XK_w, togglescratch, {.ui = 5 } },
+ { MODKEY|ShiftMask, XK_a, togglescratch, {.ui = 6 } },
+ { MODKEY|ShiftMask, XK_c, togglescratch, {.ui = 7 } },
+ { MODKEY|ShiftMask, XK_h, togglescratch, {.ui = 8 } },
+ { MODKEY|ShiftMask, XK_apostrophe,togglescratch,{.ui = 9} },
+ { MODKEY, XK_v, togglescratch, {.ui = 10} },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
@@ -155,6 +163,7 @@ static Key keys[] = {
//{ 0, XF86XK_WakeUp, spawn, SHCMD("scrot") },
{ 0, XF86XK_Display, spawn, SHCMD("screen") },
{ 0, XF86XK_Favorites, spawn, SHCMD("slock") },
+ { MODKEY, XF86XK_Favorites, spawn, SHCMD("panic") },
};
/* button definitions */
diff --git a/.scripts/leds b/.scripts/leds
index 38015ef..fd0e53c 100755
--- a/.scripts/leds
+++ b/.scripts/leds
@@ -1,4 +1,8 @@
#!/bin/sh
-echo 0 | sudo tee -a /sys/devices/platform/thinkpad_acpi/leds/tpacpi\:\:power/brightness &>/dev/null
-echo 0 | sudo tee -a /sys/devices/platform/thinkpad_acpi/leds/tpacpi\:\:lid_logo_dot/brightness &>/dev/null
+#echo 0 | sudo tee -a /sys/class/leds/tpacpi\:\:power/brightness & >/dev/null
+
+echo 0 | sudo tee -a /sys/devices/platform/thinkpad_acpi/leds/tpacpi\:\:power/brightness &
+>/dev/null
+echo 0 | sudo tee -a /sys/devices/platform/thinkpad_acpi/leds/tpacpi\:\:lid_logo_dot/brightness &
+>/dev/null
diff --git a/.scripts/panic b/.scripts/panic
new file mode 100755
index 0000000..2368d8a
--- /dev/null
+++ b/.scripts/panic
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+systemctl poweroff
diff --git a/.scripts/wallset b/.scripts/wallset
index 0f3f12a..420f5a0 100755
--- a/.scripts/wallset
+++ b/.scripts/wallset
@@ -1,5 +1,7 @@
#!/bin/bash
-random=$(find $HOME/.walls -maxdepth 1 -name "k*" -type f | shuf -n 1)
-echo $random
-hsetroot -cover "$random"
+xsetroot -solid black
+
+#random=$(find $HOME/.walls -maxdepth 1 -name "k*" -type f | shuf -n 1)
+#echo $random
+#hsetroot -cover "$random"
diff --git a/.vimrc b/.vimrc
index d8a9270..f191fae 100644
--- a/.vimrc
+++ b/.vimrc
@@ -3,6 +3,11 @@ let mapleader=" "
call plug#begin()
Plug 'tpope/vim-commentary'
+Plug 'tpope/vim-repeat'
+Plug 'tpope/vim-surround'
+
+Plug 'kana/vim-textobj-user'
+Plug 'kana/vim-textobj-line'
Plug 'cohama/lexima.vim'
Plug 'dense-analysis/ale'
Plug 'sheerun/vim-polyglot'
@@ -13,6 +18,7 @@ Plug 'airblade/vim-gitgutter'
Plug 'matze/vim-move'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
+Plug 'eapache/rainbow_parentheses.vim'
Plug 'lucasprag/simpleblack'
call plug#end()
@@ -44,6 +50,7 @@ set history=10000
set encoding=utf-8
set hlsearch
set incsearch
+set backupdir=/tmp
set undodir=~/.vim/undo
set undofile
set undolevels=1000
@@ -82,15 +89,13 @@ set pumheight=20
set winminheight=0
set wildmode=list:longest,full
set listchars=tab:→\ ,eol:↵,trail:·,extends:↷,precedes:↶
-set fillchars=stl:\ ,stlnc:\ ,fold:\ ,vert:│
+set fillchars=stl:\ ,stlnc:\ ,fold:\ ,vert:│
set whichwrap+=<,>,h,l
set termencoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
-set nobackup
set noswapfile
-set nowritebackup
autocmd FileType * hi LineNr ctermfg=darkgrey
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
@@ -108,8 +113,8 @@ nnoremap <silent> <Leader>ww :w<CR>
call lexima#add_rule({'char': '$', 'input_after': '$', 'filetype': 'markdown'})
call lexima#add_rule({'char': '<BS>', 'at': '\$\%#\$', 'delete': 1, 'filetype': 'markdown'})
-call lexima#add_rule({'char': '*', 'input_after': '*', 'filetype': 'markdown'})
-call lexima#add_rule({'char': '<BS>', 'at': '\*\%#\*', 'delete': 1, 'filetype': 'markdown'})
+"call lexima#add_rule({'char': '*', 'input_after': '*', 'filetype': 'markdown'})
+"call lexima#add_rule({'char': '<BS>', 'at': '\*\%#\*', 'delete': 1, 'filetype': 'markdown'})
call lexima#add_rule({'char': '$', 'input_after': '$', 'filetype': 'tex'})
call lexima#add_rule({'char': '<BS>', 'at': '\$\%#\$', 'delete': 1, 'filetype': 'tex'})
call lexima#add_rule({
@@ -143,7 +148,7 @@ let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
-let g:vimwiki_list = [{'path': '~/notes/', 'syntax': 'markdown', 'ext': '.md'}]
+" let g:vimwiki_list = [{'path': '~/notes/', 'syntax': 'markdown', 'ext': '.md'}]
set signcolumn=no
nmap ghs <Plug>(GitGutterStageHunk)
@@ -165,11 +170,19 @@ let g:ale_fixers.markdown = ['pandoc']
let g:ale_fixers.javascript = ['xo']
let g:ale_fixers.java = ['google_java_format']
let g:ale_fixers.tex = ['latexindent']
+let g:ale_fixers.python = ['black']
+let g:ale_fixers.r = ['styler']
let g:ale_linters = {}
let g:ale_linters.sh = ['shellcheck']
let g:ale_linters.javascript = ['xo']
+let g:ale_linters.r = ['lintr']
+let g:ale_linters.python = ['pycodestyle']
let g:ale_markdown_pandoc_options = '-s -f markdown+yaml_metadata_block -t markdown -'
+let g:ale_virtualtext_cursor = 'disabled'
+
+au Syntax * RainbowParenthesesLoadSquare
+au VimEnter * RainbowParenthesesActivate
highlight CursorLine cterm=NONE ctermbg=NONE ctermfg=NONE guifg=NONE guibg=NONE
highlight SignColumn cterm=NONE ctermbg=NONE ctermfg=NONE guifg=NONE guibg=NONE
@@ -188,3 +201,4 @@ autocmd FileType java set tabstop=2|set shiftwidth=2|set expandtab
autocmd FileType js set tabstop=2|set shiftwidth=2|set expandtab
autocmd FileType r set tabstop=2|set shiftwidth=2|set expandtab
autocmd FileType tex set tabstop=8|set shiftwidth=8|set noexpandtab
+autocmd FileType bruijn set tabstop=4|set shiftwidth=4|set noexpandtab
diff --git a/.xinitrc b/.xinitrc
index 355bbdc..cab8f10 100644
--- a/.xinitrc
+++ b/.xinitrc
@@ -31,3 +31,4 @@ xdotool search --onlyvisible --class Alacritty windowunmap %@
#obsidian &
dbus-run-session dwm
+#exec dbus-launch dwm