Compare commits
4 commits
9933fdd1ff
...
581995fd68
Author | SHA1 | Date | |
---|---|---|---|
581995fd68 | |||
f7d89ec656 | |||
0c51473d17 | |||
23d964d42f |
3 changed files with 140 additions and 7 deletions
|
@ -18,13 +18,17 @@ allow_remote_control socket-only
|
|||
listen_on unix:///tmp/kitty.sock
|
||||
env KITTY_TERM=TRUE
|
||||
shell_integration enabled
|
||||
dynamic_background_opacity yes
|
||||
background_opacity 1.0
|
||||
|
||||
# urls
|
||||
url_color #4d87bd
|
||||
url_style curly
|
||||
url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh
|
||||
detect_urls yes
|
||||
show_hyperlink_targets yes
|
||||
underline_hyperlinks always
|
||||
map ctrl+shift+e open_url_with_hints
|
||||
|
||||
map alt+e next_tab
|
||||
map alt+q previous_tab
|
||||
|
@ -40,3 +44,13 @@ map ctrl+shift+k scroll_page_up
|
|||
map ctrl+shift+j scroll_page_down
|
||||
touch_scroll_multiplier 2.5
|
||||
wheel_scroll_multiplier 5.0
|
||||
|
||||
# bg
|
||||
map ctrl+shift+a>m set_background_opacity +0.1
|
||||
map ctrl+shift+a>l set_background_opacity -0.1
|
||||
map ctrl+shift+a>1 set_background_opacity 1
|
||||
map ctrl+shift+a>0 set_background_opacity 0.8
|
||||
|
||||
# more terminals in my terminal
|
||||
enabled_layouts tall:bias=50;full_size=1;mirrored=false
|
||||
#map ctrl+shift+enter make me a new fucking window
|
||||
|
|
110
.zsh/zfunc/_flamegraph
Normal file
110
.zsh/zfunc/_flamegraph
Normal file
|
@ -0,0 +1,110 @@
|
|||
_flamegraph() {
|
||||
local i cur prev opts cmd
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
cmd=""
|
||||
opts=""
|
||||
|
||||
for i in ${COMP_WORDS[@]}
|
||||
do
|
||||
case "${cmd},${i}" in
|
||||
",$1")
|
||||
cmd="flamegraph"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "${cmd}" in
|
||||
flamegraph)
|
||||
opts="-p -v -o -F -c -i -h -V --pid --completions --verbose --output --open --root --freq --cmd --deterministic --inverted --reverse --notes --min-width --image-width --palette --skip-after --flamechart --ignore-status --no-inline --post-process --perfdata --help --version [TRAILING_ARGUMENTS]..."
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
case "${prev}" in
|
||||
--pid)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-p)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--completions)
|
||||
COMPREPLY=($(compgen -W "bash elvish fish powershell zsh" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--output)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-o)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--root)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--freq)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-F)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--cmd)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
-c)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--notes)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--min-width)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--image-width)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--palette)
|
||||
COMPREPLY=($(compgen -W "aqua blue green hot io java js mem orange perl python purple red rust wakeup yellow" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--skip-after)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--post-process)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--perfdata)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
|
||||
complete -F _flamegraph -o nosort -o bashdefault -o default flamegraph
|
||||
else
|
||||
complete -F _flamegraph -o bashdefault -o default flamegraph
|
||||
fi
|
23
.zshrc
23
.zshrc
|
@ -46,10 +46,19 @@ alias fsize="stat --printf='%s'"
|
|||
alias rg="rg --no-ignore"
|
||||
alias home="cd $HOME"
|
||||
alias ff=firefox
|
||||
alias bell="tput bel"
|
||||
alias fd=fdfind
|
||||
alias nobak="touch .nobackup"
|
||||
# alias shutdown="confirm shutdown"
|
||||
|
||||
### Functions
|
||||
function random() {
|
||||
if [ $# -ne 1 ] || ! [[ $1 =~ ^[0-9]+$ ]] || [ $1 -lt 1 ]; then
|
||||
echo "Error: Please provide one positive integer argument" >&2
|
||||
return 1
|
||||
fi
|
||||
echo $(( (RANDOM % $1) + 1 ))
|
||||
}
|
||||
function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" }
|
||||
function midfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(M|G|T|P|E)\s" }
|
||||
function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" }
|
||||
|
@ -270,13 +279,6 @@ else
|
|||
eval "$(zoxide init zsh)"
|
||||
fi
|
||||
|
||||
### load unversioned zsh code
|
||||
if [ -f ~/.zsh.local ]; then
|
||||
source ~/.zsh.local
|
||||
else
|
||||
touch ~/.zsh.local
|
||||
fi
|
||||
|
||||
### --- pyenv Config -------------------------------------
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
@ -301,3 +303,10 @@ function load_nvm() {
|
|||
}
|
||||
alias nvim="load_nvm && nvim"
|
||||
# zprof
|
||||
|
||||
### load unversioned zsh code
|
||||
if [ -f ~/.zsh.local ]; then
|
||||
source ~/.zsh.local
|
||||
else
|
||||
touch ~/.zsh.local
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue