Update 2024-01-21 21:52 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id 2024-01-21 21:52:18 +01:00
parent a58cc32c50
commit c60e153c40
9 changed files with 73 additions and 392 deletions

View File

@ -10,10 +10,12 @@ PIMDIR="${HOME}/Documents"
# COLORS
#
COLOR_NB="#181818"
COLOR_NF="#707070"
COLOR_SB="#333333"
COLOR_SF="#CCCCCC"
BACKGROUND="#002020"
COLOR_NB="#002020"
COLOR_NF="#008080"
COLOR_SB="#004040"
COLOR_SF="#EEEEEE"
#
# TERMINALS

View File

@ -1,52 +0,0 @@
#!/bin/sh
[ -z "$1" ] && exit 0
cd /usr/ports/$1
FOUND=0
show() {
echo
echo "+--------------------------------------------------------------------"
printf "| Package: $PWD\n" | sed 's|/usr/ports/||g'
echo "+--------------------------------------------------------------------"
make show="COMMENT FULLPKGNAME HOMEPAGE SITES MAINTAINER DESCR" \
| tr -s " " \
| awk 'NR == 1 { print "| COMMENT: "$0 } \
NR == 2 { print "| DISTNAME: "$0 } \
NR == 3 { print "| HOMEPAGE: "$0 } \
NR == 4 { print "| SITES: "$0 } \
NR == 5 { print "| MAINTAINER: "$0 } \
NR == 5 { print "+--------------------------------------------------------------------\n" } \
NR == 6 { system("/bin/cat " $0); }'
}
showsub() {
count=0
find * \
-type d \
-maxdepth 0 \
| grep -vE distfiles\|pobj\|plist\|CVS\|.git \
| while read line
do
if [ -d $line/pkg ] \
&& [ -f $line/Makefile ]
then
(cd $line && show)
count=$(( count + 1 ))
fi
if [ $count -gt 10 ]
then
break
fi
done
}
if [ -d pkg ] \
&& [ -f Makefile ]
then
show
else
showsub
fi

View File

@ -1,5 +1,7 @@
#!/bin/sh
. ~/.bin/_config
# export MIXERDEVICE=/dev/audioctl0
# pgrep -q polybar || polybar &
@ -10,11 +12,13 @@ pgrep -q sxhkd || sxhkd -c $HOME/.config/bspwm/sxhkdrc &
# hsetroot -fill ~/Backgrounds/5JdtbnY.jpg
# pgrep -q picom || picom &
xsetroot -solid "$BACKGROUND"
# configure bspwm
bspc monitor -d 1 2 3 4 5 6 7 8 9 10
bspc config border_width 2
bspc config window_gap 12
bspc config window_gap 26
remove_disabled_monitors true
remove_unplugged_monitors true
@ -25,12 +29,12 @@ bspc config focus_follows_pointer true
bspc config borderless_monocle false
bspc config gapless_monocle true
bspc config focused_border_color "#FF6A00"
bspc config active_border_color "#444444"
bspc config normal_border_color "#222222"
bspc config ignore_ewmh_fullscreen true
bspc config focused_border_color "$COLOR_NF"
bspc config active_border_color "$COLOR_NF"
bspc config normal_border_color "$COLOR_NB"
bspc config ignore_ewmh_fullscreen true
bspc config presel_feedback_color "#442211"
bspc config presel_feedback_color "$COLOR_NF"
bspc config presel_feedback true
# automatic tiling

View File

