설치
brew install iterm2
설치 후 iTerm2 실행
oh my zsh 설치
sh -c "$(curl -fsSL <https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh>)"
설치 후 iTerm2 재실행
테마 설치 1
git clone --depth=1 <https://github.com/romkatv/powerlevel10k.git> ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
설치 후 iTerm2 재실행
git clone <https://github.com/romkatv/powerlevel10k.git> $ZSH_CUSTOM/themes/powerlevel10k
설치 후 iTerm2 재실행
테마 변경
nano ~/.zshrc
위 명령어로 ~/.zshrc 파일을 열어서 아래 텍스트를 추가
ZSH_THEME="powerlevel10k/powerlevel10k"
기존꺼는 #을 붙여 주석 처리하고 그 아래 위의 텍스트를 추가합니다.
iterm2를 재실행 하면 테마를 설정하는 메뉴를 진행하며 자신에게 맞는 테마를 맞춰 가면 됩니다.
폰트 다운 받고, 모양을 선택합니다.
설정을 이미 했으나 재설정을 하고 싶은 경우 아래의 명령어를 입력합니다.
p10k configure
zsh-syntax-highlighting 설치
zsh-users/zsh-syntax-highlighting
git clone <https://github.com/zsh-users/zsh-syntax-highlighting.git>
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
Alfred를 설치한 경우 터미널 우순 순위로 만들기
vitorgalvao/custom-alfred-iterm-scripts
-- For the latest version:
-- <https://github.com/vitorgalvao/custom-alfred-iterm-scripts>
-- Set this property to true to always open in a new window
property open_in_new_window : false
-- Handlers
on new_window()
tell application "iTerm" to create window with default profile
end new_window
on new_tab()
tell application "iTerm" to tell the first window to create tab with default profile
end new_tab
on call_forward()
tell application "iTerm" to activate
end call_forward
on is_running()
application "iTerm" is running
end is_running
on has_windows()
if not is_running() then return false
if windows of application "iTerm" is {} then return false
true
end has_windows
on send_text(custom_text)
tell application "iTerm" to tell the first window to tell current session to write text custom_text
end send_text
-- Main
on alfred_script(query)
if has_windows() then
if open_in_new_window then
new_window()
else
new_tab()
end if
else
-- If iTerm is not running and we tell it to create a new window, we get two
-- One from opening the application, and the other from the command
if is_running() then
new_window()
else
call_forward()
end if
end if
-- Make sure a window exists before we continue, or the write may fail
repeat until has_windows()
delay 0.01
end repeat
send_text(query)
call_forward()
end alfred_script
Application
to Custom
.