backup: 2025-04-11

This commit is contained in:
Marsway 2025-04-11 00:16:33 +08:00
parent d31c43d3c0
commit 5fa314396e
126 changed files with 374 additions and 177 deletions

View File

@ -0,0 +1,29 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
version: "3"
services:
answer:
image: apache/answer
ports:
- '9080:80'
restart: on-failure
volumes:
- answer-data:/data
volumes:
answer-data:

View File

@ -1,11 +1,12 @@
brew "autossh"
brew "fish"
brew "fzf"
brew "go"
brew "htop"
brew "lazygit"
brew "lua"
brew "mackup"
brew "mas"
brew "mysql@8.4", restart_service: :changed
brew "neofetch"
brew "neovim"
brew "node"
@ -35,29 +36,29 @@ cask "flutter"
cask "font-jetbrains-mono"
cask "font-jetbrains-mono-nerd-font"
cask "font-maple-mono-nf-cn"
cask "ghostty"
cask "hammerspoon"
cask "kando"
cask "keka"
cask "kitty"
cask "lm-studio"
cask "lookaway"
cask "lunarbar"
cask "lyricsx"
cask "maccy"
cask "miniconda"
cask "obsidian"
cask "only-switch"
cask "orbstack"
cask "picgo"
cask "slack"
cask "snipaste"
cask "spacelauncher"
cask "spotify"
cask "syncalicious"
cask "tailscale"
cask "thor"
cask "trae"
cask "trae-cn"
cask "visual-studio-code"
cask "wezterm"
cask "wpsoffice-cn"
vscode "github.copilot"
vscode "github.copilot-chat"
vscode "kevinrose.vsc-python-indent"

View File

@ -1,19 +1,21 @@
[general]
live_config_reload = true
import = [
"~/.config/alacritty/theme-falcon.toml",
"~/.config/alacritty/keybinding.toml"
"~/.config/alacritty/theme.toml",
"~/.config/alacritty/keybindings.toml"
]
[terminal.shell]
program = "/opt/homebrew/bin/fish"
args = ["--login", "--command", "tmux new-session -A -D -s main"]
[window]
option_as_alt = "Both"
decorations = "Buttonless"
position = {x = 0, y = 0}
padding = {x=10, y=3}
dynamic_padding = true
dimensions = {columns=160, lines=25}
dimensions = {columns=200, lines=35}
#level = "AlwaysOnTop"
opacity = 0.8
blur = true
@ -28,10 +30,11 @@ hide_when_typing = true
draw_bold_text_with_bright_colors = false
[cursor]
style = {shape="Beam", blinking="Always"}
style = {shape="Underline", blinking="Always"}
thickness=0.0
[font]
size = 16.0
size = 13.0
#offset = {x=0, y=8}
glyph_offset = {x=0, y=0}
italic = {family = "JetBrainsMono Nerd Font", style = "Italic"}
@ -49,3 +52,4 @@ semantic_escape_chars = ''',│`|:"' ()[]{}<>'''
[debug]
#render_timer = true

View File

@ -1,46 +0,0 @@
# Key bindings
# A list with all available `key` names can be found here:
# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants
#
# Run "xxd -psd" to find hex codes of keys.
#
# Alacritty + Tmux key integratio
# `\x1c` is `C-\` as tmux prefix
# `\x1b` is `Esc`
[[keyboard.bindings]]
action = "SpawnNewInstance"
key = "N"
mods = "Command"
[[keyboard.bindings]]
chars = "\u001Bb"
key = "Left"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001Bf"
key = "Right"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001BOH"
key = "Left"
mode = "AppCursor"
mods = "Command"
[[keyboard.bindings]]
chars = "\u001BOF"
key = "Right"
mode = "AppCursor"
mods = "Command"
[[keyboard.bindings]]
chars = "\u0015"
key = "Back"
mods = "Command"
[[keyboard.bindings]]
chars = "\u001B\u007F"
key = "Back"
mods = "Alt"

View File

@ -0,0 +1,5 @@
#[keyboard]
#bindings = [
# # Clear the screen
# {"key" = "R", "mods" = "Option", "command" = "ToggleViMode" }
#]

View File

@ -1,33 +0,0 @@
# falcon colorscheme for alacritty
# by fenetikm, https//github.com/fenetikm/falcon
# Default colors
[colors.primary]
background = '#020221'
foreground = '#b4b4b9'
[colors.cursor]
text = '#020221'
cursor = '#ffe8c0'
# Normal colors
[colors.normal]
black = '#000004'
red = '#ff3600'
green = '#718e3f'
yellow = '#ffc552'
blue = '#635196'
magenta = '#ff761a'
cyan = '#34bfa4'
white = '#b4b4b9'
# Bright colors
[colors.bright]
black = '#020221'
red = '#ff8e78'
green = '#b1bf75'
yellow = '#ffd392'
blue = '#99a4bc'
magenta = '#ffb07b'
cyan = '#8bccbf'
white = '#f8f8ff'

View File

@ -0,0 +1,71 @@
# Nightfox Alacritty Colors
## name: duskfox
## upstream: https://github.com/edeneast/nightfox.nvim/raw/main/extra/duskfox/alacritty.toml
[colors.primary]
background = "#232136"
foreground = "#e0def4"
dim_foreground = "#cdcbe0"
bright_foreground = "#eae8ff"
[colors.cursor]
text = "#e0def4"
cursor = "#cdcbe0"
[colors.vi_mode_cursor]
text = "#e0def4"
cursor = "#9ccfd8"
[colors.search.matches]
foreground = "#e0def4"
background = "#63577d"
[colors.search.focused_match]
foreground = "#e0def4"
background = "#a3be8c"
[colors.footer_bar]
foreground = "#e0def4"
background = "#373354"
[colors.hints.start]
foreground = "#e0def4"
background = "#ea9a97"
[colors.hints.end]
foreground = "#e0def4"
background = "#373354"
[colors.selection]
text = "#e0def4"
background = "#433c59"
[colors.normal]
black = "#393552"
red = "#eb6f92"
green = "#a3be8c"
yellow = "#f6c177"
blue = "#569fba"
magenta = "#c4a7e7"
cyan = "#9ccfd8"
white = "#e0def4"
[colors.bright]
black = "#7d5ec1"
red = "#f083a2"
green = "#b1d196"
yellow = "#f9cb8c"
blue = "#65b1cd"
magenta = "#ccb1ed"
cyan = "#a6dae3"
white = "#e2e0f7"
[colors.dim]
black = "#322e42"
red = "#d84f76"
green = "#8aa872"
yellow = "#e6a852"
blue = "#4a869c"
magenta = "#a580d2"
cyan = "#7bb8c1"
white = "#b1acde"

View File

@ -1,7 +1,9 @@
function brew
command /bin/zsh -c "brew $argv"
echo "Updating Brewfile..."
command /bin/zsh -c "brew bundle dump --force --file=~/.config/Brewfile"
if contains -- "install" $argv; or contains -- "remove" $argv; or contains -- "uninstall" $argv;
echo "Updating Brewfile..."
command /bin/zsh -c "brew bundle dump --force --file=~/.config/Brewfile"
end
end
function brew_install
brew bundle --file="~/.config/Brewfile"

View File

@ -4,3 +4,7 @@ if status is-interactive
fish_add_path /opt/homebrew/bin
end
end
# Added by OrbStack: command-line tools and integration
# This won't be added again if you remove it.
source ~/.orbstack/shell/init2.fish 2>/dev/null || :

View File

@ -35,7 +35,7 @@ SETUVAR fish_pager_color_description:yellow\x1e\x2di
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR fish_user_paths:/opt/homebrew/bin
SETUVAR fish_user_paths:/opt/homebrew/opt/mysql\x408\x2e4/bin\x1e/opt/homebrew/bin
SETUVAR pure_begin_prompt_with_current_directory:true
SETUVAR pure_check_for_new_release:false
SETUVAR pure_color_at_sign:pure_color_mute

View File

@ -3,6 +3,6 @@ function p
# 如果参数中包含 -d
set -u all_proxy
else
set -x all_proxy "localhost:7897"
set -g all_proxy "localhost:7897"
end
end

@ -0,0 +1 @@
Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946

137
.config/tmux/tmux.conf Normal file
View File

@ -0,0 +1,137 @@
# Easy config reload
bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "tmux.conf reloaded"
# Plugins
setenv -g TMUX_PLUGIN_MANAGER_PATH '~/.tmux/plugins'
set -g @plugin 'seebi/tmux-colors-solarized'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tpm'
# For resurrect
# 自动备份时间间隔60min, 默认15min
set -g @continuum-save-interval '60'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
# Use vim keybindings in copy mode
#set-window-option -g mode-keys vi
set-option -g base-index 1
set-option -g renumber-windows on
set -g mouse on # 打开鼠标支持
set-option -g display-time 5000 # 提示信息的持续时间 设置足够的时间以避免看不清提示,单位为毫秒
set-option -g repeat-time 1000 # 控制台激活后的持续时间 避免每次操作都要先激活控制台,单位为毫秒
# auto window rename
set-option -g automatic-rename on
# tmux menu
bind-key A display-menu -x R -y P -T '#[align=centre fg=orange] Commands ' \
'Synchronize Panes' 's' 'set-window-option synchronize-panes' \
'Rename Tab' ',' 'command-prompt -I "#W" { rename-window "%%" }' \
'Run Tmux Command' ':' 'command-prompt'
# status bar
set-option -g status on
set-option -g status-interval 1
set-option -g status-position top
set-option -g status-justify left
set-option -g status-style none,fg=#a89984,bg=#3c3836
# status bar left
set-option -g status-left-length 100
set-option -g status-left-style none
set-option -g status-left '#[fg=#282828,bg=#a89984,nobold] #{E:@OS} Mars #S  #[fg=#a89984,bg=#262626,nobold]'
# status bar right
set-option -g status-right-length 150
set-option -g status-right-style none
set-option -g status-right '#[fg=#a89984,bg=#262626]#[fg=#282828,bg=#a89984] #{E:@GIT_BRANCH} #[fg=#a89984,bg=#a89984]#[fg=#3c3836]#[fg=#504945,bg=#3c3836]#[fg=#a89984,bg=#504945] #{E:@CPU}%% #[fg=#3c3836]#[fg=#a89984,bg=#504945]  %a %b %d #[fg=#3c3836] #[fg=#a89984,bg=#504945] %H:%M %p #[fg=#3c3836,bg=#504945]'
###{E:@IM}
# window bar style
set-option -g window-status-style 'fg=#3c3836,bg=#504945'
set-option -g window-status-current-style 'fg=#ebdbb2,bg=#49556a'
set-option -g window-status-activity-style 'fg=#3c3836,bg=#504945'
set-option -g window-status-format ' #[fg=#a89984] #I: #W #{?window_last_flag, ,}#{?window_activity_flag,#[fg=#d79921]'
set-option -g window-status-current-format ' #[fg=#ebdbb2] #I:#W #[fg=#689d6a]#{?window_zoomed_flag,,}'
set-option -g window-status-separator ''
set-option -ga terminal-features ',xterm-256color:RGB'
set-option -g default-terminal 'xterm-256color'
# pane border style
set-option -g pane-active-border-style fg='#fe8019'
set-option -g pane-border-style fg='#3c3836'
# mode style
set-option -g mode-style 'bg=brightblack,fg=white,noreverse'
# status variables format
if-shell 'test "$(uname)" = "Darwin"' {
set-option -g @OS ""
set-option -g @IM " #(defaults read ~/Library/Preferences/com.apple.HIToolbox.plist AppleCurrentKeyboardLayoutInputSourceID | awk -F. '{print $4}' | sed s/PinyinKeyboard/中/)"
set-option -g @CPU " #(iostat -c 2 disk0 | sed '/^\s*$/d' | tail -n 1 | awk '{usage=100-$6} END {print(usage)}' | sed 's/,/./')"
} {
set-option -g @OS ""
set-option -g @IM " #(whoami)#{?SSH_CLIENT,@#h,}"
set-option -g @CPU " #(vmstat 1 2 | tail -1 | awk '{usage=100-$15} END {print(usage)}' | sed 's/,/./')"
}
set-option -g @GIT_BRANCH " #(git -C #{pane_current_path} rev-parse --abbrev-ref HEAD || echo ' ')"
# Pane之间切换的快捷键
bind h select-pane -L # 定位到左边窗口的快捷键
bind j select-pane -D # 定位到上边窗口的快捷键
bind k select-pane -U # 定位到下方窗口的快捷键
bind l select-pane -R # 定位到右边窗口的快捷键
# 垂直分割窗格 (Control + D)
bind-key -n C-d split-window -h -c '#{pane_current_path}'
# 水平分割窗格 (Control + Return)
bind-key -n C-F split-window -v -c '#{pane_current_path}'
# 新建选项卡 (Command + T)
bind-key -n C-t new-window -c '#{pane_current_path}'
# 关闭窗格 (Command + W)
bind-key -n C-w kill-pane
# 关闭选项卡 (Command + Shift + W)
bind-key -n C-S-w kill-window
# detach 当前窗口
bind-key -n C-q detach-client
# 访问左边的窗格 (Command + H 或 Command + Left)
bind-key -n C-h select-pane -L
bind-key -n C-Left select-pane -L
# 访问上面的窗格 (Command + J 或 Command + Up)
bind-key -n C-j select-pane -U
bind-key -n C-Up select-pane -U
# 访问下面的窗格 (Command + K 或 Command + Down)
bind-key -n C-k select-pane -D
bind-key -n C-Down select-pane -D
# 访问右边的窗格 (Command + L 或 Command + Right)
bind-key -n C-l select-pane -R
bind-key -n C-Right select-pane -R
# 重命名 Window
bind-key -n C-n command-prompt -p "(rename-window)" "rename-window '%%'"
# 切换选项卡 (Command + 1 到 Command + 9)
bind-key -n M-1 select-window -t :=1
bind-key -n M-2 select-window -t :=2
bind-key -n M-3 select-window -t :=3
bind-key -n M-4 select-window -t :=4
bind-key -n M-5 select-window -t :=5
bind-key -n M-6 select-window -t :=6
bind-key -n M-7 select-window -t :=7
bind-key -n M-8 select-window -t :=8
bind-key -n M-9 select-window -t :=9
bind-key -n C-l send-keys C-l \;
# 切换到上一个选项卡 (Command + [)
bind-key -n C-[ previous-window
# 切换到下一个选项卡 (Command + ])
bind-key -n C-] next-window
### Run TPM Manger
run '~/.tmux/plugins/tpm/tpm'

