Common Aliases
发布时间:
在这里记录一些我常用的配置文件
zshrc
alias htop='sudo htop'
alias dmsg='sudo dmesg'
alias sush='sudo sh'
alias dmsw="sudo dmesg -w"
alias gdb="sudo pwndbg"
alias nverr="sudo nvme error-log /dev/nvme0n1 -e 1"
alias setfreq="echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor"
alias subsed="sed -i "s/https:\/\/github.com\//git@github.com:/g" $(find . -name ".gitmodules")"
starship
format = """
[\ue0ba](#E8F4FD)\
$os\
[\ue0c6](fg:#E8F4FD bg:#B3D9FF)\
$username\
[\ue0c6](bg:#87CEEB fg:#B3D9FF)\
$directory\
[](fg:#87CEEB bg:#4682B4)\
$git_branch\
$git_status\
[](fg:#4682B4 bg:#1E90FF)\
$c\
$cpp\
$golang\
$python\
$rust\
[](fg:#1E90FF)\
"""
right_format = """
[\ue0be](fg:#0000CD)\
$time\
[\ue0b8](fg:#0000CD)\
"""
# Disable the blank line at the start of the prompt
add_newline = false
# Username module
[username]
show_always = true
style_user = "bg:#B3D9FF fg:#2F2F2F"
style_root = "bg:#0000CD fg:#FFFFFF"
format = '[ $user ]($style)'
disabled = false
# OS module - show Archlinux
[os]
style = "bg:#E8F4FD fg:#2F2F2F"
format = '[ ]($style)'
disabled = false
[directory]
style = "bg:#87CEEB fg:#2F2F2F"
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
# Directory substitutions with nerd font icons
[directory.substitutions]
"Documents" = " "
"Downloads" = " "
"Music" = " "
"Pictures" = " "
"Videos" = " "
"Desktop" = " "
"Public" = " "
"Templates" = " "
# C language module
[c]
symbol = " "
style = "bg:#1E90FF fg:#FFFFFF"
format = '[ $symbol ($version) ]($style)'
# C++ language module
[cpp]
symbol = " "
style = "bg:#1E90FF fg:#FFFFFF"
format = '[ $symbol ($version) ]($style)'
# Docker context module
[docker_context]
symbol = " "
style = "bg:#0000CD fg:#FFFFFF"
format = '[ $symbol $context ]($style)'
# Git branch module
[git_branch]
symbol = ""
style = "bg:#4682B4 fg:#FFFFFF"
format = '[ $symbol $branch ]($style)'
# Git status module
[git_status]
style = "bg:#4682B4 fg:#FFFFFF"
format = '[$all_status$ahead_behind ]($style)'
# Go language module
[golang]
symbol = " "
style = "bg:#1E90FF fg:#FFFFFF"
format = '[ $symbol ($version) ]($style)'
# Rust language module
[rust]
symbol = ""
style = "bg:#1E90FF fg:#FFFFFF"
format = '[ $symbol ($version) ]($style)'
[python]
symbol = ""
style = "bg:#1E90FF fg:#FFFFFF"
format = '[ $symbol (${virtualenv}) ]($style)'
# Time module - moved to right side
[time]
disabled = false
time_format = "%H:%M"
style = "bg:#0000CD fg:#FFFFFF"
format = '[ $time ]($style)'
vscode
{
"workbench.colorTheme": "Monokai Pro (Filter Machine)",
"editor.fontSize": 14,
"editor.fontFamily": "'SauceCodePro Nerd Font Mono', 'ComicShannsMono Nerd Font Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontWeight": "normal",
"files.autoSave": "onFocusChange",
"terminal.integrated.fontFamily": "'ComicShannsMono Nerd Font Mono'",
"terminal.integrated.fontSize": 13,
"workbench.iconTheme": "Monokai Pro (Filter Machine) Icons",
"git.enableSmartCommit": true,
"diffEditor.ignoreTrimWhitespace": false,
"makefile.configureOnOpen": false,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modifications",
"extensions.ignoreRecommendations": true,
"[c]": {
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
}
}
