Merge branch 'master' into riva
This commit is contained in:
commit
442ed8ab4e
|
@ -1,22 +1,32 @@
|
|||
local function save_dir()
|
||||
local dir = require("oil").get_current_dir()
|
||||
if dir ~= nil then
|
||||
local f = io.open("/tmp/oil_dir", "w")
|
||||
if f then
|
||||
f:write(dir)
|
||||
f:close()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
'stevearc/oil.nvim',
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" }, lazy = true,
|
||||
opts = {
|
||||
keymaps = {
|
||||
["g?"] = "actions.show_help",
|
||||
["<CR>"] = "actions.select",
|
||||
["<CR>"] = function() require("oil").select({}, save_dir) end,
|
||||
["<leader>v"] = "actions.select_vsplit",
|
||||
["<leader>s"] = "actions.select_split",
|
||||
["<leader>p"] = "actions.preview",
|
||||
["<backspace>"] = "actions.close",
|
||||
["<leader>r"] = "actions.refresh",
|
||||
["-"] = "actions.parent",
|
||||
["-"] = function() require("oil").open(); save_dir() end,
|
||||
["_"] = "actions.open_cwd",
|
||||
["`"] = "actions.cd",
|
||||
["~"] = "actions.tcd",
|
||||
["g."] = "actions.toggle_hidden",
|
||||
},
|
||||
-- Set to false to disable all of the above keymaps
|
||||
use_default_keymaps = false,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,24 +112,40 @@ function zvm_after_init() {
|
|||
fi
|
||||
if [ ! -f $FZY_CACHE ]; then
|
||||
PATHS=""
|
||||
if [ -d ~/.dotfiles ]; then
|
||||
PATHS="$PATHS\n~/.dotfiles"
|
||||
PATHS="$PATHS\n$(fd . ~/.dotfiles -t d -d 2)"
|
||||
fi
|
||||
if [ -d ~/Workspace ]; then
|
||||
PATHS="$PATHS\n$(fd . ~/Workspace -t d -d 8)"
|
||||
fi
|
||||
if [ -d ~/Containers ]; then
|
||||
PATHS="$PATHS\n$(fd . ~/Containers -t d -d 2)"
|
||||
fi
|
||||
if [ -d ~/Storage/Shared ]; then
|
||||
PATHS="$PATHS\n/home/server/Storage/Shared"
|
||||
PATHS="$PATHS\n$(fd . ~/Storage/Shared -t d -d 2)"
|
||||
fi
|
||||
if [ -d ~/Storage/Thomas ]; then
|
||||
PATHS="$PATHS\n/home/server/Storage/Thomas"
|
||||
PATHS="$PATHS\n$(fd . ~/Storage/Thomas -t d -d 5)"
|
||||
|
||||
for i in \
|
||||
~/.config/waybar \
|
||||
~/.config/xmodmap \
|
||||
~/.config/zsh \
|
||||
~/.config/tmux \
|
||||
~/.config/vim \
|
||||
~/.config/qtile \
|
||||
~/.config/rofi \
|
||||
~/.config/scripts \
|
||||
~/.config/nvim \
|
||||
~/.config/picom \
|
||||
~/.config/polybar \
|
||||
~/.config/awesome \
|
||||
~/.config/dunst \
|
||||
~/.config/firefox \
|
||||
~/.config/git \
|
||||
~/.config/gitui \
|
||||
~/.config/helix \
|
||||
~/.config/hypr \
|
||||
~/.config/i3 \
|
||||
~/.config/kitty \
|
||||
~/.config/mpv \
|
||||
~/.config/alacritty \
|
||||
~/Workspace \
|
||||
~/Containers \
|
||||
~/Storage/Shared \
|
||||
~/Storage/Thomas; do
|
||||
|
||||
if [ -d $i ]; then
|
||||
PATHS="$PATHS\n$i/"
|
||||
PATHS="$PATHS\n$(fd . $i -t d -d 5)"
|
||||
fi
|
||||
done
|
||||
echo -e $PATHS > $FZY_CACHE
|
||||
fi
|
||||
cd_to "$(cat $FZY_CACHE | fzy -l 20)"
|
||||
|
@ -233,7 +249,8 @@ function o () {
|
|||
|
||||
function run_waypipe() {
|
||||
SSH_SESSION_ID=$RANDOM
|
||||
SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t $1 env REMOTE_PATH=\"$(pwd)\" SSH_SESSION_ID=$SSH_SESSION_ID "zsh --login"
|
||||
REMOTE_PATH=$(echo $(pwd) | sed "s|/home/[a-z]*|\$HOME|g")
|
||||
SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t $1 env REMOTE_PATH=\"$REMOTE_PATH\" SSH_SESSION_ID=$SSH_SESSION_ID "zsh --login"
|
||||
}
|
||||
|
||||
alias mallorea="run_waypipe mallorea"
|
||||
|
@ -256,11 +273,12 @@ alias ll='ls -lhat'
|
|||
alias clip="xsel --clipboard"
|
||||
alias compress="tar --use-compress-program=lbzip2 -cvf"
|
||||
alias vim="nvim"
|
||||
alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
|
||||
alias dot='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
|
||||
alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
|
||||
alias xbindkeys="xbindkeys -f $XDG_CONFIG_HOME/xbindkeys/config"
|
||||
alias python=python3
|
||||
alias r=". ranger"
|
||||
alias v="vim . && cd \"\$(cat /tmp/oil_dir)\""
|
||||
alias cpr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1"
|
||||
alias mvr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files"
|
||||
alias rg="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'"
|
||||
|
|
Loading…
Reference in New Issue