Browse Source

debugo

main
Cian Butler 1 year ago
parent
commit
7933f575f5
Signed by: butlerx GPG Key ID: B37CA765BAA89170
14 changed files with 404 additions and 47 deletions
  1. +11
    -10
      Xresources
  2. +39
    -3
      eslintrc.js
  3. +6
    -0
      gitconfig
  4. +6
    -8
      i3/config
  5. +1
    -1
      polybar/config
  6. +1
    -1
      powerlevel9k
  7. +25
    -0
      sshconfig
  8. +48
    -0
      vimrc.d/ftplugin/apache.vim
  9. +14
    -16
      vimrc.d/plug.vim
  10. +2
    -1
      vimrc.d/plugin/ale.vim
  11. +244
    -0
      zsh-completions/git-completion.zsh
  12. +0
    -4
      zsh.d/aliases.zsh
  13. +1
    -1
      zsh.d/exports.zsh
  14. +6
    -2
      zshrc

+ 11
- 10
Xresources View File

@@ -196,17 +196,18 @@ URxvt*color15 : #EEEEEC
*.depth : 32

! ROFI setup
rofi.font : Hack 20
rofi.kb-row-up : Up,Control+p,Shift+Tab,Shift+Alt+Tab
rofi.kb-row-tab : Tab,Alt+Tab
rofi.padding : 25
rofi.width : 50
rofi.bw : 1
rofi.opacity : 90
rofi.fullscreen : false
rofi.color-active : xbackground, xcolor1, xbackground, xbackground, xcolor0
rofi.color-enabled : true
rofi.separator-style : dashed
rofi.color-window : xbackground, xcolor3, xcolor2
rofi.color-normal : xbackground, xforeground, xbackground, xbackground, xcolor5
rofi.color-active : xbackground, xcolor1, xbackground, xbackground, xcolor0
rofi.color-urgent : xbackground, xcolor4, xbackground, xbackground, xcolor0
rofi.color-window : xbackground, xcolor3, xcolor2
rofi.font : Hack 20
rofi.fullscreen : false
rofi.kb-row-tab : Tab,Alt+Tab
rofi.kb-row-up : Up,Control+p,Shift+Tab,Shift+Alt+Tab
rofi.opacity : 90
rofi.padding : 25
rofi.separator-style : dashed
rofi.terminal : kitty
rofi.width : 50

+ 39
- 3
eslintrc.js View File

@@ -6,12 +6,48 @@ module.exports = {
},
parser: 'typescript-eslint-parser',
root: true,
extends: ['airbnb'],
extends: [
'airbnb',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/react',
'prettier/@typescript-eslint',
],
plugins: ['@typescript-eslint', 'prettier'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
extensions: ['.ts', '.tsx'],
},
node: {
extensions: ['.js'],
},
},
},
rules: {
'linebreak-style': ['error', 'unix'],
'arrow-parens': ['error', 'as-needed'],
'no-param-reassign': ['error', { props: false }],
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'import/extensions': [
'error',
'always',
{
js: 'ignorePackages',
ts: 'ignorePackages',
tsx: 'ignorePackages',
},
],
'import/prefer-default-export': 0,
'linebreak-style': ['error', 'unix'],
'no-param-reassign': ['error', { props: false }],
'no-use-before-define': ['error', { functions: false }],
'react/jsx-filename-extension': [
2,
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
],
'react/prop-types': 0,
},
};

+ 6
- 0
gitconfig View File

@@ -57,6 +57,7 @@
pr-clean = "!git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
# for bitbucket/stash remotes
spr = "!f() { git fetch -fu ${2:-$(git remote |grep ^upstream || echo origin)} refs/pull-requests/$1/from:pr/$1 && git checkout pr/$1; }; f"
ignore = "!gi() { curl -sL https://www.gitignore.io/api/$@ ;}; gi"

[core]
autocrlf = input
@@ -66,7 +67,12 @@
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[commit]
gpgsign = true
[gpg]
program = gpg2

# This next lines include Netlify's Git Credential Helper configuration in your Git configuration.
[include]
path = /home/butlerx/.netlify/helper/git-config

