Nerd font 필요
This commit is contained in:
1 parent
666d7c3a9c
commit
fb871e7f0a
3 files changed
+76
-12
No files matched your search
@@ -33,7 +33,7 @@ curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-bott
|
|||||||
**superfile:**
|
**superfile:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash -c "$(curl -sLo- https://superfile.dev/install.sh)"
|
curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-superfile.sh?ref_type=heads" | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
**dua:**
|
**dua:**
|
||||||
|
|||||||
+22
-7
@@ -1,11 +1,12 @@
|
|||||||
#Requires -Version 5.1
|
#Requires -Version 5.1
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Installs superfile (terminal file manager) via winget.
|
Installs superfile (terminal file manager) and JetBrains Mono Nerd Font.
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Installs superfile via winget (yorukot.superfile).
|
Installs superfile via winget (yorukot.superfile) and
|
||||||
superfile is a modern terminal file manager with vim-style keybindings.
|
JetBrains Mono Nerd Font via winget (DEVCOM.JetBrainsMonoNerdFont).
|
||||||
|
superfile requires a Nerd Font for proper icon display.
|
||||||
|
|
||||||
Supported platforms:
|
Supported platforms:
|
||||||
- Windows x64 (AMD64 / Intel 64bit)
|
- Windows x64 (AMD64 / Intel 64bit)
|
||||||
@@ -72,7 +73,7 @@ if ($spfCmd) {
|
|||||||
$spfBin = $spfCmd.Source
|
$spfBin = $spfCmd.Source
|
||||||
}
|
}
|
||||||
|
|
||||||
# 2) Refresh PATH from registry (winget may have added paths)
|
# 2) Refresh PATH from registry
|
||||||
if (-not $spfBin) {
|
if (-not $spfBin) {
|
||||||
$env:Path = [System.Environment]::GetEnvironmentVariable('Path', 'User') + ';' + [System.Environment]::GetEnvironmentVariable('Path', 'Machine')
|
$env:Path = [System.Environment]::GetEnvironmentVariable('Path', 'User') + ';' + [System.Environment]::GetEnvironmentVariable('Path', 'Machine')
|
||||||
$spfCmd = Get-Command spf -ErrorAction SilentlyContinue
|
$spfCmd = Get-Command spf -ErrorAction SilentlyContinue
|
||||||
@@ -126,7 +127,20 @@ if ($spfBin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ────────────────────────────────────────────
|
# ────────────────────────────────────────────
|
||||||
# Step 2: Post-install notes
|
# Step 2: Install JetBrains Mono Nerd Font
|
||||||
|
# ────────────────────────────────────────────
|
||||||
|
Info "Installing JetBrains Mono Nerd Font (required for icon display)..."
|
||||||
|
|
||||||
|
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
||||||
|
winget install --id DEVCOM.JetBrainsMonoNerdFont --accept-package-agreements --accept-source-agreements 2>&1 | Out-Null
|
||||||
|
Success "JetBrains Mono Nerd Font installed via winget"
|
||||||
|
} else {
|
||||||
|
Warn "winget not available. Install JetBrains Mono Nerd Font manually from:"
|
||||||
|
Warn " https://github.com/ryanoasis/nerd-fonts/releases"
|
||||||
|
}
|
||||||
|
|
||||||
|
# ────────────────────────────────────────────
|
||||||
|
# Step 3: Post-install notes
|
||||||
# ────────────────────────────────────────────
|
# ────────────────────────────────────────────
|
||||||
Info ""
|
Info ""
|
||||||
Info "=================================================="
|
Info "=================================================="
|
||||||
@@ -140,12 +154,13 @@ Info ""
|
|||||||
Info "IMPORTANT: Close this terminal and open a new one to use superfile (spf)."
|
Info "IMPORTANT: Close this terminal and open a new one to use superfile (spf)."
|
||||||
Info "PATH changes require a new terminal session to take effect."
|
Info "PATH changes require a new terminal session to take effect."
|
||||||
Info ""
|
Info ""
|
||||||
|
Info "Note: The command name is 'spf', not 'superfile'."
|
||||||
|
Info "Set your terminal font to 'JetBrainsMono Nerd Font Mono' for proper icon display."
|
||||||
|
Info ""
|
||||||
Info "Getting started:"
|
Info "Getting started:"
|
||||||
Info " spf - Start superfile file manager"
|
Info " spf - Start superfile file manager"
|
||||||
Info " spf --help - Show help"
|
Info " spf --help - Show help"
|
||||||
Info ""
|
Info ""
|
||||||
Info "Note: The command name is 'spf', not 'superfile'."
|
|
||||||
Info ""
|
|
||||||
Info "Key bindings (vim-style):"
|
Info "Key bindings (vim-style):"
|
||||||
Info " h/j/k/l - Left/Down/Up/Right"
|
Info " h/j/k/l - Left/Down/Up/Right"
|
||||||
Info " Enter - Open directory / file"
|
Info " Enter - Open directory / file"
|
||||||
|
|||||||
+53
-4
@@ -2,9 +2,10 @@
|
|||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
|
||||||
# Installs superfile (terminal file manager) — https://github.com/yorukot/superfile
|
# Installs superfile (terminal file manager) — https://github.com/yorukot/superfile
|
||||||
|
# Also installs JetBrains Mono Nerd Font (required for proper icon display).
|
||||||
#
|
#
|
||||||
# Uses the official installer on Mac/Linux:
|
# Mac/Linux: Uses the official superfile installer
|
||||||
# bash -c "$(curl -sLo- https://superfile.dev/install.sh)"
|
# Windows: See install-superfile.ps1 (winget)
|
||||||
#
|
#
|
||||||
# Supported platforms:
|
# Supported platforms:
|
||||||
# macOS : Apple Silicon (arm64), Intel (x86_64)
|
# macOS : Apple Silicon (arm64), Intel (x86_64)
|
||||||
@@ -50,7 +51,7 @@ for cmd in curl; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# ────────────────────────────────────────────
|
# ────────────────────────────────────────────
|
||||||
# Install superfile
|
# Step 1: Install superfile
|
||||||
# ────────────────────────────────────────────
|
# ────────────────────────────────────────────
|
||||||
info "Installing superfile (terminal file manager)..."
|
info "Installing superfile (terminal file manager)..."
|
||||||
|
|
||||||
@@ -70,7 +71,55 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ────────────────────────────────────────────
|
# ────────────────────────────────────────────
|
||||||
# Post-install notes
|
# Step 2: Install JetBrains Mono Nerd Font
|
||||||
|
# ────────────────────────────────────────────
|
||||||
|
info "Installing JetBrains Mono Nerd Font (required for icon display)..."
|
||||||
|
|
||||||
|
OS="$(uname -s)"
|
||||||
|
|
||||||
|
case "$OS" in
|
||||||
|
Darwin)
|
||||||
|
brew install --cask font-jetbrains-mono-nerd-font
|
||||||
|
success "JetBrains Mono Nerd Font installed via Homebrew"
|
||||||
|
;;
|
||||||
|
Linux)
|
||||||
|
FONT_DIR="${HOME}/.local/share/fonts"
|
||||||
|
FONT_NAME="JetBrainsMonoNerdFont"
|
||||||
|
FONT_ZIP="JetBrainsMono.tar.xz"
|
||||||
|
FONT_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${FONT_ZIP}"
|
||||||
|
|
||||||
|
# Check if font is already installed
|
||||||
|
if fc-list 2>/dev/null | grep -qi "$FONT_NAME"; then
|
||||||
|
info "JetBrains Mono Nerd Font is already installed. Skipping."
|
||||||
|
else
|
||||||
|
TMPDIR="$(mktemp -d)"
|
||||||
|
trap '[ -d "${TMPDIR:-}" ] && rm -rf "$TMPDIR"' EXIT
|
||||||
|
|
||||||
|
info "Downloading: $FONT_URL"
|
||||||
|
curl -fsSL --progress-bar -o "${TMPDIR}/${FONT_ZIP}" "$FONT_URL" ||
|
||||||
|
warn "Failed to download Nerd Font. Icons may not display correctly."
|
||||||
|
|
||||||
|
if [ -f "${TMPDIR}/${FONT_ZIP}" ]; then
|
||||||
|
mkdir -p "$FONT_DIR"
|
||||||
|
tar -xf "${TMPDIR}/${FONT_ZIP}" -C "$FONT_DIR" 2>/dev/null ||
|
||||||
|
warn "Failed to extract font archive."
|
||||||
|
|
||||||
|
# Rebuild font cache
|
||||||
|
if command -v fc-cache &>/dev/null; then
|
||||||
|
fc-cache -f "$FONT_DIR" 2>/dev/null
|
||||||
|
fi
|
||||||
|
success "JetBrains Mono Nerd Font installed to $FONT_DIR"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
warn "JetBrains Mono Nerd Font auto-install is not supported on $OS."
|
||||||
|
warn "Install it manually from: https://github.com/ryanoasis/nerd-fonts"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# ────────────────────────────────────────────
|
||||||
|
# Step 3: Post-install notes
|
||||||
# ────────────────────────────────────────────
|
# ────────────────────────────────────────────
|
||||||
info ""
|
info ""
|
||||||
info "=================================================="
|
info "=================================================="
|
||||||
|
|||||||
Reference in new issue
Block a user