diff --git a/README.md b/README.md index 034fcec..60df53c 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ ### πŸ“ 1. 터미널 관리 & 파일 μœ ν‹Έλ¦¬ν‹° * **[tmux](https://github.com/tmux/tmux)** - κ°•λ ₯ν•œ 터미널 λ©€ν‹°ν”Œλ ‰μ„œ (μ„Έμ…˜ 관리 및 ν™”λ©΄ λΆ„ν• , WindowsλŠ” psmux둜 μ„€μΉ˜) +* **[rmux](https://rmux.io)** - tmux의 λŒ€μ•ˆμœΌλ‘œ 이용 κ°€λŠ₯ν•œ Rust 기반의 ν˜„λŒ€μ μ΄κ³  λΉ λ₯Έ 터미널 λ©€ν‹°ν”Œλ ‰μ„œ * **[Helix](https://github.com/helix-editor/helix)** - ν˜„λŒ€μ μ΄κ³  κ°•λ ₯ν•œ 터미널 기반 λͺ¨λ‹¬ ν…μŠ€νŠΈ 에디터 (LSP 및 ꡬ문 κ°•μ‘° κΈ°λ³Έ λ‚΄μž₯) * **[superfile](https://github.com/yorukot/superfile)** - λͺ¨λ˜ν•˜κ³  μˆ˜λ €ν•œ 터미널 기반 파일 κ΄€λ¦¬μž (Vim 킀바인딩 지원) * **[dua](https://github.com/byron/dua-cli)** - 병렬 μŠ€μΊ”μ„ μ§€μ›ν•˜λŠ” μ΄ˆκ³ μ† λ””μŠ€ν¬ μ‚¬μš©λŸ‰ 뢄석 도ꡬ @@ -41,6 +42,11 @@ curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-tmux.sh?ref_type=heads" | bash ``` +* **rmux:** + ```bash + curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-rmux.sh?ref_type=heads" | bash + ``` + * **Helix:** ```bash curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-helix.sh?ref_type=heads" | bash @@ -135,6 +141,16 @@ > πŸ’‘ **Windows OpenSSH Server μ°Έκ³ :** 슀크립트 가동 μ‹œ OpenSSH Server(sshd)κ°€ λ―Έμ„€μΉ˜λœ μƒνƒœλΌλ©΄ μžλ™μœΌλ‘œ 감지 및 λ°±κ·ΈλΌμš΄λ“œ μ„€μΉ˜ ν›„ κΈ°λ™ν•©λ‹ˆλ‹€. (κ΄€λ¦¬μž κΆŒν•œμ΄ ν•„μš”ν•  수 μžˆμŠ΅λ‹ˆλ‹€.) > πŸ’‘ **Windows tmux(psmux) μ°Έκ³ :** Windows ν™˜κ²½μ—μ„œλŠ” Rust 기반으둜 λΉŒλ“œλ˜μ–΄ μ„±λŠ₯이 λ›°μ–΄λ‚œ λ„€μ΄ν‹°λΈŒ Windows 터미널 λ©€ν‹°ν”Œλ ‰μ„œμΈ `psmux`κ°€ μ„€μΉ˜λ©λ‹ˆλ‹€. +* **rmux:** + * **CMD μ°½μ—μ„œ μ„€μΉ˜ μ‹œ:** + ```cmd + powershell -ExecutionPolicy Bypass -c "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $t=\"$env:TEMP\install-rmux.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-rmux.ps1' -OutFile $t; & $t" + ``` + * **νŒŒμ›Œμ‰˜ μ°½μ—μ„œ μ„€μΉ˜ μ‹œ:** + ```powershell + $t="$env:TEMP\install-rmux.ps1"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-rmux.ps1' -OutFile $t; powershell -ExecutionPolicy Bypass -File $t + ``` + * **Helix:** * **CMD μ°½μ—μ„œ μ„€μΉ˜ μ‹œ:** ```cmd @@ -306,7 +322,31 @@ tmux ls # 가동 쀑인 μ„Έμ…˜ λͺ©λ‘ 보기 > πŸ’‘ **Windows (PowerShell) μ°Έκ³ :** μœˆλ„μš° ν™˜κ²½μ—μ„œ μ‹€ν–‰ν•  경우, OpenSSH Server μ„œλΉ„μŠ€(`sshd`)κ°€ μž‘λ™ν•˜μ§€ μ•Šκ±°λ‚˜ 없을 μ‹œ Windows 선택적 κΈ°λŠ₯(Optional Capability)을 ν†΅ν•˜μ—¬ 무인 μ„€μΉ˜ 및 κ΅¬λ™κΉŒμ§€ μ™„μ „ μžλ™ μ§€μ›ν•©λ‹ˆλ‹€. > πŸ’‘ **Windows psmux 연동 μ°Έκ³ :** Windowsμ—μ„œλŠ” λ„€μ΄ν‹°λΈŒ 가상 터미널 ν™˜κ²½μ„ μ„ μ‚¬ν•˜λŠ” `psmux`κ°€ μ„€μΉ˜λ˜λ©°, κΈ°μ‘΄ `.tmux.conf` 파일과 높은 μˆ˜μ€€μœΌλ‘œ ν˜Έν™˜λ˜μ–΄ λ™μΌν•œ μ„€μ •κ³Ό vim 킀바인딩을 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€. -#### 1.2. Helix +#### 1.2. rmux +tmux의 κ°•λ ₯ν•˜κ³  ν˜„λŒ€μ μΈ λŒ€μ•ˆμœΌλ‘œ μ„€κ³„λœ Rust 기반 터미널 λ©€ν‹°ν”Œλ ‰μ„œμž…λ‹ˆλ‹€. λ°±κ·ΈλΌμš΄λ“œ 데λͺ¬ ν”„λ‘œμ„ΈμŠ€λ₯Ό 기반으둜 μ‰˜ μ„Έμ…˜μ„ μ§€μ†μ μœΌλ‘œ μœ μ§€ν•˜λ©°, λΈŒλΌμš°μ €μ—μ„œ 터미널을 접속할 수 μžˆλŠ” μ›Ή μ…°μ–΄(Web Share) κΈ°λŠ₯κ³Ό μ „μš© Rust SDKλ₯Ό μ§€μ›ν•©λ‹ˆλ‹€. + +* **tmux ν˜Έν™˜μ„±** β€” κΈ°μ‘΄ tmux λͺ…λ Ήμ–΄ 체계λ₯Ό 상당 λΆ€λΆ„ κ·ΈλŒ€λ‘œ μ§€μ›ν•˜μ—¬ μ™„λ²½ν•˜κ²Œ ν˜Έν™˜ μž‘λ™ +* **Rust 기반 κ³ μ„±λŠ₯** β€” 가볍고 λΉ λ₯΄λ©° Rust 기반으둜 μ˜€λ™μž‘μ΄ 극히 적음 +* **μ›Ή μ…°μ–΄ κΈ°λŠ₯ λ‚΄μž₯** β€” 좔가적인 툴 μ„€μΉ˜ 없이 터미널 μ„Έμ…˜μ„ λΈŒλΌμš°μ €μ— μ‹€μ‹œκ°„μœΌλ‘œ 곡유 κ°€λŠ₯ + +```bash +rmux # μƒˆ μ„Έμ…˜ 가동 +rmux attach # λ§ˆμ§€λ§‰ μ„Έμ…˜ λ‹€μ‹œ μ—°κ²° +rmux list-sessions # μ„Έμ…˜ λͺ©λ‘ 보기 +``` + +| 단좕킀 | λ™μž‘ | +| :--- | :--- | +| `Ctrl-b` | Prefix key (κΈ°λ³Έκ°’) | +| `Prefix %` | ν™”λ©΄ μˆ˜ν‰(쒌우) λΆ„ν•  | +| `Prefix "` | ν™”λ©΄ 수직(μœ„μ•„λž˜) λΆ„ν•  | +| `Prefix d` | ν˜„μž¬ μ„Έμ…˜μ—μ„œ μ΄νƒˆ (Detach) | +| `Prefix o` | λ‹€μŒ νŒ¨λ„λ‘œ 포컀슀 이동 | +| `Prefix x` | ν˜„μž¬ ν™œμ„±ν™”λœ νŒ¨λ„ μ™„μ „νžˆ λ‹«κΈ° | + +> πŸ’‘ **tmux λŒ€μ•ˆ κΈ°λŠ₯:** rmuxλŠ” Rust ν”„λ‘œμ νŠΈμ—μ„œ SDK둜 μ œμ–΄ν•  μˆ˜λ„ μžˆμ–΄ 터미널 μ˜€μΌ€μŠ€νŠΈλ ˆμ΄μ…˜ 및 ν…ŒμŠ€νŠΈ μžλ™ν™”μ— μ΅œμ ν™”λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. + +#### 1.3. Helix 터미널 ν™˜κ²½μ—μ„œ ν˜„λŒ€μ μΈ μ‚¬μš©μ„±μ„ μ œκ³΅ν•˜λŠ” λͺ¨λ‹¬(Modal) ν…μŠ€νŠΈ μ—λ””ν„°μž…λ‹ˆλ‹€. λ³„λ„μ˜ ν”ŒλŸ¬κ·ΈμΈ μ„€μ • 없이도 LSP(Language Server Protocol), λ‚˜λ¬΄ λͺ¨μ–‘ ꡬ문 트리 νŒŒμ„œ(Tree-sitter) 및 μˆ˜λ €ν•œ λ””μžμΈ ν…Œλ§ˆκ°€ λ‚΄μž₯λ˜μ–΄ μžˆμ–΄ μ΄ˆλ³΄μžλΆ€ν„° μ „λ¬Έκ°€κΉŒμ§€ μ¦‰μ‹œ μ‚¬μš© κ°€λŠ₯ν•©λ‹ˆλ‹€. * **LSP κΈ°λ³Έ λ‚΄μž₯** β€” μžλ™ μ™„μ„±, μ •μ˜ 이동, νƒ€μž… 힌트 λ“± IDEκΈ‰ 개발 지원 @@ -335,7 +375,7 @@ hx # μ‹€ν–‰ λͺ…λ Ήμ–΄ > πŸ’‘ **μ„€μΉ˜ ꡬ성 팁:** Helix μ—λ””ν„°λŠ” μ‹€ν–‰ λ°”μ΄λ„ˆλ¦¬(`hx` / `hx.exe`)뿐만 μ•„λ‹ˆλΌ 언어별 ꡬ문 및 ν…Œλ§ˆ 파일이 λͺ¨μΈ `runtime` 디렉토리가 μ˜¬λ°”λ₯Έ κ²½λ‘œμ— λ°°ν¬λ˜μ–΄μ•Ό ν•©λ‹ˆλ‹€. 당사 배포 μŠ€ν¬λ¦½νŠΈλŠ” macOS/Linux의 경우 `~/.config/helix/runtime`, Windows의 경우 `%APPDATA%\helix\runtime`으둜 λŸ°νƒ€μž„ 폴더λ₯Ό μžλ™ νƒμƒ‰ν•˜μ—¬ λ°±μ—… 및 λ°°μΉ˜ν•©λ‹ˆλ‹€. -#### 1.3. superfile +#### 1.4. superfile μˆ˜λ €ν•˜κ³  λ―Έλ €ν•œ λ””μžμΈμ„ μ„ μ‚¬ν•˜λŠ” κ³ κΈ°λŠ₯ 터미널 파일 κ΄€λ¦¬μžμž…λ‹ˆλ‹€. * **λ“€μ–Ό νŒ¨λ„** β€” λŒ€μΉ­ν˜• λ ˆμ΄μ•„μ›ƒμœΌλ‘œ 직관적인 디렉토리 κ°„ 파일 μ‘°μž‘ @@ -360,7 +400,7 @@ spf # μ‹€ν–‰ λͺ…λ Ήμ–΄ (superfile이 μ•„λ‹Œ spfλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€) > πŸ’‘ **μ€‘μš”:** 터미널 μ•„μ΄μ½˜μ΄ λ°•μŠ€λ‚˜ λ¬ΌμŒν‘œ 기호처럼 κΉ¨μ Έ 보일 경우, μ‚¬μš©ν•˜μ‹œλŠ” 터미널 폰트λ₯Ό **Nerd Font** κ³„μ—΄λ‘œ μ„€μ •ν•΄ μ£Όμ„Έμš”. > πŸ’‘ **macOS iTerm2 ν•œκΈ€ 깨짐 팁:** μ„€μ •(`Settings` > `Profile` > `Text` > `Normalization`)μ—μ„œ **NFC** μ˜΅μ…˜μœΌλ‘œ 섀정을 μ „ν™˜ν•˜μ‹œλ©΄ 정상 ν‘œκΈ°λ©λ‹ˆλ‹€. -#### 1.4. dua +#### 1.5. dua SSD와 μ‹œμŠ€ν…œ μ„±λŠ₯을 μ΅œλŒ€λ‘œ ν™œμš©ν•˜μ—¬ μœ μ‹€λœ μš©λŸ‰μ„ μΆ”μ ν•˜λŠ” 병렬 μŠ€μΊ” λ°©μ‹μ˜ μ΄ˆκ³ μ† λ””μŠ€ν¬ 뢄석 μœ ν‹Έλ¦¬ν‹°μž…λ‹ˆλ‹€. * **μ΄ˆκ³ μ† μŠ€μΊ”** β€” λŒ€μš©λŸ‰ λ””μŠ€ν¬λ„ 수 초 λ§Œμ— κ³ μ†μœΌλ‘œ μŠ€μΊ” 처리 diff --git a/install-rmux.ps1 b/install-rmux.ps1 new file mode 100644 index 0000000..ae8ab49 --- /dev/null +++ b/install-rmux.ps1 @@ -0,0 +1,86 @@ +#Requires -Version 5.1 +<# +.SYNOPSIS + Installs rmux (Rust terminal multiplexer) on Windows. + +.DESCRIPTION + Installs rmux natively by invoking the official install.ps1 script. + This is a modern, fast Rust-based alternative to tmux. + Official Guide: https://rmux.io/docs/get-started/#/installation + +.EXAMPLE + .\install-rmux.ps1 + + # One-liner install from remote (works on Windows 10+): + powershell -ExecutionPolicy Bypass -c "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $t=\"$env:TEMP\install-rmux.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-rmux.ps1' -OutFile $t; & $t" + +.NOTES + If execution policy error occurs: + Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser +#> + +[CmdletBinding()] +param() + +# μ΅œμ‹  μœˆλ„μš° ν™˜κ²½ 및 μ—λŸ¬ λ°œμƒ μ‹œ μ¦‰μ‹œ 쀑단 μ„€μ • +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +# HTTPS λ‹€μš΄λ‘œλ“œλ₯Ό μœ„ν•œ TLS 1.2 κ°•μ œ (PowerShell 5.1 ν˜Έν™˜μ„± 보μž₯) +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + +# ──────────────────────────────────────────── +# μœ ν‹Έλ¦¬ν‹° ν•¨μˆ˜ μ •μ˜ (λͺ¨λ“  μ•ˆλ‚΄ λ¬Έκ΅¬λŠ” 영문으둜 μž‘μ„±) +# ──────────────────────────────────────────── +function Write-Info { param([string]$msg) Write-Host "[INFO] $msg" -ForegroundColor Cyan } + # 정보 좜λ ₯ +function Write-Warn { param([string]$msg) Write-Host "[WARN] $msg" -ForegroundColor Yellow } + # κ²½κ³  좜λ ₯ +function Write-Success { param([string]$msg) Write-Host "[OK] $msg" -ForegroundColor Green } + # 성곡 좜λ ₯ +function Write-Err { param([string]$msg) Write-Host "[ERROR] $msg" -ForegroundColor Red; exit 1 } + # μ—λŸ¬ 좜λ ₯ 및 슀크립트 κ°•μ œ μ’…λ£Œ + +# ──────────────────────────────────────────── +# 메인 μ„€μΉ˜ ν”„λ‘œμ„ΈμŠ€ +# ──────────────────────────────────────────── +function Main { + Write-Info "===== rmux CLI install script (Windows PowerShell) =====" + Write-Info "Installing rmux CLI (Rust terminal multiplexer) natively..." + + # 이미 μ„€μΉ˜λ˜μ–΄ μžˆλŠ”μ§€ 확인 + $rmuxCmd = Get-Command rmux -ErrorAction SilentlyContinue + if ($rmuxCmd) { + $currentVer = & rmux --version 2>$null + if (-not $currentVer) { $currentVer = "unknown" } + Write-Info "rmux is already installed ($currentVer). Skipping installation." + } else { + try { + Write-Info "Fetching and executing official installer from: https://rmux.io/install.ps1" + + # 곡식 μ„€μΉ˜ ps1 슀크립트λ₯Ό λ‹€μš΄λ‘œλ“œ 및 λ©”λͺ¨λ¦¬ μƒμ—μ„œ 직접 호좜 가동 + $installerScript = Invoke-RestMethod -Uri "https://rmux.io/install.ps1" -UseBasicParsing + Invoke-Expression $installerScript + + Write-Success "rmux has been successfully installed!" + } catch { + Write-Err "Failed to install rmux CLI: $_" + } + } + + # μ΅œμ’… κ°€μš©μ„± 검증 + $rmuxCmd = Get-Command rmux -ErrorAction SilentlyContinue + if ($rmuxCmd) { + Write-Success "rmux is available: $($rmuxCmd.Source)" + Write-Info "Run command: rmux" + } else { + Write-Warn "rmux was not found in PATH after installation. You may need to restart your terminal window or refresh your PATH environment variable." + } +} + +# 예기치 λͺ»ν•œ 전체 ν”„λ‘œμ„ΈμŠ€ μ—λŸ¬ 감지λ₯Ό μœ„ν•œ Trap μ„€μ • +trap { + Write-Err "An unexpected error occurred during installation: $_" +} + +Main diff --git a/install-rmux.sh b/install-rmux.sh new file mode 100644 index 0000000..058559e --- /dev/null +++ b/install-rmux.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2086 + +# tmux의 ν˜„λŒ€μ μ΄κ³  λΉ λ₯Έ Rust 기반 λŒ€μ•ˆμΈ rmuxλ₯Ό μ„€μΉ˜ν•©λ‹ˆλ‹€. +# rmux: https://rmux.io +# +# 지원 ν”Œλž«νΌ: +# macOS & Linux + +set -euo pipefail + +# ──────────────────────────────────────────── +# μœ ν‹Έλ¦¬ν‹° ν•¨μˆ˜ (λͺ¨λ‘ stderr 좜λ ₯) +# ──────────────────────────────────────────── +info() { echo "[INFO] $*" >&2; } +warn() { echo "[WARN] $*" >&2; } +error() { echo "[ERROR] $*" >&2; exit 1; } +success() { echo "[OK] $*" >&2; } + +# ──────────────────────────────────────────── +# ν•„μˆ˜ λͺ…λ Ήμ–΄ 확인 +# ──────────────────────────────────────────── +for cmd in curl sh; do + command -v "$cmd" &>/dev/null || error "'$cmd' λͺ…λ Ήμ–΄κ°€ ν•„μš”ν•©λ‹ˆλ‹€. λ¨Όμ € μ„€μΉ˜ν•΄ μ£Όμ„Έμš”." +done + +# ──────────────────────────────────────────── +# 메인 μ„€μΉ˜ 둜직 +# ──────────────────────────────────────────── +main() { + info "rmux (tmux alternative in Rust) μ„€μΉ˜λ₯Ό μ‹œμž‘ν•©λ‹ˆλ‹€..." + + if command -v rmux &>/dev/null; then + local current_ver + current_ver="$(rmux --version 2>/dev/null || echo 'unknown')" + info "rmuxκ°€ 이미 μ„€μΉ˜λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€ ($current_ver). μ„€μΉ˜λ₯Ό κ±΄λ„ˆλœλ‹ˆλ‹€." + else + info "곡식 슀크립트λ₯Ό 톡해 rmuxλ₯Ό μ„€μΉ˜ν•˜λŠ” 쀑..." + if curl -fsSL https://rmux.io/install.sh | sh; then + success "rmux μ„€μΉ˜κ°€ μ„±κ³΅μ μœΌλ‘œ μ™„λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€!" + else + error "rmux μ„€μΉ˜ 슀크립트 μ‹€ν–‰ 쀑 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€." + fi + fi + + # μ„€μΉ˜ μ™„λ£Œ 검증 + if command -v rmux &>/dev/null; then + success "rmuxλ₯Ό μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€: $(command -v rmux)" + info "μ‹€ν–‰ λͺ…λ Ήμ–΄: rmux" + else + warn "rmuxκ°€ PATHμ—μ„œ κ²€μƒ‰λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 터미널을 λ‹€μ‹œ μ—΄κ±°λ‚˜ ν™˜κ²½ λ³€μˆ˜λ₯Ό 확인해 μ£Όμ„Έμš”." + fi +} + +main "$@"