+ 6
- 8
i3/config View File

@@ -127,8 +127,6 @@ client.focused #007fbf #007fbf #ffffff
client.unfocused #666666 #666666 #ffffff
client.urgent #aa0000 #990000 #ffffff

# Set background
exec --no-startup-id nitrogen
# Set Custom keyboard mapping
exec --no-startup-id xbindkeys
# Use Gestures
@@ -150,11 +148,11 @@ smart_gaps on
bindsym $mod+Shift+U exec nautilus --browser

# rofi
bindsym $alt+Tab exec rofi -show window
bindsym $mod+o exec rofi -show ssh
bindsym $mod+i exec rofi -show ssh -ssh-client mosh
bindsym $mod+d exec zsh -c "rofi -show run"
bindsym $mod+p exec rofi-pass
bindsym $alt+Tab exec --no-startup-id rofi -show window
bindsym $mod+o exec --no-startup-id rofi -show ssh
bindsym $mod+i exec --no-startup-id rofi -show ssh -ssh-client mosh
bindsym $mod+d exec --no-startup-id zsh -c "rofi -show run"
bindsym $mod+p exec --no-startup-id rofi-pass

# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 5%+ unmute #increase sound volume
@@ -173,5 +171,5 @@ bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous

bindsym XF86Tools exec sh ~/.i3/i3lock.sh
bindsym XF86Display exec sh ~/bin/screens
bindsym XF86Display exec autorandr
exec xcompmgr -c -f -n

+ 1
- 1
polybar/config View File

@@ -26,7 +26,7 @@ monitor = ${env:MONITOR:1080p}
width = 100%
height = 26

tray-position = ${env:TRAY_POSITION:right}
tray-position = right
tray-background = #00ffffff
tray-padding = 1



+ 1
- 1
powerlevel9k

@@ -1 +1 @@
Subproject commit add0875137fc45a065064f8be124db2a37e45876
Subproject commit b577175c53338e491a5897820cb506842916fe35

+ 25
- 0
sshconfig View File

@@ -38,6 +38,31 @@ Host azazel
HostName 136.206.15.50
user butlerx

Host icarus
Hostname icarus.internal
ProxyJump azazel
user root

Host daedalus
Hostname daedalus.internal
ProxyJump azazel
user root

Host hardcase
Hostname hardcase.internal
ProxyJump azazel
user root

Host butlerxvm
Hostname butlerxvm.internal
ProxyJump azazel
user root

Host m1cr0man
Hostname m1cr0man.internal
ProxyJump azazel
user root

Host notthe.cloud
HostName notthe.cloud
user butlerx


+ 48
- 0
vimrc.d/ftplugin/apache.vim View File

@@ -0,0 +1,48 @@
" Language: apache
" Maintainer: Satya P <vim@thesatya.com>
" Last Change: Sat, 27 Jan 2007 11:24:59 EST
" Notes: 0) Copied from Johannes Zellner <johannes@zellner.org>'s xml
" indent script

" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1

" [-- local settings (must come before aborting the script) --]
setlocal indentexpr=ApacheIndentGet(v:lnum,1)
setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,}

set cpo-=C

" [-- finish, if the function already exists --]
if exists('*ApacheIndentGet') | finish | endif

fun! ApacheIndentGet(lnum, use_syntax_check)
" Find a non-empty line above the current line.
let lnum = prevnonblank(a:lnum - 1)

" Hit the start of the file, use zero indent.
if lnum == 0
return 0
endif

let prevline=getline(lnum)
let line=getline(a:lnum)
let ind=indent(lnum)
let inddelta=0
if match(line, '^\s*</') == 0
"if this is a closing tag line, reduce its indentation
let inddelta = 0 - &sw
elseif match(prevline,'^\s*<\a') == 0
"if previous line is a opening tag line, increase its indentation
let inddelta = &sw
endif

let ind = ind + inddelta

return ind
endfun

" vim:ts=8

+ 14
- 16
vimrc.d/plug.vim View File