@ -41,7 +41,7 @@ alt + shift + o
texec "vim -c ':History!'"
alt + o
texec "vim -c ':Files!'"
texec "vim -c ':MyFiles'"
#
# bspwm hotkeys
@ -114,8 +114,8 @@ alt + {_,shift + }{Left,Down,Up,Right}
bspc node -{f,s} {west,south,north,east}
# focus the node for the given path jump
alt + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
#alt + {p,b,comma,period}
# bspc node -f @{parent,brother,first,second}
# focus the next/previous node in the current desktop
#alt + {o,i}
@ -126,19 +126,22 @@ ctrl + {Prior,Next}
alt + {Prior,Next}
bspc desktop -f {prev,next}.local
alt + shift + {Prior,Next}
bspc node -d {prev,next}.local;
# focus the last node/desktop
alt + {grave,Tab}
bspc {node,desktop} -f last
alt + Tab
bspc desktop -f last
# focus the older or newer node in the focus history
alt + {_,shift + }c
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
# # focus the older or newer node in the focus history
# alt + {_,shift + }c
# bspc wm -h off; \
# bspc node {older,newer} -f; \
# bspc wm -h on
# focus or send to the given desktop
alt + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
# # focus or send to the given desktop
# alt + {_,shift + }{1-9,0}
# bspc {desktop -f,node -d} '^{1-9,10}'
ctrl + alt + shift + {1-9,0}
bspc desktop -f '^{1-9,10}'
@ -162,9 +165,9 @@ alt + ctrl + {1-9}
alt + ctrl + space
bspc node -p cancel
# cancel the preselection for the focused desktop
alt + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
## cancel the preselection for the focused desktop
#alt + ctrl + shift + space
# bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
# move/resize

View File

