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 {
|
return {
|
||||||
'stevearc/oil.nvim',
|
'stevearc/oil.nvim',
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" }, lazy = true,
|
dependencies = { "nvim-tree/nvim-web-devicons" }, lazy = true,
|
||||||
opts = {
|
opts = {
|
||||||
keymaps = {
|
keymaps = {
|
||||||
["g?"] = "actions.show_help",
|
["g?"] = "actions.show_help",
|
||||||
["<CR>"] = "actions.select",
|
["<CR>"] = function() require("oil").select({}, save_dir) end,
|
||||||
["<leader>v"] = "actions.select_vsplit",
|
["<leader>v"] = "actions.select_vsplit",
|
||||||
["<leader>s"] = "actions.select_split",
|
["<leader>s"] = "actions.select_split",
|
||||||
["<leader>p"] = "actions.preview",
|
["<leader>p"] = "actions.preview",
|
||||||
["<backspace>"] = "actions.close",
|
["<backspace>"] = "actions.close",
|
||||||
["<leader>r"] = "actions.refresh",
|
["<leader>r"] = "actions.refresh",
|
||||||
["-"] = "actions.parent",
|
["-"] = function() require("oil").open(); save_dir() end,
|
||||||
["_"] = "actions.open_cwd",
|
["_"] = "actions.open_cwd",
|
||||||
["`"] = "actions.cd",
|
["`"] = "actions.cd",
|
||||||
["~"] = "actions.tcd",
|
["~"] = "actions.tcd",
|
||||||
["g."] = "actions.toggle_hidden",
|
["g."] = "actions.toggle_hidden",
|
||||||
},
|
},
|
||||||
-- Set to false to disable all of the above keymaps
|
|
||||||
use_default_keymaps = false,
|
use_default_keymaps = false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,24 +112,40 @@ function zvm_after_init() {
|
||||||
fi
|
fi
|
||||||
if [ ! -f $FZY_CACHE ]; then
|
if [ ! -f $FZY_CACHE ]; then
|
||||||
PATHS=""
|
PATHS=""
|
||||||
if [ -d ~/.dotfiles ]; then
|
|
||||||
PATHS="$PATHS\n~/.dotfiles"
|
for i in \
|
||||||
PATHS="$PATHS\n$(fd . ~/.dotfiles -t d -d 2)"
|
~/.config/waybar \
|
||||||
fi
|
~/.config/xmodmap \
|
||||||
if [ -d ~/Workspace ]; then
|
~/.config/zsh \
|
||||||
PATHS="$PATHS\n$(fd . ~/Workspace -t d -d 8)"
|
~/.config/tmux \
|
||||||
fi
|
~/.config/vim \
|
||||||
if [ -d ~/Containers ]; then
|
~/.config/qtile \
|
||||||
PATHS="$PATHS\n$(fd . ~/Containers -t d -d 2)"
|
~/.config/rofi \
|
||||||
fi
|
~/.config/scripts \
|
||||||
if [ -d ~/Storage/Shared ]; then
|
~/.config/nvim \
|
||||||
PATHS="$PATHS\n/home/server/Storage/Shared"
|
~/.config/picom \
|
||||||
PATHS="$PATHS\n$(fd . ~/Storage/Shared -t d -d 2)"
|
~/.config/polybar \
|
||||||
fi
|
~/.config/awesome \
|
||||||
if [ -d ~/Storage/Thomas ]; then
|
~/.config/dunst \
|
||||||
PATHS="$PATHS\n/home/server/Storage/Thomas"
|
~/.config/firefox \
|
||||||
PATHS="$PATHS\n$(fd . ~/Storage/Thomas -t d -d 5)"
|
~/.config/git \
|
||||||
fi
|
~/.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
|
echo -e $PATHS > $FZY_CACHE
|
||||||
fi
|
fi
|
||||||
cd_to "$(cat $FZY_CACHE | fzy -l 20)"
|
cd_to "$(cat $FZY_CACHE | fzy -l 20)"
|
||||||
|
@ -233,7 +249,8 @@ function o () {
|
||||||
|
|
||||||
function run_waypipe() {
|
function run_waypipe() {
|
||||||
SSH_SESSION_ID=$RANDOM
|
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"
|
alias mallorea="run_waypipe mallorea"
|
||||||
|
@ -256,11 +273,12 @@ alias ll='ls -lhat'
|
||||||
alias clip="xsel --clipboard"
|
alias clip="xsel --clipboard"
|
||||||
alias compress="tar --use-compress-program=lbzip2 -cvf"
|
alias compress="tar --use-compress-program=lbzip2 -cvf"
|
||||||
alias vim="nvim"
|
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 wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
|
||||||
alias xbindkeys="xbindkeys -f $XDG_CONFIG_HOME/xbindkeys/config"
|
alias xbindkeys="xbindkeys -f $XDG_CONFIG_HOME/xbindkeys/config"
|
||||||
alias python=python3
|
alias python=python3
|
||||||
alias r=". ranger"
|
alias r=". ranger"
|
||||||
|
alias v="vim . && cd \"\$(cat /tmp/oil_dir)\""
|
||||||
alias cpr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1"
|
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 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'"
|
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