Các cấu hình hay dùng cho macOS

Xác thực sudo bằng Touch ID

Đăng nhập vào user root:

sudo su -

Sửa tập tin /etc/pam.d/sudo.Thêm dòng sau vào đầu tiên:

auth       sufficient     pam_tid.so

Brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

iTerm

brew cask install iterm2

Cấu hình:


General
  Closing
    Confirm Quit: OFF
Appearance
  General
    Exclude iTerm2 from the dock and from the ⌘-Tab app switcher: ON
  Panes
    Show per-pane title bar with split panes OFF
  Dimming
    Dimming affects only text, not background OFF
Profiles
  Text
    Use thin stroke for anti-aliased text: Width Dark Backfgrounds
    Enable subpixel anti-asilasing: ON
  Window
    Setting for New Windowns
      Style: Full-Height Left
Keys
  Hotkey
    Show/hide all windows with a system-wide hotkey: ON
    Hotkey: ⌃⌥⇧F12

Advanced
  Session
    Allow sessions to survive logging out and back in: OFF # to enable TouchID Auth

ZSH

brew install zsh
brew install oh-my-zsh
npm install --global pure-prompt

Aria2

brew install aria2

Finder

defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
defaults write com.apple.screencapture disable-shadow -bool true

TextEdit

defaults write com.apple.TextEdit RichText -int 0

Un-Googled Chromium

brew cask install eloston-chromium
chrome://flags/#allow-insecure-localhost Enable

Choromium Based Browsers

defaults write com.google.Chrome NSRequiresAquaSystemAppearance -bool Yes
defaults write org.chromium.Chromium NSRequiresAquaSystemAppearance -bool Yes 

Fonts

brew tap colindean/fonts-nonfree
brew cask install font-microsoft-office
brew tap caskroom/fonts
brew cask install font-open-sans

Tmux

# Start copy mode when scrolling up
set -g mouse on

# setting default termina
set -g default-terminal "screen-256color"

# setting default status-bar
#set -g status-fg black
#set -g status-bg white
#set -g status-left "#[fg=green]:#S"
#set -g status-utf8 on
set -g status-interval 60
setw -g monitor-activity on
set -g visual-activity on

# setting for windows in status-bar color
#setw -g window-status-fg cyan
#setw -g window-status-bg default
#setw -g window-status-attr dim
#setw -g window-status-current-fg white
#setw -g window-status-current-bg red
#setw -g window-status-current-attr bright

# setting for divider-pane color
#set -g pane-border-fg green
#set -g pane-border-bg black
#set -g pane-active-border-fg white
#set -g pane-active-border-bg black

# setting for command-line color
#set -g message-fg white
#set -g message-bg black
#set -g message-attr bright

# remap PREFIX key stroke
set -g prefix C-a
unbind C-b
bind C-a send-prefix

# change the default delay
set -sg escape-time 1

# change the base index
set -g base-index 0
set -g pane-base-index 0
set -g renumber-windows on

# setting for the mouse
#set -g mode-mouse on
#set -g mouse-select-pane on
#set -g mouse-resize-pane  on
#set -g mouse-select-window on
#bind -n WheelUpPane if "[[ #{pane_current_command} =~ vim ]]" "select-pane -t = ; send-keys -M" "select-pane -t = ; send-keys Up"
#bind -n WheelDownPane if "[[ #{pane_current_command} =~ vim ]]" "select-pane -t = ; send-keys -M" "select-pane -t = ; send-keys Down"

# bind addition shotcut
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind-key -r P swap-window -t -1
bind-key -r N swap-window -t +1
bind | split-window -h
bind - split-window -v
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind-key x      kill-pane
bind-key X      kill-window

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *