fixes
This commit is contained in:
parent
3340fdabd0
commit
54b201f720
2 changed files with 24 additions and 23 deletions
|
@ -68,12 +68,28 @@ else
|
|||
echo_missing "rsync"
|
||||
fi
|
||||
|
||||
# ─< Function to determine which Neovim command to use >──────────────────────────────────
|
||||
choose_nvim() {
|
||||
if [ -n "$TMUX" ]; then
|
||||
# If inside an active tmux session, use nvim
|
||||
echo "command nvim"
|
||||
return
|
||||
elif [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
# If in a graphical environment, use Neovide
|
||||
if command_exists neovide; then
|
||||
echo "neovide --fork"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
# Default to nvim
|
||||
echo "command nvim"
|
||||
}
|
||||
# Set up Neovim aliases based on environment
|
||||
if command_exists nvim; then
|
||||
alias cnvim="command nvim"
|
||||
alias nvim="$(choose_nvim)"
|
||||
nv() {
|
||||
NVIM_APPNAME="$1" command nvim "${@:2}"
|
||||
NVIM_APPNAME="$1" command nvim "${@:-2}"
|
||||
}
|
||||
|
||||
if [ -d "$HOME/.config/nvdev" ]; then
|
||||
|
@ -465,23 +481,6 @@ if command_exists termshark; then
|
|||
alias ws="$_sudo termshark"
|
||||
fi
|
||||
|
||||
# ─< Function to determine which Neovim command to use >──────────────────────────────────
|
||||
choose_nvim() {
|
||||
if [ -n "$TMUX" ]; then
|
||||
# If inside an active tmux session, use nvim
|
||||
echo "command nvim"
|
||||
return
|
||||
elif [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
# If in a graphical environment, use Neovide
|
||||
if command_exists neovide; then
|
||||
echo "neovide --fork"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
# Default to nvim
|
||||
echo "command nvim"
|
||||
}
|
||||
|
||||
# Tmux session manager
|
||||
if command_exists tmux; then
|
||||
ta() {
|
||||
|
|
12
.zshrc
12
.zshrc
|
@ -250,15 +250,13 @@ __end__() {
|
|||
clear &&
|
||||
fastfetch
|
||||
|
||||
else
|
||||
echo_warning "fastfetch is not installed.."
|
||||
fi
|
||||
|
||||
if command_exists cowsay; then
|
||||
alias clear='clear && cowsay -f tux "$(uptime --pretty)"'
|
||||
cowsay -f tux "$(uptime --pretty)"
|
||||
else
|
||||
echo_warning "cowasy is not installed.."
|
||||
echo_missing "cowasy"
|
||||
fi
|
||||
|
||||
__shell_qol__
|
||||
|
@ -267,10 +265,14 @@ __end__() {
|
|||
|
||||
main() {
|
||||
__defaults__
|
||||
__alias__
|
||||
__sources__
|
||||
__end__
|
||||
__keychain_setup__
|
||||
|
||||
if command_exists keychain; then
|
||||
__keychain_setup__
|
||||
else
|
||||
echo_missing "keychain"
|
||||
fi
|
||||
}
|
||||
|
||||
if check_root; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue