Dotfiles, init scripts, etc, for now, it includes macOS, and Debian (my VPS), you shouldn't use it directly, cause it contains many personal habits, but you do can get some inspiratiions from it.
I use raw shell scripts to install apps, and YAMLScript for linking dotfiles or using template to copy template dotfile to the dest location, Keepassxc for password manager, tmux for window manager, Alacritty for terminal, helix and kakoune for modal editor. alfred for translation, calculate, launch center, workflow. navi for cheatsheets
├── blog
|── dotfiles
│ ├── private
├── inbox
├── repos
├── syncing
dotfiles
for all env related stuffs.inbox
for all temp things, like temp run repos from Github.repos
for all personal repos.syncing
for all other settings that does not have a decent dotfiles, but still need to backup. So if I want to reflush my sytem, I need to backup this folder.
I really
├── modules
│ └── zsh
│ ├── change_zsh_as_default_shell_debian.sh
│ ├── files
│ │ ├── alias_debian.zsh
│ │ ├── general_config.zsh
│ │ ├── includes
│ │ │ ├── 3_function.zsh
│ │ │ ├── 4_aliases.zsh
│ │ │ ├── 5_fzf_keybinding.zsh
│ │ │ ├── 6_fzf_completion.zsh
│ │ │ ├── 7_git_prompt.zsh
│ │ │ └── 8_ssh_zsh_completion.zsh
│ │ ├── global.zsh
│ │ ├── path_ubuntu.zsh
│ │ └── zshrc.zsh
│ ├── install_zsh_debian.sh
│ └── zsh.yml
├── private
│ ├── keepassxc
│ │ ├── dev.kdbx
│ │ ├── high.kdbx
│ │ └── main.kdbx
│ ├── ssh
│ │ ├── files
│ │ │ ├── config
│ │ │ └── id_ed25519.pub
│ │ └── ssh.yml
└── scripts
├── 0_install_pre_required_modules_for_debian.sh
├── 0_install_pre_required_modules_for_macos.sh
├── 1_configure_macos.sh
├── 1_install_required_modules_for_debian.sh
├── 2_import_dotfiles_debian.sh
├── 2_install_required_modules_macos.sh
├── 3_import_dotfiles_macos.sh
├── 4_install_modules_macos.sh
├── import_ssh_key.sh
├── import_temp_env.sh
├── link.sh
├── test.sh
└── unlink.sh
modules
for all apps, every app should contains an install script, and optionalfiles
folder, andapp.ys.yml
for YAMLScript.
private
for private data, I sync it to a github private repo, inlucde keepassxc encrypted file, and other personal file. Though it's a individual repo, I still clone it indotfiles
folder, and ignore it in.gitignore
, cause it's convenient to apply changes.
scripts
for common shell script, so ideally, I can use a few script to bootstrap my new environment.
make link
: link or copy all dotfiles to the right placemake unlink
: unlink all things.make backup
: backup qBittorrent.conf to dotfiles source, cause you may change the qbittorrent settings from web ui, and qBittorrent run with podman, the qBittorrent.conf file permission does not allow to link.li
: short for./scripts/link.sh
,but a lot convinience, for example:li
for apply current module's dotfiles.li all
, apply all.li module_name
, apply module's dotfiles whatever your current work direction.
xcode-select --install
first we will use the git https url, then we settle sshkey down, we'll change it to ssh url.
git clone https://github.com/theowenyoung/dotfiles.git ~/dotfiles
Then, clone the private repo, should get
github personal_token first, private will
be placed in ~/dotfiles
, considered more convinient.
cd dotfiles
git clone https://theowenyoung:<token>@github.com/theowenyoung/private.git ~/dotfiles/private
./modules/macos/configure_macos.sh
./scripts/2_install_required_modules_macos.sh
./scripts/3_import_dotfiles_macos.sh
source ~/.zshrc
cd ~/dotfiles
./modules/foo/install_foo_macos.sh
Move Terminal, Activity Monitor, Quick Time Player to the top. Move anything that Don't need to the Other Folder.
Settings -> Keyboard -> Input Sources
Settings -> Keyboard -> Shortcuts
open alacritty.app -> hyper+a
open keepassxc -> hyper+p
open mail -> hyper+m
open edge -> hyper+e
open system preferences -> hyper+s
open vscode -> hyper+v
ssh to the machine(force use password, consider it's a new machine):
ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no root@ip
This should be run as root:
# sudo su - root
wget -qO- https://dotfiles.owenyoung.com/scripts/0_install_pre_required_modules_for_debian.sh | bash
or, if you need to create normal user:
wget -qO- https://dotfiles.owenyoung.com/scripts/0_install_pre_required_modules_for_debian.sh | bash -s -- --create
This will install keepassxc,git,zsh,curl,build-essential and create normal user
green
with sudo privileges.
first we will use the git https url, then we settle sshkey down, we'll change it to ssh url.
git clone https://github.com/theowenyoung/dotfiles.git ~/dotfiles
Then, clone the private repo, should get
github personal_token first, private will
be placed in ~/dotfiles
, considered more convinient.
git clone https://theowenyoung:<token>@github.com/theowenyoung/private.git ~/dotfiles/private
./root/clash/install_clash_premium_debian.sh
cd ~/dotfiles
# first unlink all things
./scripts/unlink.sh
./scripts/1_install_required_modules_for_debian.sh
source ~/.zshrc
./scripts/2_import_dotfiles_debian.sh
INIT=true ./scripts/link.sh sshd
Password Manager
# high level password
high.kdbx
# most password
main.kdbx
# dev related password, like api token, personal token.
dev.kdbx
Alfred config is so messed, so I make the alfred syncing folder to
~/syncing/alfred
, then mamual to set it up.
Hot Key: Disable system Hot Key: Spotlight Hot Key, in Keyboard shortcut settings.
Also, the other alternative like alacritty or wezterm, they have their own problem. iterm2 still is the most convinient one.
Gruvbox theme: https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Gruvbox%20Dark.itermcolors Option -> Esc+ Startup style: Full Screen
Gruvbox theme: https://github.com/morhetz/gruvbox-contrib/blob/master/osx-terminal/Gruvbox-dark.terminal Option as meta Window Size: 300 100
- YoudaoTranslator - Release
- alfred open with vscode workflow - trigger key: v to search
./modules/alfred/install_alfred_workflows.sh
This will install the following workflows:
See qmk readme
It sucks of oracle cloud security rules, see question to enable oracle cloud access.
You need to manual open port:
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 443 -j ACCEPT
sudo netfilter-persistent save
sudo vi /etc/systemd/logind.conf
HandleLidSwitch=ignore
sudo systemctl restart systemd-logind
./scripts/traceroute.sh <ip>
current:
sysctl net.ipv4.tcp_available_congestion_control
aws linux:
sudo modprobe tcp_bbr
sudo modprobe sch_fq
sudo sysctl -w net.ipv4.tcp_congestion_control=bbr
forever:
echo "tcp_bbr" | sudo tee -a /etc/modules-load.d/modules.conf
echo "net.core.default_qdisc=fq" | sudo tee -a /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
sysctl net.ipv4.tcp_congestion_control