@ -22,17 +22,6 @@ scr() {
}
mktags() {
rm -f tags
fd --regex '\.[ch]$|\.$|\.hpp$|\.cpp$|\.cc$|\.hh$' \
| ectags -L - \
--links=no \
--tag-relative \
--exclude=.git \
--exclude=CVS \
-R \
-f tags
}
mktags1() {
rm -f tags
fd --one-file-system \
-E .git \

5
.kshrc
View File

@ -62,8 +62,9 @@ export LESS LESSHISTFILE
# PROMPT
########################################################################
C1="\[$(tput setaf 240)\]" # gray
C2="\[$(tput setaf 208)\]" # orange
C1="\[$(tput setaf 241)\]" # gray
#C2="\[$(tput setaf 208)\]" # orange
C2="\[$(tput setaf 37)\]" # green
C0="\[$(tput op)\]" # reset
x=$(print \\001) # hack from ksh(1)
PS1="$x\${C1}[\${C2}\h\${C1}](\${C2}\${?}\${C1})(\${C2}\W\${C1})\\$ \${C0}$x"

View File

@ -1,7 +1,7 @@
# Programcolors (fg/bg)
# INDEX
color indicator color208 default
color indicator color37 default
color status color242 default
color tree color242 default
color markers color242 default

View File

@ -104,7 +104,7 @@ set -g status-right-length 10
set -g status-left-length 10
#
setw -g window-status-current-style ''
setw -g window-status-current-format '#[fg=colour246]#I:#[fg=colour202]#W'
setw -g window-status-current-format '#[fg=colour246]#I:#[fg=colour37]#W'
#
setw -g window-status-style ''
setw -g window-status-format '#[fg=colour246]#I:#W'

View File

@ -12,19 +12,24 @@ set shm+=I
" don't complain about $( )
let g:is_posix=1
" colors
set t_Co=257
set background=dark
colorscheme lucius
set number
set cursorline
"set cursorline
set scrolloff=3
set spelllang=de,en
"
syntax on
filetype plugin on
set omnifunc=syntaxcomplete#Complete
" colors
set t_Co=257
set background=dark
colorscheme candle-grey-transparent
hi CursorLineNr ctermbg=NONE ctermfg=30 cterm=NONE
hi CursorLine ctermbg=NONE ctermfg=NONE cterm=NONE
" SEARCH
set hlsearch
set ignorecase
@ -46,18 +51,18 @@ set list
set listchars=tab:>_,trail:>
set fillchars=vert:\|,eob:\
" autocomplete
set wildmenu
set wildmode=longest:full,full
function! CleverTab()
if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
return "\<Tab>"
else
return "\<C-N>"
endif
endfunction
inoremap <tab> <C-R>=CleverTab()<CR>
" " autocomplete
" set wildmenu
" set wildmode=longest:full,full
"
" function! CleverTab()
" if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
" return "\<Tab>"
" else
" return "\<C-N>"
" endif
" endfunction
" inoremap <tab> <C-R>=CleverTab()<CR>
function! s:build_quickfix_list(lines)
call setqflist(map(copy(a:lines), '{ "filename": v:val, "lnum": 1 }'))
@ -65,7 +70,7 @@ function! s:build_quickfix_list(lines)
cc
endfunction
let g:fzf_layout = { 'down': '40%' }
let g:fzf_layout = { 'down': '60%' }
nnoremap <c-o> :Files<CR>
nnoremap <c-b> :Buffers<CR>
@ -76,11 +81,19 @@ let g:fzf_action = {
let g:fzf_vim = {}
let g:fzf_vim.tags_command = 'ksh -ic mktags'
command! MyFiles call fzf#run(fzf#wrap({
\ 'source': 'list-myfiles',
\ 'sink': 'edit',
\ 'options': ['--multi', '--pointer', '→', '--marker', '♡', '--preview', 'cat {}']
\ }))
let g:mapleader = ","
nnoremap <leader>f :Files<CR>
nnoremap <leader>o :Buffers<CR>
nnoremap <leader>b :Buffers<CR>
nnoremap <leader>l :Lines<CR>
nnoremap <leader>t :Tags<CR>
nnoremap <leader>m :MyFiles<CR>
nnoremap <leader>h :History<CR>
let g:tagbar_ctags_bin = "ectags"
noremap <leader>tt :TagbarToggle<CR>
@ -128,282 +141,3 @@ augroup mystuff
au BufWritePost vimrc so ~/.vim/vimrc
augroup end
" set autochdir
" set shm+=I
" set path+=.,**
" set mouse=v
" set laststatus=2
" set backspace=indent,eol,start
"
" set nonumber
" set cursorline
" set scrolloff=3
" set spelllang=de,en
"
" syntax off
" filetype on
"
" set spelllang=de,en
" let mapleader = ","
"
" " * and # are only highlighting
" " n searches in the direction of * or #
" " nnoremap * *``
" " nnoremap # #``
" " nnoremap n <S-n>
"
" " SMOOTH SCROLLING
" set t_TI=[4?h
" set t_TE=[4?l
"
" " INDENTATION
" set noautoindent
" set nosmartindent
" set nocindent
"
" " DIFF
" set formatoptions=crolj
"
" " SEARCH
" set hlsearch
" set ignorecase
" set smartcase
"
" " SPACES (TABS)
" set tabstop=8
" set shiftwidth=4
" let &softtabstop=&shiftwidth
"
" set expandtab
" set smarttab
"
" set textwidth=72
" " set colorcolumn=72
" set formatprg=par\ -w72q
"
" set list
" set listchars=tab:>_,trail:>
" set fillchars=vert:\|,eob:\
"
" set showcmd
" set clipboard=unnamedplus
"
" " C specific highlighting
" let c_space_errors=1
" let c_gnu=1
" let c_comment_strings=1
" let c_curly_error=1
" "set makeprg=cc\ -o\ %:r\ %
" set autowrite
"
" " TEMPORARY FILES
" set undofile
" set undodir=~/.local/vim/undo//
" set backup
" set backupcopy=yes
" set backupdir=~/.local/vim/backup//
" set directory=~/.local/vim/swapfiles//
" set updatetime=2000
" set updatecount=100
" silent execute '!mkdir -p ~/.local/vim/backup ~/.local/vim/undo ~/.local/vim/swapfiles'
"
" " TAB LINE
" set tabline=%!Tabline()
" function! Tabline() abort
" let l:line = ''
" for l:i in range(1, tabpagenr('$'))
" if l:i == tabpagenr()
" let l:line .= '%#TabLineSel#'
" else
" let l:line .= '%#TabLine#'
" endif
" let l:label = fnamemodify(
" \ bufname(tabpagebuflist(l:i)[tabpagewinnr(l:i) - 1]), ':t' )
" let l:line .= ' ' . l:label . ' '
" endfor
" let l:line .= '%#TabLineFill#'
" return l:line
" endfunction
"
" " CREATE DIRECTORIES
" silent execute 'cs add ~/.dev/cscope.out'
" set csprg=cscope\ -C
" set cst
" set cspc=9
"
" " LOOK N FEEL
" set t_ut=
" let g:is_posix=1
"
" set background=dark
" colorscheme lucius
"
"
"
" " " MY THEME
" " hi ColorColumn ctermbg=234 ctermfg=249 cterm=NONE
" " hi CursorLine ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi CursorLineNr ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi LineNr ctermbg=NONE ctermfg=240 cterm=NONE
" " hi Comment ctermbg=NONE ctermfg=240 cterm=NONE
" " hi Constant ctermbg=NONE ctermfg=251 cterm=italic
" " hi Directory ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi Error ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi ErrorMsg ctermbg=NONE ctermfg=196 cterm=NONE
" " hi Folded ctermbg=NONE ctermfg=246 cterm=inverse
" " hi Identifier ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi Identifier ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi Ignore ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi IncSearch ctermbg=NONE ctermfg=251 cterm=inverse
" " hi MatchParen ctermbg=NONE ctermfg=202 cterm=bold
" " hi NonText ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi Normal ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi Pmenu ctermbg=NONE ctermfg=251 cterm=inverse
" " hi PmenuSel ctermbg=NONE ctermfg=251 cterm=bold
" " hi PreProc ctermbg=NONE ctermfg=251 cterm=NONE
" " hi Search ctermbg=NONE ctermfg=251 cterm=inverse
" " hi SignColumn ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi Special ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi SpecialComment ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi SpecialKey ctermbg=NONE ctermfg=239 cterm=NONE
" " hi Statement ctermbg=NONE ctermfg=251 cterm=NONE
" " hi Statement ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi String ctermbg=NONE ctermfg=251 cterm=NONE
" " hi TODO ctermbg=NONE ctermfg=246 cterm=italic
" " hi TabLine ctermbg=NONE ctermfg=240 cterm=NONE
" " hi TabLineFill ctermbg=NONE ctermfg=240 cterm=NONE
" " hi TabLineSel ctermbg=NONE ctermfg=249 cterm=NONE
" " hi Title ctermbg=NONE ctermfg=246 cterm=bold
" " hi Type ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi Underlined ctermbg=NONE ctermfg=251 cterm=underline
" " hi VisualNOS ctermbg=NONE ctermfg=246 cterm=NONE
" " hi WarningMsg ctermbg=NONE ctermfg=NONE cterm=NONE
" " hi Wildmenu ctermbg=NONE ctermfg=NONE cterm=NONE
"
" " VIMDIFF COLORS
" hi DiffAdd ctermbg=22 ctermfg=NONE cterm=NONE
" hi DiffDelete ctermbg=234 ctermfg=NONE cterm=NONE
" hi DiffChange ctermbg=234 ctermfg=NONE cterm=NONE
" hi DiffText ctermbg=NONE ctermfg=NONE cterm=NONE
"
" " SPLIT AND FOLD COLORS
" hi VertSplit ctermbg=NONE ctermfg=246 cterm=NONE
" hi FoldColumn ctermbg=NONE ctermfg=251 cterm=NONE
" hi Folded ctermbg=233 ctermfg=251 cterm=NONE
"
" " SPELL COLOR
" hi SpellBad ctermbg=52 ctermfg=NONE
" hi SpellCap ctermbg=22 ctermfg=NONE cterm=NONE
" hi SpellRare ctermbg=130 ctermfg=NONE
"
" " C+PgUp/PgDown
" nnoremap gn :next<CR>
" nnoremap gp :prev<CR>
"
" " NAVIGATE ON VISUAL LINES (SOFT WRAP)
" imap <silent> <Down> <C-o> gj
" imap <silent> <Up> <C-o> gk
" nmap <silent> <Down> gj
" nmap <silent> <Up> gk
"
" " USE ARROW / VIM KEYS INSIDE OMNIBOX
" inoremap <expr> j pumvisible() ? '<C-n>' : 'j'
" inoremap <expr> k pumvisible() ? '<C-p>' : 'k'
" inoremap <expr> <Down> pumvisible() ? '<C-n>' : '<Down>'
" inoremap <expr> <Up> pumvisible() ? '<C-p>' : '<Up>'
"
" " NETRW
" let g:netrw_banner = 0
" let g:netrw_browse_split = 3
" let g:netrw_liststyle = 3
" let g:netrw_ctags = "ectags"
" let g:netrw_silent = 1
" let g:netrw_sftp_cmd = "sftp -q"
" let g:netrw_scp_cmd = "scp -q"
"
" " " STATUSLINE, AIRLINE/POWERLINE IS FOR NOOBS
" " set statusline=%#VisualNOS#
" " set statusline+=%F\ %{&filetype}
" " set statusline+=%=
" " set statusline+=%m%r%h%w%q
" " set statusline+=\ %{&fileformat}/%{&fileencoding?&fileencoding:&encoding}
" " set statusline+=\ dec:%b\ hex:%B
" " " set statusline+=\ count:%{(mode()=='V')?wordcount().visual_words:wordcount().words}w
" " " set statusline+=/%{(mode()=='V')?wordcount().visual_chars:wordcount().chars}c
" " set statusline+=\ line:%l\ col:%c
" " set statusline+=\ %p%%
" " set statusline+=\
" "
" " " ITALIC FIX
" " set t_ZH=
" " set t_ZR=
"
"
" " OPEN FILE
" " nnoremap <C-t> :Texplore<CR>
" nnoremap <C-t> :Files<CR>
" inoremap <C-t> <ESC>:Files<CR>
"
" " TAGS FILE
" set tags="~/.dev/tags"
" nnoremap gt :cs find 1 <C-R>=expand("<cword>")<CR><CR>
" nnoremap gs :cs find 4 <C-R>=expand("<cword>")<CR><CR>
" nnoremap gb <c-o>
" nnoremap gh :FSHere<CR>
"
" nnoremap oo :browse oldfiles<CR>
" nnoremap XX :qall!<CR>
"
" " PLUGIN: TAGBAR
" nmap <F12> :TagbarToggle<CR>
" let g:tagbar_ctags_bin = "ectags"
"
" " PLUGIN: EASY ALIGN
" xmap ga <Plug>(EasyAlign)
" nmap ga <Plug>(EasyAlign)
"
" " Compile Stuff
" nnoremap mm :call MyMake()<CR>
" nnoremap mr :!clear && %:p:r<CR>
" function MyMake()
" :silent !clear
" if filereadable("Makefile")
" :w! | !make
" else
" :w! | !cc -Wall -g -O0 -o %:p:r -lsndio %:p
" endif
" endfunction
"
" " CUSTOM: NO CLUTTER PASTE MODE
" nnoremap <silent> <Tab> :call TogglePaste()<CR>
" let g:paste=0
" function! TogglePaste()
" if (g:paste == 0)
" :set paste nolist nonumber |
" \ echo "-- PASTE --"
" let g:paste=1
" else
" :set nopaste list number |
" \ echo "-- NOPASTE --"
" let g:paste=0
" endif
" endfunction
"
" " CUSTOM: COPY ACROSS VIM INSTANCES
" vnoremap vy :call VisualYank()<CR>
" nnoremap vp :call VisualPaste()<CR>
" let s:temp_file_path = $HOME . '/.cache/vim-snap'
" function! VisualYank()
" call writefile(getline(getpos("'<")[1],
" \ getpos("'>")[1]), s:temp_file_path)
" endfunction
" function! VisualPaste()
" let file_msg = readfile(s:temp_file_path)
" call append(line("."), file_msg)
" endfunction
"
" " CUSTOM: HTMLENCODE WITHOUT PRE
" function! BlogEncode()
" :%s/>/\&gt;/g | %s/</\&lt;/g | %s/&lt;pre&gt;/<pre>/g | %s/&lt;\/pre&gt;/<\/pre>/g
" endfunction