minor changes here and there, working on a zettlekasten implementation.
This commit is contained in:
parent
50cbee95d4
commit
37dd285600
@ -130,15 +130,6 @@ cmd mkfile_and_edit ${{
|
|||||||
eval $EDITOR $ans
|
eval $EDITOR $ans
|
||||||
}}
|
}}
|
||||||
|
|
||||||
cmd zk_edit ${{
|
|
||||||
eval zk edit --interactive --sort modified-
|
|
||||||
}}
|
|
||||||
|
|
||||||
cmd zk_edit_file ${{
|
|
||||||
name=$(echo "$f" | sed 's/\..*//' | sed 's/.*\///')
|
|
||||||
eval zk edit -i -m "$name"
|
|
||||||
}}
|
|
||||||
|
|
||||||
cmd setbg "$1"
|
cmd setbg "$1"
|
||||||
cmd bulkrename $vidir
|
cmd bulkrename $vidir
|
||||||
|
|
||||||
@ -166,7 +157,7 @@ map t
|
|||||||
map tt trash
|
map tt trash
|
||||||
map tr restore_trash
|
map tr restore_trash
|
||||||
|
|
||||||
map tmo $tmux-sessioniser $PWD
|
map T $tmux-sessioniser $PWD
|
||||||
|
|
||||||
map m
|
map m
|
||||||
map md mkdir
|
map md mkdir
|
||||||
@ -188,6 +179,11 @@ map gcs cd ~/.config/shell
|
|||||||
map gcz cd ~/.config/zsh
|
map gcz cd ~/.config/zsh
|
||||||
map gcx1 cd ~/.config/x11
|
map gcx1 cd ~/.config/x11
|
||||||
map gw cd ~/work
|
map gw cd ~/work
|
||||||
|
map gNN cd ~/notes/zk/
|
||||||
|
map gNi cd ~/notes/zk/inbox/
|
||||||
|
map gNw cd ~/notes/zk/work/
|
||||||
|
map gNn cd ~/notes/zk/notes/
|
||||||
|
map gNj cd ~/notes/zk/journal/
|
||||||
|
|
||||||
map A rename # at the very end
|
map A rename # at the very end
|
||||||
map c push A<c-u> # new rename
|
map c push A<c-u> # new rename
|
||||||
@ -205,8 +201,5 @@ map W $setsid -f $TERMINAL >/dev/null 2>&1
|
|||||||
|
|
||||||
map Y $printf "%s" "$fx" | xclip -selection clipboard
|
map Y $printf "%s" "$fx" | xclip -selection clipboard
|
||||||
|
|
||||||
map zke zk_edit
|
|
||||||
map zkf zk_edit_file
|
|
||||||
|
|
||||||
# Source Bookmarks
|
# Source Bookmarks
|
||||||
# source "~/.config/lf/shortcutrc"
|
# source "~/.config/lf/shortcutrc"
|
||||||
|
|||||||
@ -35,7 +35,8 @@ map("n", "<C-y>", '"+y', opts)
|
|||||||
map("n", "<C-p>", '"+p', opts)
|
map("n", "<C-p>", '"+p', opts)
|
||||||
|
|
||||||
-- Save
|
-- Save
|
||||||
map("n", "<C-s>", ":w<CR>", opts)
|
map("n", "<C-s>", "<ESC>:w<CR>", opts)
|
||||||
|
map("i", "<C-s>", "<ESC>:w<CR>", opts)
|
||||||
|
|
||||||
-- Switch between buffers
|
-- Switch between buffers
|
||||||
map("n", "<S-l>", ":bnext<CR>", opts)
|
map("n", "<S-l>", ":bnext<CR>", opts)
|
||||||
@ -48,9 +49,6 @@ map("n", "<C-d>", "<C-d>zz", opts)
|
|||||||
-- Easy exit insert mode
|
-- Easy exit insert mode
|
||||||
map("i", "jk", "<ESC>", opts)
|
map("i", "jk", "<ESC>", opts)
|
||||||
|
|
||||||
-- Save
|
|
||||||
map("i", "<C-s>", "<ESC>:w<CR>a", opts)
|
|
||||||
|
|
||||||
-- Indenting
|
-- Indenting
|
||||||
map("v", "<", "<gv", opts)
|
map("v", "<", "<gv", opts)
|
||||||
map("v", ">", ">gv", opts)
|
map("v", ">", ">gv", opts)
|
||||||
@ -59,4 +57,5 @@ map("v", ">", ">gv", opts)
|
|||||||
map("v", "<C-j>", ":m .+1<CR>==<ESC>V", opts)
|
map("v", "<C-j>", ":m .+1<CR>==<ESC>V", opts)
|
||||||
map("v", "<C-k>", ":m .-2<CR>==<ESC>V", opts)
|
map("v", "<C-k>", ":m .-2<CR>==<ESC>V", opts)
|
||||||
|
|
||||||
|
-- Don't have a terminal implemented yet but when I do...
|
||||||
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
||||||
|
|||||||
@ -8,57 +8,57 @@
|
|||||||
|
|
||||||
# sudo not required for some system commands
|
# sudo not required for some system commands
|
||||||
for command in mount umount pacman su shutdown poweroff reboot ; do
|
for command in mount umount pacman su shutdown poweroff reboot ; do
|
||||||
alias $command="sudo $command"
|
alias $command="sudo $command"
|
||||||
done; unset command
|
done; unset command
|
||||||
|
|
||||||
# Verbosity and settings that you pretty much just always are going to want.
|
# Verbosity and settings that you pretty much just always are going to want.
|
||||||
alias \
|
alias \
|
||||||
cp="cp -iv" \
|
cp="cp -iv" \
|
||||||
mv="mv -iv" \
|
mv="mv -iv" \
|
||||||
rm="rm -vI" \
|
rm="rm -vI" \
|
||||||
bc="bc -ql" \
|
bc="bc -ql" \
|
||||||
mkd="mkdir -pv" \
|
mkd="mkdir -pv" \
|
||||||
ffmpeg="ffmpeg -hide_banner"
|
ffmpeg="ffmpeg -hide_banner"
|
||||||
|
|
||||||
# Colorize commands when possible.
|
# Colorize commands when possible.
|
||||||
alias \
|
alias \
|
||||||
ls="ls -hN --color=auto --group-directories-first" \
|
ls="ls -hN --color=auto --group-directories-first" \
|
||||||
grep="grep --color=auto" \
|
grep="grep --color=auto" \
|
||||||
diff="diff --color=auto" \
|
diff="diff --color=auto" \
|
||||||
ccat="highlight --out-format=ansi" \
|
ccat="highlight --out-format=ansi" \
|
||||||
ip="ip -color=auto"
|
ip="ip -color=auto"
|
||||||
|
|
||||||
# These common commands are just too long! Abbreviate them.
|
# These common commands are just too long! Abbreviate them.
|
||||||
alias \
|
alias \
|
||||||
ka="killall" \
|
ka="killall" \
|
||||||
g="git" \
|
g="git" \
|
||||||
e="$EDITOR" \
|
e="$EDITOR" \
|
||||||
v="$EDITOR" \
|
v="$EDITOR" \
|
||||||
z="zathura"
|
z="zathura"
|
||||||
|
|
||||||
alias \
|
alias \
|
||||||
lf="lfub" \
|
lf="lfub" \
|
||||||
magit="nvim -c MagitOnly" \
|
magit="nvim -c MagitOnly" \
|
||||||
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
||||||
|
|
||||||
# Alias dotfiles/config related commands
|
# Alias dotfiles/config related commands
|
||||||
alias \
|
alias \
|
||||||
config="/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME" \
|
config="/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME" \
|
||||||
ccam="config commit -am" \
|
ccam="config commit -am" \
|
||||||
cpush="config push" \
|
cpush="config push" \
|
||||||
cpull="config pull" \
|
cpull="config pull" \
|
||||||
cst="config status" \
|
cst="config status" \
|
||||||
|
|
||||||
# Alias tmux commands for ease of use
|
# Alias tmux commands for ease of use
|
||||||
alias \
|
alias \
|
||||||
tmn="tmux new" \
|
tmn="tmux new" \
|
||||||
tma="tmux-worker" \
|
tma="tmux-worker" \
|
||||||
tms="tmux-sessioniser" \
|
tms="tmux-sessioniser" \
|
||||||
tm.="tmux-sessioniser ."
|
tm.="tmux-sessioniser ."
|
||||||
|
|
||||||
# Alias some extra things for ease of use
|
# Alias some extra things for ease of use
|
||||||
alias \
|
alias \
|
||||||
myip="curl api.ipify.org" \
|
myip="curl api.ipify.org" \
|
||||||
cls="clear" \
|
cls="clear" \
|
||||||
c="clear" \
|
c="clear" \
|
||||||
cdc="cd && clear"
|
cdc="cd && clear"
|
||||||
|
|||||||
@ -87,10 +87,16 @@ lfcd() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# lf
|
||||||
bindkey -s '^o' '^ulfcd\n'
|
bindkey -s '^o' '^ulfcd\n'
|
||||||
|
|
||||||
|
# tmux sessioniser
|
||||||
bindkey -s '^t' '^utms\n'
|
bindkey -s '^t' '^utms\n'
|
||||||
|
|
||||||
|
# zk related things
|
||||||
bindkey -s '^n' '^uzk edit --interactive --sort modified-\n'
|
bindkey -s '^n' '^uzk edit --interactive --sort modified-\n'
|
||||||
|
|
||||||
|
|
||||||
if [ -f /etc/hostname ]; then
|
if [ -f /etc/hostname ]; then
|
||||||
HOST=$(cat /etc/hostname)
|
HOST=$(cat /etc/hostname)
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user