@@ -3,22 +3,20 @@ Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.s
Plug 'cespare/vim-toml', { 'for': 'toml' }
Plug 'chrisbra/csv.vim', { 'for': 'csv' }
Plug 'christoomey/vim-tmux-navigator'
Plug 'dense-analysis/ale'
Plug 'editorconfig/editorconfig-vim'
Plug 'ekalinin/Dockerfile.vim', { 'for': ['Dockerfile', 'docker-compose'] }
Plug 'elzr/vim-json',
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries', 'for': ['go', 'gohtmltmpl'] }
Plug 'google/vim-jsonnet',
Plug 'godlygeek/tabular' | Plug 'plasticboy/vim-markdown'
Plug 'gregsexton/gitv'
Plug 'isobit/vim-caddyfile'
Plug 'isobit/vim-caddyfile', { 'for': 'caddyfile' }
Plug 'leafgarland/typescript-vim', { 'for': ['typescript.tsx', 'typescriptreact', 'typescript', 'vue'] }
Plug 'mhinz/vim-signify'
Plug 'mhinz/vim-startify'
Plug 'moll/vim-node'
Plug 'mustache/vim-mustache-handlebars'
Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
Plug 'posva/vim-vue'
if !has('nvim')
Plug 'roxma/vim-hug-neovim-rpc'
endif
Plug 'ncm2/ncm2' |
Plug 'ncm2/ncm2-tern', {'do': 'npm install'} |
Plug 'filipekiss/ncm2-look.vim'|
@@ -39,22 +37,22 @@ Plug 'ncm2/ncm2' |
Plug 'roxma/nvim-yarp' |
Plug 'wellle/tmux-complete.vim'|
Plug 'yuki-ycino/ncm2-dictionary'|
Plug 'pangloss/vim-javascript', { 'for': ['typescript.tsx', 'typescriptreact', 'javascript', 'vue'] }
Plug 'peitalin/vim-jsx-typescript', { 'for': ['typescript.tsx', 'typescriptreact'] }
Plug 'posva/vim-vue', { 'for': 'vue' }
Plug 'racer-rust/vim-racer', { 'for': 'rust' }
if !has('nvim')
Plug 'roxma/vim-hug-neovim-rpc'
endif
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
Plug 'ryanoasis/vim-devicons'
Plug 'rust-lang/rust.vim'
Plug 'racer-rust/vim-racer'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'sheerun/vim-polyglot'
Plug 'sickill/vim-monokai'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'udalov/kotlin-vim'
Plug 'skanehira/preview-markdown.vim', { 'for': 'markdown' }
Plug 'udalov/kotlin-vim', { 'for': 'kotlin' }
Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes'
Plug 'vimwiki/vimwiki'
Plug 'w0rp/ale'
Plug 'c9s/helper.vim'
Plug 'c9s/treemenu.vim'
Plug 'c9s/vikube.vim'
Plug 'leafgarland/typescript-vim'
Plug 'peitalin/vim-jsx-typescript'
" vim: set syntax=vim:

+ 2
- 1
vimrc.d/plugin/ale.vim View File

