Skip to content

Mac

软件推荐

  • Pixelmator Pro,图片处理

配置

Alacritty

安装 fish shell, homebrew

写入 ~/.config/fish/conf.d/a.fish

sh
set fish_greeting
set LANG zh_CN.UTF-8

export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.bfsu.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.bfsu.edu.cn/git/homebrew/homebrew-core.git"
export HOMEBREW_API_DOMAIN="https://mirrors.bfsu.edu.cn/homebrew-bottles/api"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.bfsu.edu.cn/homebrew-bottles"

写入 ~/.config/alacritty/alacritty.toml

toml
[general]
working_directory = "/Users/elaina/Desktop"

[window]
dimensions = { columns = 150, lines = 45 }
padding = { x = 5, y = 5 }
opacity = 0.95

[font]
size = 12.5
normal = { family = "SF Mono", style = "Regular" }

[cursor]
style = { shape = "Beam", blinking = "Off" }

[terminal]
shell = { program = "/opt/homebrew/bin/fish", args = ["--login"] }

# theme: ashes_dark

[colors.primary]
background = '#1c2023'
foreground = '#c7ccd1'

[colors.cursor]
text = '#1c2023'
cursor = '#c7ccd1'

[colors.normal]
black   = '#1c2023'
red     = '#c7ae95'
green   = '#95c7ae'
yellow  = '#aec795'
blue    = '#ae95c7'
magenta = '#c795ae'
cyan    = '#95aec7'
white   = '#c7ccd1'

[colors.bright]
black   = '#747c84'
red     = '#c7ae95'
green   = '#95c7ae'
yellow  = '#aec795'
blue    = '#ae95c7'
magenta = '#c795ae'
cyan    = '#95aec7'
white   = '#f3f4f5'

常见问题 Q&A

  • Q:如何在访达的 右键-服务菜单 添加 “在 Alacritty 中打开”
  1. 打开 自动操作.app - 新建文稿 - 快速操作
  2. 顶部参数,工作流收到当前:文件夹,位于:访达.app
  3. 左侧搜索框输入 AppleScript,找到 运行 AppleScript 拖拽到右侧工作流区域
  4. 写入以下内容,按 cmd+s 保存,命名为 在 Alacritty 中打开
sh
on run {input, parameters}
    tell application "Finder"
        set _path to POSIX path of (input as text)
        do shell script "/Applications/Alacritty.app/Contents/MacOS/alacritty --working-directory " & quoted form of _path & " > /dev/null 2>&1 &"
    end tell
    return input
end run
  • Q:Spotlight 搜不到文件

用 mdfind 命令搜

sh
mdfind -name "com.tencent.Lemon.trash.plist"
  • Q:访达显示隐藏文件
sh
defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder
  • Q:网络磁盘中关闭生成 .DS_Store 文件
sh
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
  • Q:允许安装所有来源的软件
sh
sudo spctl --master-disable
  • Q:只安装 Command Line Tools 环境,不安装 xcode
sh
xcode-select --install
  • Q:打开软件总提示授予访问权限

先退出软件,打开【设置-安全性与隐私】,在相应的软件下面点击 - 删除,再次打开软件给予权限

  • Q:重置某个 app 的全部隐私权限
sh
mdls -name kMDItemCFBundleIdentifier /Applications/app.app
tccutil reset All com.navicat.NavicatPremium
  • Q:删除某个登陆项

通常位于以下几个目录

~/Library/LaunchAgents
/Library/LaunchAgents
/Library/LaunchDaemons