View File

@ -0,0 +1,86 @@
# 修改默认Prefix
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
# Easy config reload
bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "tmux.conf reloaded"
# Plugins
setenv -g TMUX_PLUGIN_MANAGER_PATH '~/.tmux/plugins'
set -g @plugin 'seebi/tmux-colors-solarized'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tpm'
set -g mouse on # 打开鼠标支持
set-option -g display-time 5000 # 提示信息的持续时间 设置足够的时间以避免看不清提示,单位为毫秒
set-option -g repeat-time 1000 # 控制台激活后的持续时间 避免每次操作都要先激活控制台,单位为毫秒
set-option -g status-keys vi # 操作状态栏时的默认键盘布局可以设置为vi或emacs
# 此类设置可以在命令行模式中输入show-window-options -g查询
set-window-option -g mode-keys vi # 复制模式中的默认键盘布局可以设置为vi或emacs
###
set-option -g status-bg blue
set-option -g status-fg '#bbbbbb'
set-option -g status-left-length 10 # 状态栏左方的内容长度;
set-option -g status-right-length 15 # 状态栏右方的内容长度;建议把更多的空间留给状态栏左方(用于列出当前窗口)
set-option -g status-left '[#(whoami)]' # 状态栏左方的内容
set-option -g status-right '[#(date +" %m-%d %H:%M ")]' # 状态栏右方的内容这里的设置将得到类似23:59的显示
set-option -g status-justify "centre" # 窗口列表居中显示
set-option -g default-terminal "screen-256color" # 支持256色显示
# Pane之间切换的快捷键
bind h select-pane -L # 定位到左边窗口的快捷键
bind j select-pane -D # 定位到上边窗口的快捷键
bind k select-pane -U # 定位到下方窗口的快捷键
bind l select-pane -R # 定位到右边窗口的快捷键
# 垂直分割窗格 (Command + D)
bind-key -n C-d split-window -h
# 水平分割窗格 (Command + Return)
bind-key -n C-Return split-window -v
# 新建选项卡 (Command + T)
bind-key -n C-t new-window
# 关闭窗格 (Command + W)
bind-key -n C-w kill-pane
# 关闭选项卡 (Command + Shift + W)
bind-key -n C-S-w kill-window
# detach 当前窗口
bind-key -n C-q detach-client
# 访问左边的窗格 (Command + H 或 Command + Left)
bind-key -n C-h select-pane -L
bind-key -n C-Left select-pane -L
# 访问上面的窗格 (Command + J 或 Command + Up)
bind-key -n C-j select-pane -U
bind-key -n C-Up select-pane -U
# 访问下面的窗格 (Command + K 或 Command + Down)
bind-key -n C-k select-pane -D
bind-key -n C-Down select-pane -D
# 访问右边的窗格 (Command + L 或 Command + Right)
bind-key -n C-l select-pane -R
bind-key -n C-Right select-pane -R
# 切换选项卡 (Command + 1 到 Command + 9)
bind-key -n M-1 select-window -t :=1
bind-key -n M-2 select-window -t :=2
bind-key -n M-3 select-window -t :=3
bind-key -n M-4 select-window -t :=4
bind-key -n M-5 select-window -t :=5
bind-key -n M-6 select-window -t :=6
bind-key -n M-7 select-window -t :=7
bind-key -n M-8 select-window -t :=8
bind-key -n M-9 select-window -t :=9
# 切换到上一个选项卡 (Command + [)
bind-key -n C-[ previous-window
# 切换到下一个选项卡 (Command + ])
bind-key -n C-] next-window
### Run TPM Manger
run '~/.tmux/plugins/tpm/tpm'

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.DS_Store

6
.gitmodules vendored
View File

@ -1,9 +1,3 @@
[submodule "scripts/z.lua"]
path = scripts/z.lua
url = https://github.com/skywind3000/z.lua.git
[submodule ".config/alacritty/themes"]
path = .config/alacritty/themes
url = https://github.com/alacritty/alacritty-theme.git
[submodule ".bin/z.lua"]
path = .bin/z.lua
url = https://github.com/skywind3000/z.lua.git

View File

@ -1,9 +1,9 @@
.git
mackup
.DS_Store
.sync
aliases
install.sh
scripts
README.md
Brewfile
install

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>localizedName</key>
<string>Marsway-Air</string>
<key>name</key>
<string>marsway-air.local</string>
<key>state</key>
<string>Turned off</string>
</dict>
</plist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

Some files were not shown because too many files have changed in this diff Show More