many updates
This commit is contained in:
parent
d938676e9f
commit
c1ead62c03
@ -27,11 +27,30 @@ shopt -s checkwinsize
|
||||
# colored GCC warnings and errors
|
||||
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
alias lsa='ls -lah'
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
# use lf to switch directories and bind it to ctrl-o
|
||||
function lfcd() {
|
||||
tmp="$(mktemp -uq)"
|
||||
trap 'rm -f $tmp >/dev/null 2>&1' HUP INT QUIT TERM PWR EXIT
|
||||
lf -last-dir-path="$tmp" "$@"
|
||||
if [ -f "$tmp" ]; then
|
||||
dir="$(cat "$tmp")"
|
||||
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
||||
fi
|
||||
}
|
||||
|
||||
function pomo() {
|
||||
arg1=$1
|
||||
shift
|
||||
args="$*"
|
||||
|
||||
min=${arg1:?Example: pomo 25 Take a break}
|
||||
sec=$((min * 60))
|
||||
msg="${args:?Example: pomo 25 Take a break}"
|
||||
|
||||
while true; do
|
||||
date '+%H:%M' && sleep "${sec:?}" && notify-send -u critical -t 0 -a pomo "${msg:?}"
|
||||
done
|
||||
}
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
|
||||
@ -179,10 +179,10 @@ map gcs cd ~/.config/shell
|
||||
map gcz cd ~/.config/zsh
|
||||
map gcx1 cd ~/.config/x11
|
||||
map gw cd ~/work
|
||||
map gNN cd ~/notes/zk/
|
||||
map gNi cd ~/notes/zk/inbox/
|
||||
map gNN cd ~/notes/
|
||||
map gNw cd ~/notes/zk/work/
|
||||
map gNn cd ~/notes/zk/notes/
|
||||
map gNz cd ~/notes/zk/zettel/
|
||||
map gNZ cd ~/notes/zk/zet/
|
||||
map gNj cd ~/notes/zk/journal/
|
||||
|
||||
map A rename # at the very end
|
||||
|
||||
@ -131,13 +131,16 @@ return {
|
||||
end,
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.pairs",
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
disable_filetype = { "TelescopePrompt", "spectre_panel" },
|
||||
ignored_next_char = "[%w%.*]", -- don't place autopairs when cursor sits infront of any character.
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("mini.pairs").setup(opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"preservim/vim-markdown",
|
||||
},
|
||||
|
||||
@ -28,6 +28,11 @@ alias \
|
||||
ccat="highlight --out-format=ansi" \
|
||||
ip="ip -color=auto"
|
||||
|
||||
alias \
|
||||
l="ls" \
|
||||
ll="ls -l" \
|
||||
lsa="ls -la"
|
||||
|
||||
# These common commands are just too long! Abbreviate them.
|
||||
alias \
|
||||
ka="killall" \
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
$include /etc/inputrc
|
||||
|
||||
Control-o: lfcd
|
||||
Control-t: tms
|
||||
Control-n: zk edit --interactive --sort modified-
|
||||
|
||||
set editing-mode vi
|
||||
$if mode=vi
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ bindkey -M menuselect 'l' vi-forward-char
|
||||
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||
bindkey -v '^?' backward-delete-char
|
||||
|
||||
# use lf to switch directories and bind it to ctrl-l
|
||||
# use lf to switch directories and bind it to ctrl-o
|
||||
lfcd() {
|
||||
tmp="$(mktemp -uq)"
|
||||
trap 'rm -f $tmp >/dev/null 2>&1' HUP INT QUIT TERM PWR EXIT
|
||||
@ -96,18 +96,19 @@ bindkey -s '^t' '^utms\n'
|
||||
# zk related things
|
||||
bindkey -s '^n' '^uzk edit --interactive --sort modified-\n'
|
||||
|
||||
function pomo() {
|
||||
arg1=$1
|
||||
shift
|
||||
args="$*"
|
||||
|
||||
if [ -f /etc/hostname ]; then
|
||||
HOST=$(cat /etc/hostname)
|
||||
else
|
||||
HOST=$(hostname)
|
||||
fi
|
||||
min=${arg1:?Example: pomo 25 Take a break}
|
||||
sec=$((min * 60))
|
||||
msg="${args:?Example: pomo 25 Take a break}"
|
||||
|
||||
if [ "$HOST" = "holocene" ] ; then
|
||||
source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh
|
||||
else
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
fi
|
||||
while true; do
|
||||
date '+%H:%M' && sleep "${sec:?}" && notify-send -u critical -t 0 -a pomo "${msg:?}"
|
||||
done
|
||||
}
|
||||
|
||||
# Dracula Theme (for zsh-syntax-highlighting)
|
||||
#
|
||||
@ -200,6 +201,20 @@ ZSH_HIGHLIGHT_STYLES[arg0]='fg=#F8F8F2'
|
||||
ZSH_HIGHLIGHT_STYLES[default]='fg=#F8F8F2'
|
||||
ZSH_HIGHLIGHT_STYLES[cursor]='standout'
|
||||
|
||||
|
||||
if [ -f /etc/hostname ]; then
|
||||
HOST=$(cat /etc/hostname)
|
||||
else
|
||||
HOST=$(hostname)
|
||||
fi
|
||||
|
||||
if [ "$HOST" = "holocene" ] ; then
|
||||
source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh
|
||||
else
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
fi
|
||||
|
||||
|
||||
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
||||
export SDKMAN_DIR="$HOME/.sdkman"
|
||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user