Skip to content

Commit

Permalink
feat: add archlinux configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Chunhui Ren authored and Chunhui Ren committed Jun 19, 2024
1 parent cfd1eac commit 132089f
Show file tree
Hide file tree
Showing 40 changed files with 600 additions and 751 deletions.
20 changes: 4 additions & 16 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
MIT License

Copyright (c) 2023 Ren Chunhui
Copyright (c) 2024 chunhui

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
79 changes: 16 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div align="center">
<img src="https://raw.githubusercontent.com/RenChunhui/renchunhui.github.io/develop/public/img/dotfiles_logo.svg" alt="logo" >
<p>Automated configuration, Preferences and software Installation for macOS.</p>
<h1>Chunhui's dotfiles</h1>
<p>Dotfiles for macOS and Arch Linux</p>
</div>

<p align="center">
<img src="https://img.shields.io/badge/Ventura-000000?style=for-the-badge&logo=Apple&logoColor=white" alt="macOS">
<img src="https://img.shields.io/badge/Homebrew-000?logo=homebrew&logoColor=FBB040&style=for-the-badge" alt="Homebrew">
<img src="https://img.shields.io/badge/macOS-000000?style=for-the-badge&logo=Apple&logoColor=white" alt="macOS">
<img src="https://img.shields.io/badge/archlinux-1793D1?logo=archlinux&logoColor=white&style=for-the-badge" alt="Arch Linux">
</p>

<p align="center">
Expand All @@ -15,75 +15,28 @@
<img src="https://img.shields.io/badge/tmux-000?logo=tmux&logoColor=1BB91F&style=flat-square" alt="tmux Badge">
<img src="https://img.shields.io/badge/npm-000?logo=npm&logoColor=CB3837&style=flat-square" alt="npm Badge">
<img src="https://img.shields.io/badge/pnpm-000?logo=pnpm&logoColor=F69220&style=flat-square" alt="pnpm Badge">
<img src="https://img.shields.io/badge/MySQL-000?logo=mysql&logoColor=4479A1&style=flat-square" alt="MySQL Badge">
<img src="https://img.shields.io/badge/SQLite-000?logo=sqlite&logoColor=003B57&style=flat-square" alt="SQLite Badge">
<img src="https://img.shields.io/badge/Visual_Studio_Code-000?logo=visualstudiocode&logoColor=007ACC&style=flat-square" alt="Visual Studio Code">
</p>


Install
---

Install all using the install.sh script
## Install

``` sh
$ git clone github.com/renchunhui/dotfiles $HOME/.config/dotfiles
$ chomd +x $HOME/.config/dotfiles/install.sh
$ git clone https://github.com/renchunhui/dotfiles.git ~/.config/dotfiles
$ chmod +x ./install.sh
$ ./install.sh
```

Install part using dot cli

``` sh
Usage: dot install [command]
Available Commands:
brew Homebrew 安装
git Git 环境
alacritty 终端配置
os 系统偏好设置
neovim NeoVim 配置
node Node 环境
vscode VSCode 开发环境
zsh zsh 环境
help 帮助文档
```

Features
---
## What's in it?

- Handy binary script
- Automatic software installation
- Sensible OS X defaults


Folder Structure
---

``` sh
├── bin
├── cmd
│ ├── install
│ └── uninstall
├── etc
│ ├── alacritty
│ ├── git
│ ├── npm
│ ├── tmux
│ └── zsh
├── user
│ ├── alacritty
│ ├── brew
│ ├── git
│ ├── neovim
│ ├── node
│ ├── os
│ ├── vscode
│ └── zsh
├── Brewfile
└── install.sh
```
- alacritty & tmux configuration
- git configuration
- homebrew configuration(only macOS)
- neovim configuration
- pacman configuration(only Archlinux)
- zsh configuration
- ...

License
---
## License

[MIT License](./LICENSE)
76 changes: 73 additions & 3 deletions bin/dot
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

usage() {
cat <<EOF
+------------------------------------------+
| __ __ _____ __ |
| ____/ /___ / /_/ __(_) /__ _____ |
| / __ / __ \/ __/ /_/ / / _ \/ ___/ |
| / /_/ / /_/ / /_/ __/ / / __(__ ) |
| \__,_/\____/\__/_/ /_/_/\___/____/ |
| |
+------------------------------------------+
USAGE
dot [command]
Expand All @@ -12,18 +21,79 @@ Available Commands:
EOF
}

usage_darwin() {
cat <<EOF
Usage: dot install [command]
Available Commands:
brew Homebrew 安装
git Git 环境
alacritty 终端配置
os 系统偏好设置
neovim NeoVim 配置
node Node 环境
zsh zsh 环境
help 帮助文档
EOF
}

install_darwin() {
case $2 in
'')
dot install zsh
dot install brew
dot install alacritty
dot install git
dot install neovim
dot install os
;;
zsh)
zsh "$(pwd)/user/zsh/install_darwin.sh"
;;
brew)
sh "$(pwd)/user/homebrew/install.sh"
;;
alacritty)
sh "$(pwd)/user/alacritty/install.sh"
;;
git)
sh "$(pwd)/user/git/install.sh"
;;
neovim)
sh "$(pwd)/user/neovim/install.sh"
;;
os)
sh "$(pwd)/user/os/install_darwin.sh"
;;
help)
usage_darwin
;;
esac
}

install_linux() {
echo "linux"
}

uninstall() {
echo "uninstall"
}

main() {
case $1 in
install)
sh $DOTDIR/cmd/install.sh "$2"
if [[ "$(uname)" == "Darwin" ]]; then
install_darwin $@
else
install_linux $@
fi
;;
uninstall)
sh $DOTDIR/cmd/uninstall.sh "$2"
uninstall
;;
help)
usage
;;
esac
esac
}

main "$@"
69 changes: 0 additions & 69 deletions cmd/install.sh

This file was deleted.

67 changes: 0 additions & 67 deletions cmd/uninstall.sh

This file was deleted.

14 changes: 14 additions & 0 deletions etc/alacritty/alacritty.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import = [
"~/.config/alacritty/themes/catppuccin-frappe.toml"
]

[window]
opacity = 1

[font]
size = 16

[keyboard]
bindings = [
{ key = 36, mods = "Command", action = "ToggleFullscreen" }
]
Loading

0 comments on commit 132089f

Please sign in to comment.