@@ -1,6 +1,7 @@
let g:ale_fixers = {
\ 'javascript': ['prettier', 'eslint'],
\ 'typescript': ['prettier', 'tslint'],
\ 'typescript': ['prettier', 'tslint', 'eslint'],
\ 'typescriptreact': ['prettier', 'tslint', 'eslint'],
\ 'html': ['eslint'],
\ 'json': ['prettier', 'fixjson', 'jq'],
\ 'scss': ['prettier', 'stylelint'],


+ 244
- 0
zsh-completions/git-completion.zsh View File

@@ -0,0 +1,244 @@
#compdef git gitk

# zsh completion wrapper for git
#
# Copyright (c) 2012-2013 Felipe Contreras <felipe.contreras@gmail.com>
#
# You need git's bash completion script installed somewhere, by default it
# would be the location bash-completion uses.
#
# If your script is somewhere else, you can configure it on your ~/.zshrc:
#
# zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
#
# The recommended way to install this script is to make a copy of it in
# ~/.zsh/ directory as ~/.zsh/git-completion.zsh and then add the following
# to your ~/.zshrc file:
#
# fpath=(~/.zsh $fpath)

complete ()
{
# do nothing
return 0
}

zstyle -T ':completion:*:*:git:*' tag-order && \
zstyle ':completion:*:*:git:*' tag-order 'common-commands'

zstyle -s ":completion:*:*:git:*" script script
if [ -z "$script" ]; then
local -a locations
local e
locations=(
$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash
'/etc/bash_completion.d/git' # fedora, old debian
'/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian
'/usr/share/bash-completion/git' # gentoo
)
for e in $locations; do
test -f $e && script="$e" && break
done
fi
GIT_SOURCING_ZSH_COMPLETION=y . "$script"

__gitcomp ()
{
emulate -L zsh

local cur_="${3-$cur}"

case "$cur_" in
--*=)
;;
*)
local c IFS=$' \t\n'
local -a array
for c in ${=1}; do
c="$c${4-}"
case $c in
--*=*|*.) ;;
*) c="$c " ;;
esac
array+=("$c")
done
compset -P '*[=:]'
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
;;
esac
}

__gitcomp_direct ()
{
emulate -L zsh

local IFS=$'\n'
compset -P '*[=:]'
compadd -Q -- ${=1} && _ret=0
}

__gitcomp_nl ()
{
emulate -L zsh

local IFS=$'\n'
compset -P '*[=:]'
compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
}

__gitcomp_nl_append ()
{
emulate -L zsh

local IFS=$'\n'
compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
}

__gitcomp_file_direct ()
{
emulate -L zsh

local IFS=$'\n'
compset -P '*[=:]'
compadd -f -- ${=1} && _ret=0
}

__gitcomp_file ()
{
emulate -L zsh

local IFS=$'\n'
compset -P '*[=:]'
compadd -p "${2-}" -f -- ${=1} && _ret=0
}

__git_zsh_bash_func ()
{
emulate -L ksh

local command=$1

local completion_func="_git_${command//-/_}"
declare -f $completion_func >/dev/null && $completion_func && return

local expansion=$(__git_aliased_command "$command")
if [ -n "$expansion" ]; then
words[1]=$expansion
completion_func="_git_${expansion//-/_}"
declare -f $completion_func >/dev/null && $completion_func
fi
}

__git_zsh_cmd_common ()
{
local -a list
list=(
add:'add file contents to the index'
bisect:'find by binary search the change that introduced a bug'
branch:'list, create, or delete branches'
checkout:'checkout a branch or paths to the working tree'
clone:'clone a repository into a new directory'
commit:'record changes to the repository'
diff:'show changes between commits, commit and working tree, etc'
fetch:'download objects and refs from another repository'
grep:'print lines matching a pattern'
init:'create an empty Git repository or reinitialize an existing one'
log:'show commit logs'
merge:'join two or more development histories together'
mv:'move or rename a file, a directory, or a symlink'
pull:'fetch from and merge with another repository or a local branch'
push:'update remote refs along with associated objects'
rebase:'forward-port local commits to the updated upstream head'
reset:'reset current HEAD to the specified state'
rm:'remove files from the working tree and from the index'
show:'show various types of objects'
status:'show the working tree status'
tag:'create, list, delete or verify a tag object signed with GPG')
_describe -t common-commands 'common commands' list && _ret=0
}

