{"id":13618294,"url":"https://github.com/theowenyoung/dotfiles","last_synced_at":"2025-05-06T21:49:10.787Z","repository":{"id":41099109,"uuid":"508245856","full_name":"theowenyoung/dotfiles","owner":"theowenyoung","description":"dotfiles, init scripts, common scripts","archived":false,"fork":false,"pushed_at":"2024-01-13T23:30:59.000Z","size":16140,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T03:22:21.631Z","etag":null,"topics":["acme","alacritty","alfred","alfred-workflows","broot","comtrya","debian","dotfiles","git","helix","keepassxc","kekoune","macos","qmk","redox","tmux","vscode","workflows","yamlscript","zsh"],"latest_commit_sha":null,"homepage":"https://www.owenyoung.com/en/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theowenyoung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-28T10:03:05.000Z","updated_at":"2025-03-15T21:29:21.000Z","dependencies_parsed_at":"2024-08-01T20:47:08.829Z","dependency_job_id":null,"html_url":"https://github.com/theowenyoung/dotfiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theowenyoung%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theowenyoung%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theowenyoung%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theowenyoung%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theowenyoung","download_url":"https://codeload.github.com/theowenyoung/dotfiles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252776494,"owners_count":21802463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acme","alacritty","alfred","alfred-workflows","broot","comtrya","debian","dotfiles","git","helix","keepassxc","kekoune","macos","qmk","redox","tmux","vscode","workflows","yamlscript","zsh"],"created_at":"2024-08-01T20:01:57.933Z","updated_at":"2025-05-06T21:49:10.765Z","avatar_url":"https://github.com/theowenyoung.png","language":"Shell","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Dotfiles\n\nDotfiles, init scripts, etc, for now, it includes macOS, and Debian (my VPS),\nyou shouldn't use it directly, cause it contains many personal habits, but you\ndo can get some inspiratiions from it.\n\nI use raw shell scripts to install apps, and\n[YAMLScript](https://github.com/yamlscript/yamlscript) for linking dotfiles or\nusing template to copy template dotfile to the dest location,\n[Keepassxc](https://github.com/keepassxreboot/keepassxc) for password manager,\n[tmux](https://github.com/tmux/tmux) for window manager,\n[Alacritty](https://github.com/alacritty/alacritty) for terminal,\n[helix](https://github.com/helix-editor/helix) and\n[kakoune](https://github.com/mawww/kakoune) for modal editor.\n[alfred](https://www.alfredapp.com/) for translation, calculate, launch center,\nworkflow. [navi](https://github.com/denisidoro/navi) for cheatsheets\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [MacOS Init](#macos-init)\n- [Debian Init](#debian-init)\n- [Apps Notes](#apps-notes)\n\n## Introduction\n\n### Home Structure\n\n```bash\n├── blog\n|── dotfiles\n│   ├── private\n├── inbox\n├── repos\n├── syncing\n```\n\n\u003e `dotfiles` for all env related stuffs. `inbox` for all temp things, like temp\n\u003e run repos from Github. `repos` for all personal repos. `syncing` for all other\n\u003e settings that does not have a decent dotfiles, but still need to backup. So if\n\u003e I want to reflush my sytem, I need to backup this folder.\n\nI really\n\n### Dotfile Structure:\n\n```bash\n├── modules\n│   └── zsh\n│       ├── change_zsh_as_default_shell_debian.sh\n│       ├── files\n│       │   ├── alias_debian.zsh\n│       │   ├── general_config.zsh\n│       │   ├── includes\n│       │   │   ├── 3_function.zsh\n│       │   │   ├── 4_aliases.zsh\n│       │   │   ├── 5_fzf_keybinding.zsh\n│       │   │   ├── 6_fzf_completion.zsh\n│       │   │   ├── 7_git_prompt.zsh\n│       │   │   └── 8_ssh_zsh_completion.zsh\n│       │   ├── global.zsh\n│       │   ├── path_ubuntu.zsh\n│       │   └── zshrc.zsh\n│       ├── install_zsh_debian.sh\n│       └── zsh.yml\n├── private\n│   ├── keepassxc\n│   │   ├── dev.kdbx\n│   │   ├── high.kdbx\n│   │   └── main.kdbx\n│   ├── ssh\n│   │   ├── files\n│   │   │   ├── config\n│   │   │   └── id_ed25519.pub\n│   │   └── ssh.yml\n└── scripts\n    ├── 0_install_pre_required_modules_for_debian.sh\n    ├── 0_install_pre_required_modules_for_macos.sh\n    ├── 1_configure_macos.sh\n    ├── 1_install_required_modules_for_debian.sh\n    ├── 2_import_dotfiles_debian.sh\n    ├── 2_install_required_modules_macos.sh\n    ├── 3_import_dotfiles_macos.sh\n    ├── 4_install_modules_macos.sh\n    ├── import_ssh_key.sh\n    ├── import_temp_env.sh\n    ├── link.sh\n    ├── test.sh\n    └── unlink.sh\n```\n\n\u003e `modules` for all apps, every app should contains an install script, and\n\u003e optional `files` folder, and `app.ys.yml` for\n\u003e [YAMLScript](https://github.com/yamlscript/yamlscript).\n\u003e\n\u003e `private` for private data, I sync it to a github private repo, inlucde\n\u003e keepassxc encrypted file, and other personal file. Though it's a individual\n\u003e repo, I still clone it in `dotfiles` folder, and ignore it in `.gitignore`,\n\u003e cause it's convenient to apply changes.\n\u003e\n\u003e `scripts` for common shell script, so ideally, I can use a few script to\n\u003e bootstrap my new environment.\n\n### Common Commands\n\n1. `make link`: link or copy all dotfiles to the right place\n2. `make unlink`: unlink all things.\n3. `make backup`: backup qBittorrent.conf to dotfiles source, cause you may\n   change the qbittorrent settings from web ui, and qBittorrent run with podman,\n   the qBittorrent.conf file permission does not allow to link.\n4. `li`: short for `./scripts/link.sh`,but a lot convinience, for example: `li`\n   for apply current module's dotfiles. `li all`, apply all. `li module_name`,\n   apply module's dotfiles whatever your current work direction.\n\n## MacOS Init\n\n### 0. Install xcode command line tools\n\n```bash\nxcode-select --install\n```\n\n### 1. Clone dotfiles repo and private dotfiles repo\n\n\u003e first we will use the git https url, then we settle sshkey down, we'll change\n\u003e it to ssh url.\n\n```bash\ngit clone https://github.com/theowenyoung/dotfiles.git ~/dotfiles\n```\n\nThen, clone the private repo, should get\n[github personal_token](https://github.com/settings/tokens) first, private will\nbe placed in `~/dotfiles`, considered more convinient.\n\n```bash\ncd dotfiles\ngit clone https://theowenyoung:\u003ctoken\u003e@github.com/theowenyoung/private.git ~/dotfiles/private\n```\n\n### 2. Config macos\n\n```bash\n./modules/macos/configure_macos.sh\n```\n\n### 3. Install required apps\n\n```bash\n./scripts/2_install_required_modules_macos.sh\n```\n\n### 4. Import Dotfiles\n\n```bash\n./scripts/3_import_dotfiles_macos.sh\nsource ~/.zshrc\n```\n\n### 5. Install Other Apps You need by shell\n\n```bash\ncd ~/dotfiles\n./modules/foo/install_foo_macos.sh\n```\n\n### 6. Resort pre-installed Apps\n\nMove Terminal, Activity Monitor, Quick Time Player to the top. Move anything\nthat Don't need to the Other Folder.\n\n### 7. Add Input Source if needed\n\nSettings -\u003e Keyboard -\u003e Input Sources\n\n### 8. Addition settings\n\nSettings -\u003e Keyboard -\u003e Shortcuts\n\n```bash\nopen alacritty.app -\u003e hyper+a\nopen keepassxc -\u003e hyper+p\nopen mail -\u003e hyper+m\nopen edge -\u003e hyper+e\nopen system preferences -\u003e hyper+s\nopen vscode -\u003e hyper+v\n```\n\n## Deiban Init\n\nssh to the machine(force use password, consider it's a new machine):\n\n```bash\nssh -o PreferredAuthentications=password -o PubkeyAuthentication=no root@ip\n```\n\n### 0. Install Pre Required Modules\n\nThis should be run as root:\n\n```bash\n# sudo su - root\nwget -qO- https://dotfiles.owenyoung.com/scripts/0_install_pre_required_modules_for_debian.sh | bash\n```\n\nor, if you need to create normal user:\n\n```bash\nwget -qO- https://dotfiles.owenyoung.com/scripts/0_install_pre_required_modules_for_debian.sh | bash -s -- --create\n```\n\n\u003e This will install keepassxc,git,zsh,curl,build-essential and create normal\n\u003e user `green` with sudo privileges.\n\n### 2. Clone dotfiles repo and private dotfiles repo\n\n\u003e first we will use the git https url, then we settle sshkey down, we'll change\n\u003e it to ssh url.\n\n```bash\ngit clone https://github.com/theowenyoung/dotfiles.git ~/dotfiles\n```\n\nThen, clone the private repo, should get\n[github personal_token](https://github.com/settings/tokens) first, private will\nbe placed in `~/dotfiles`, considered more convinient.\n\n```bash\ngit clone https://theowenyoung:\u003ctoken\u003e@github.com/theowenyoung/private.git ~/dotfiles/private\n```\n\n### 2.1 Install clash for proxy if needed\n\n```bash\n./root/clash/install_clash_premium_debian.sh\n```\n\n### 3. Install required Apps\n\n```bash\ncd ~/dotfiles\n# first unlink all things\n./scripts/unlink.sh\n./scripts/1_install_required_modules_for_debian.sh\nsource ~/.zshrc\n```\n\n### 4.Import dotfiles\n\n```bash\n./scripts/2_import_dotfiles_debian.sh\n```\n\n### 5. Change sshd config(only once)\n\n```bash\nINIT=true ./scripts/link.sh sshd\n```\n\n## Apps Notes\n\n### Keepassxc\n\nPassword Manager\n\n```zsh\n# high level password\nhigh.kdbx\n# most password\nmain.kdbx\n# dev related password, like api token, personal token.\ndev.kdbx\n```\n\n### Alfred\n\nAlfred config is so messed, so I make the alfred syncing folder to\n`~/syncing/alfred`, then mamual to set it up.\n\nHot Key: \u003ccmd\u003e\u003cspace\u003e Disable system Hot Key: Spotlight Hot Key, in Keyboard\nshortcut settings.\n\n### iterm2\n\nAlso, the other alternative like alacritty or wezterm, they have their own\nproblem. iterm2 still is the most convinient one.\n\nGruvbox theme:\n\u003chttps://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Gruvbox%20Dark.itermcolors\u003e\nOption -\u003e Esc+ Startup style: Full Screen\n\n### Terminal\n\nGruvbox theme:\nhttps://github.com/morhetz/gruvbox-contrib/blob/master/osx-terminal/Gruvbox-dark.terminal\nOption as meta Window Size: 300 100\n\n#### Workflows\n\n##### Manual Download\n\n- [YoudaoTranslator](https://github.com/wensonsmith/YoudaoTranslator) -\n  [Release](https://github.com/wensonsmith/YoudaoTranslator/releases)\n- [alfred open with vscode workflow](https://github.com/alexchantastic/alfred-open-with-vscode-workflow) -\n  trigger key: v to search\n\n##### Shell Scripts\n\n```bash\n./modules/alfred/install_alfred_workflows.sh\n```\n\nThis will install the following workflows:\n\n### QMK\n\nSee [qmk readme](./modules/qmk/readme.md)\n\n### Oracle Cloud Init\n\nIt sucks of oracle cloud security rules, see\n[question](https://stackoverflow.com/questions/54794217/opening-port-80-on-oracle-cloud-infrastructure-compute-node)\nto enable oracle cloud access.\n\nYou need to manual open port:\n\n```bash\nsudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT\nsudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 443 -j ACCEPT\nsudo netfilter-persistent save\n```\n\n### debian disable sleep when display is off\n\n```bash\nsudo vi /etc/systemd/logind.conf\n```\n\n```bash\nHandleLidSwitch=ignore\n```\n\n```bash\nsudo systemctl restart systemd-logind\n```\n\n### Traceroute with ip info\n\n```bash\n./scripts/traceroute.sh \u003cip\u003e\n```\n\n### Open BBR\n\ncurrent:\n\n```bash\nsysctl net.ipv4.tcp_available_congestion_control\n```\n\naws linux:\n\n```bash\nsudo modprobe tcp_bbr\nsudo modprobe sch_fq\nsudo sysctl -w net.ipv4.tcp_congestion_control=bbr\n```\n\nforever:\n\n```bash\necho \"tcp_bbr\" | sudo tee -a /etc/modules-load.d/modules.conf\necho \"net.core.default_qdisc=fq\" | sudo tee -a /etc/sysctl.conf\necho \"net.ipv4.tcp_congestion_control=bbr\" | sudo tee -a /etc/sysctl.conf\nsudo sysctl -p\nsysctl net.ipv4.tcp_congestion_control\n```\n\n## Apps\n\n- \u003chttps://selfcontrolapp.com/\u003e\n\n## Resource\n\n- [Ten Things I Wish I’d Known About bash](https://zwischenzugs.com/2018/01/06/ten-things-i-wish-id-known-about-bash/)\n- [Osx-init](https://github.com/why-jay/osx-init)\n- [dev-setup](https://github.com/donnemartin/dev-setup)\n- [dotsfile](https://github.com/mathiasbynens/dotfiles/tree/master)\n- [Debian Create GPG key](https://keyring.debian.org/creating-key.html)\n- [Debian GPG Subkeys](https://wiki.debian.org/Subkeys?action=show\u0026redirect=subkeys)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheowenyoung%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheowenyoung%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheowenyoung%2Fdotfiles/lists"}