__git_zsh_cmd_alias ()
{
local -a list
list=(${${${(0)"$(git config -z --get-regexp '^alias\.')"}#alias.}%$'\n'*})
_describe -t alias-commands 'aliases' list $* && _ret=0
}

__git_zsh_cmd_all ()
{
local -a list
emulate ksh -c __git_compute_all_commands
list=( ${=__git_all_commands} )
_describe -t all-commands 'all commands' list && _ret=0
}

__git_zsh_main ()
{
local curcontext="$curcontext" state state_descr line
typeset -A opt_args
local -a orig_words

orig_words=( ${words[@]} )

_arguments -C \
'(-p --paginate --no-pager)'{-p,--paginate}'[pipe all output into ''less'']' \
'(-p --paginate)--no-pager[do not pipe git output into a pager]' \
'--git-dir=-[set the path to the repository]: :_directories' \
'--bare[treat the repository as a bare repository]' \
'(- :)--version[prints the git suite version]' \
'--exec-path=-[path to where your core git programs are installed]:: :_directories' \
'--html-path[print the path where git''s HTML documentation is installed]' \
'--info-path[print the path where the Info files are installed]' \
'--man-path[print the manpath (see `man(1)`) for the man pages]' \
'--work-tree=-[set the path to the working tree]: :_directories' \
'--namespace=-[set the git namespace]' \
'--no-replace-objects[do not use replacement refs to replace git objects]' \
'(- :)--help[prints the synopsis and a list of the most commonly used commands]: :->arg' \
'(-): :->command' \
'(-)*:: :->arg' && return

case $state in
(command)
_alternative \
'alias-commands:alias:__git_zsh_cmd_alias' \
'common-commands:common:__git_zsh_cmd_common' \
'all-commands:all:__git_zsh_cmd_all' && _ret=0
;;
(arg)
local command="${words[1]}" __git_dir

if (( $+opt_args[--bare] )); then
__git_dir='.'
else
__git_dir=${opt_args[--git-dir]}
fi

(( $+opt_args[--help] )) && command='help'

words=( ${orig_words[@]} )

__git_zsh_bash_func $command
;;
esac
}

_git ()
{
local _ret=1
local cur cword prev

cur=${words[CURRENT]}
prev=${words[CURRENT-1]}
let cword=CURRENT-1

if (( $+functions[__${service}_zsh_main] )); then
__${service}_zsh_main
else
emulate ksh -c __${service}_main
fi

let _ret && _default && _ret=0
return _ret
}

_git

+ 0
- 4
zsh.d/aliases.zsh View File

@@ -117,10 +117,6 @@ alias gta='git tag -a -m'
alias gf='git reflog'
alias gv='git log --pretty=format:'%s' | cut -d " " -f 1 | sort | uniq -c | sort -nr'

# leverage aliases from ~/.gitconfig
alias gh='git hist'
alias gt='git today'

# curiosities
# gsh shows the number of commits for the current repos for all developers
alias gsh="git shortlog | grep -E '^[ ]+\\w+' | wc -l"


+ 1
- 1
zsh.d/exports.zsh View File

@@ -44,7 +44,7 @@ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk/jre
export PYTHON_USER="$HOME"/.local/bin
#export JAVA_HOME="$(jrunscript -e 'java.lang.System.out.println(java.lang.System.getProperty("java.home"));')"
export KREW_BIN="${KREW_ROOT:-$HOME/.krew}"/bin
export PATH="$PATH:~/bin:/usr/local/bin:$GOPATH/bin:$HOME/.cargo/bin:$KREW_BIN:$HOME/.node_modules/bin:$(ruby -e 'print Gem.user_dir'):$PYTHON_USER"
export PATH=$PATH:~/bin:/usr/local/bin:$GOPATH/bin:$HOME/.cargo/bin:$KREW_BIN:$HOME/.deno/bin:$HOME/.node_modules/bin:$(ruby -e 'print Gem.user_dir'):$PYTHON_USER
export npm_config_prefix=~/.node_modules

export BAT_THEME="Monokai Extended"


+ 6
- 2
zshrc View File

@@ -3,6 +3,10 @@ for file in ${HOME}/.dotfiles/zsh.d/*.zsh; do
# shellcheck source=~/.dotfiles/zsh/*.zsh
source "$file"
done
fpath=(/usr/local/share/zsh-completions $fpath)
fpath=(~/.dotfiles/zsh-completions $fpath)
source "$HOME/.zprofile"
export XDG_RUNTIME_DIR=/run/user/$(id -u)

export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

# The next line updates PATH for Netlify's Git Credential Helper.
if [ -f '/home/butlerx/.netlify/helper/path.zsh.inc' ]; then source '/home/butlerx/.netlify/helper/path.zsh.inc'; fi

Loading…
Cancel
Save