Skip to content

Commit

Permalink
v2022-03-17
Browse files Browse the repository at this point in the history
  • Loading branch information
Arondight committed Mar 17, 2022
1 parent e089d55 commit 0e6fcf7
Show file tree
Hide file tree
Showing 32 changed files with 140 additions and 172 deletions.
6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v2022-03-17
* all:
格式化文档
* vim:
go 文件使用 tab 缩进

v2022-02-08.2
* git:
禁用了代理配置
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2015-2022 秦凡东 (Qin Fandong)
Copyright (c) 2015-2022 Qin Fandong <[email protected]>

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:

Expand Down
61 changes: 23 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,50 @@

各式各样的配置文件,都是个人使用的,不过为了今后方便自己多系统使用和今后的迁移,写了一些一键安装配置和依赖的脚本。如果你要使用这些配置,对在你的机器上引发的一切不良后果例如蓝屏和发射核导弹概不负责。

支持的架构为`X86`

测试通过的系统:

- [x] Arch Linux
- [x] CentOS
- [x] Debian
- [x] Fedora
- [x] openSUSE
- [x] Slackware
- [x] Ubuntu

## 安装

其中根目录下的`install.sh` 用于整体的安装,每个子目录下的`check.sh` 用于检查系统环境,`install.sh` 用于备份并复制配置文件,`init.sh` 用于搭建配置需要的运行环境,`install.force.sh` 用于手动安装一些可能需要保持机器上独立的配置。
其中根目录下的 `install.sh` 用于整体的安装,每个子目录下的 `check.sh` 用于检查系统环境, `install.sh` 用于备份并复制配置文件, `init.sh` 用于搭建配置需要的运行环境, `install.force.sh` 用于手动安装一些可能需要保持机器上独立的配置。

如果看了这些你仍然不知道该怎么做,执行:

```bash
```sh
git clone https://github.com/Arondight/profile.git ~/profile
cd ~/profile
./install.sh -a
```

> 配置文件的安装使用了`ln` 创建软链接,所以一定不要删除`git clone` 生成的目录(默认是`~/profile`)!
> 配置文件的安装使用了 `ln` 创建软链接,所以一定不要删除 `git clone` 生成的目录(默认是 `~/profile` )!
## 插件

当你使用`zsh``bash` 作为登陆Shell 时,你将可以使用一些小插件:

| 指令 | 作用 |
| --- | --- |
| [profileupdate](zsh/.zsh/profileutils) | 更新配置仓库 |
| [profilereconf](zsh/.zsh/profileutils) | 重设运行环境 |
| oh-my-zsh-upgrade | 更新oh-my-zsh |
| [androidenv](zsh/.zsh/androidenv) | 切换到安卓开发环境 |
| [apply](zsh/.zsh/apply) | 补丁操作 |
| [archpkg](zsh/.zsh/archpkg) | slackpkg 风格的Arch Linux 包管理器 |
| [groot](zsh/.zsh/groot) | 跳到git 仓库顶层目录 |
| [ipmi](zsh/.zsh/ipmi) | `ipmitool` 封装 |
| [less](zsh/.zsh/less) | 更舒适的less |
| [mountcmds](zsh/.zsh/mountcmds) | 一系列挂载、卸载指令 |
| [sshenv](zsh/.zsh/sshenv) | ssh 密钥管理器 |
| [vman](zsh/.zsh/vman) | 更舒适的Manual |
当你使用 `zsh` `bash` 作为登陆 Shell 时,你将可以使用一些小插件:

| 指令 | 作用 |
| -------------------------------------- | ----------------------------------- |
| [profileupdate](zsh/.zsh/profileutils) | 更新配置仓库 |
| [profilereconf](zsh/.zsh/profileutils) | 重设运行环境 |
| oh-my-zsh-upgrade | 更新 oh-my-zsh |
| [androidenv](zsh/.zsh/androidenv) | 切换到安卓开发环境 |
| [apply](zsh/.zsh/apply) | 补丁操作 |
| [archpkg](zsh/.zsh/archpkg) | slackpkg 风格的 Arch Linux 包管理器 |
| [groot](zsh/.zsh/groot) | 跳到 git 仓库顶层目录 |
| [ipmi](zsh/.zsh/ipmi) | `ipmitool` 封装 |
| [less](zsh/.zsh/less) | 更舒适的 less |
| [mountcmds](zsh/.zsh/mountcmds) | 一系列挂载、卸载指令 |
| [sshenv](zsh/.zsh/sshenv) | ssh 密钥管理器 |
| [vman](zsh/.zsh/vman) | 更舒适的 Manual |

## 依赖

系统中需要提供以下指令。

`awk`, `clang`, `date`, `git`, `grep`, `install`, `ln`, `md5sum`, `make`, `mkdir`, `mv`, `readlink`, `rm`, `tail`, `uniq`, `vim`, `xz`
`awk``clang``date``git``grep``install``ln``md5sum``make``mkdir``mv``readlink``rm``tail``uniq``vim``xz`

## 注意

Git 仓库在2017-01-11 进行了一次变基操作,导致`profileupdate` 指令出错,请执行以下指令修正错误。
Git 仓库在 2017-01-11 进行了一次变基操作,导致`profileupdate` 指令出错,请执行以下指令修正错误。

```bash
```sh
cd ~/.zsh
groot
git reset --hard 4476284
Expand All @@ -68,11 +56,8 @@ git pull -p

## Shell 第三方配置

插件[custom](zsh/.zsh/custom) 会读取文件`~/.custom_shellrc`
插件[custom](zsh/.zsh/custom) 会读取文件 `~/.custom_shellrc`

## 版权

[MIT-LICENSE](LICENSE)

Copyright (c) 2015-2017 秦凡东(Qin Fandong)

19 changes: 10 additions & 9 deletions apache/.web/header.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<!Doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="/.web/style.css" />
<meta charset="UTF-8">
<title>TITLE</title>
</head>

<body>
<p>HERE THE LIST</p>
<head>
<link rel="stylesheet" type="text/css" href="/.web/style.css" />
<meta charset="UTF-8" />
<title>TITLE</title>
</head>

<body>
<p>HERE THE LIST</p>
</body>
</html>
19 changes: 9 additions & 10 deletions apache/.web/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
p {
font-family: "sans-serif";
color: #0080FF;
color: #0080ff;
font-weight: bolder;
font-size: 24px;
text-align: center;
Expand All @@ -15,7 +15,7 @@ table {
width: 80%;
border-collapse: collapse;
border: 1px #858585 solid;
margin: 0 auto
margin: 0 auto;
}
table td {
line-height: 20px;
Expand All @@ -31,21 +31,20 @@ table tr:nth-child(odd) {
background: #f0f0f0;
}
table tr:hover {
background: #ACD6FF;
background: #acd6ff;
color: #990000;
}
table th {
background: #999999;
line-height: 17px;
}
table th a:link {
table th a:link {
text-decoration: none;
color: #FFFFFF;
color: #ffffff;
}
table th a:visited {
color: #FFFFFF;
table th a:visited {
color: #ffffff;
}
table th a:hover {
color: #FFFF00;
table th a:hover {
color: #ffff00;
}

4 changes: 2 additions & 2 deletions apache/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
与 vsftpd 配置配合使用, Arch Linux 配置文件,仅供参考。如果是Red Hat 系列发行版,需要留意文件 `/etc/httpd/conf.d/welcome.conf`
与 vsftpd 配置配合使用, Arch Linux 配置文件,仅供参考。如果是 Red Hat 系列发行版,需要留意文件 `/etc/httpd/conf.d/welcome.conf`

```bash
```sh
cp -rvf .web /home/ftp/root/
sudo htpasswd -c /home/ftp/root/.web/passwords http
```
7 changes: 3 additions & 4 deletions bash/.bash/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
这是一个bash 和其他shell 的接口配置,用于其他shell 向bash 转换时指定bash 初始行为。
这是一个 bash 和其他 shell 的接口配置,用于其他 shell 向 bash 转换时指定 bash 初始行为。

你需要将期望bash 完成的操作以`.sh`文件的形式写入`~/.bash/interface/`,然后像下面这样调用bash
你需要将期望 bash 完成的操作以 `.sh`文件的形式写入 `~/.bash/interface/` ,然后像下面这样调用 bash

```bash
```sh
bash --init-file ~/.bash/interface.sh
```

这个功能只是实验性的,请不要使用。

8 changes: 4 additions & 4 deletions grub2/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| 目录 | 说明 |
| --- | --- |
| [boot](boot) | 修复 Arch Linux UEFI 下损坏的 GRUB2 |
| [multiboot](multiboot) | 用于制作USB 多启动盘的一系列GRUB2 配置文件 |
| 目录 | 说明 |
| ---------------------- | -------------------------------------------- |
| [boot](boot) | 修复 Arch Linux UEFI 下损坏的 GRUB2 |
| [multiboot](multiboot) | 用于制作 USB 多启动盘的一系列 GRUB2 配置文件 |
5 changes: 2 additions & 3 deletions grub2/multiboot/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
这是用于制作USB 多启动盘的一系列GRUB2 配置文件,用于制作一个可以选择从多个ISO 镜像启动的USB 设备。
这是用于制作 USB 多启动盘的一系列 GRUB2 配置文件,用于制作一个可以选择从多个 ISO 镜像启动的 USB 设备。

其中,`grub.cfg` 已将主题指定为[Dacha204/grub2-themes-Ettery](https://github.com/Dacha204/grub2-themes-Ettery)
其中, `grub.cfg` 已将主题指定为[Dacha204/grub2-themes-Ettery](https://github.com/Dacha204/grub2-themes-Ettery)

---

Expand Down Expand Up @@ -59,4 +59,3 @@ image
8 directories, 7 files
```

2 changes: 1 addition & 1 deletion ssh/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
个人 SSH 密钥备份。

```bash
```sh
gpg ssh-env.tar.gz.asc
sshenv import ssh-env
rm -f ssh-env.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions sysctl/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
这是一份自用的sysctl 配置文件。
这是一份自用的 sysctl 配置文件。

```bash
```sh
sudo cp -r ./sysctl.d/ /etc
sudo systemctl restart systemd-sysctl
```
2 changes: 1 addition & 1 deletion tmux/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
一个灵活但输出效率较低的 TTY 分屏方案,使用了Vim 键位。
一个灵活但输出效率较低的 TTY 分屏方案,使用了 Vim 键位。
18 changes: 9 additions & 9 deletions user-dirs/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
设置默认用户目录:

| 名称 | 位置 |
| --- | --- |
| 桌面 | ~/Desktop |
| 下载 | ~Download |
| 模板 | ~/Templates |
| 名称 | 位置 |
| ---- | ------------- |
| 桌面 | ~/Desktop |
| 下载 | ~Download |
| 模板 | ~/Templates |
| 共享 | ~/Publicshare |
| 文档 | ~/Documents |
| 音乐 | ~/Music |
| 图片 | ~/Pictures |
| 视频 | ~/Videos |
| 文档 | ~/Documents |
| 音乐 | ~/Music |
| 图片 | ~/Pictures |
| 视频 | ~/Videos |
2 changes: 1 addition & 1 deletion vim/.vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -513,5 +513,5 @@ function! TabIndent ()
setlocal noexpandtab smarttab
setlocal tabstop=2 shiftwidth=2 softtabstop=2 backspace=2
endfunction
au FileType makefile,gitconfig call TabIndent ()
au FileType makefile,gitconfig,go call TabIndent ()

2 changes: 1 addition & 1 deletion vim/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
![Vim](screenshots/vim.png?raw=true)

> 从2016-01-05 开始,vim 配置致力于回归编辑器本职,不再提供重量级插件,也不再提供一些本应该由IDE 提供的功能。参见[#21](https://github.com/Arondight/profile/issues/21)
> 从 2016-01-05 开始,vim 配置致力于回归编辑器本职,不再提供重量级插件,也不再提供一些本应该由 IDE 提供的功能。参见[#21](https://github.com/Arondight/profile/issues/21)
2 changes: 1 addition & 1 deletion vsftpd/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
密码验证、不支持匿名访问的 ftp 服务器。

```bash
```sh
sudo mkdir -p /home/ftp/root
sudo chmod 0755 -R /home/ftp/root
sudo useradd -g ftp -d /home/ftp/root ftp
Expand Down
19 changes: 6 additions & 13 deletions zsh/.zsh/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
这是一个shell 的插件目录,使用了bash 语法,可以由所有兼容bash 语法的shell 加载。
这是一个 shell 的插件目录,使用了 bash 语法,可以由所有兼容 bash 语法的 shell 加载。在你的 shell 配置文件中加入以下语句:

- [x] Zsh
- [x] bash
- [x] dash

在你的shell 配置文件中加入以下语句:

```bash
```sh
source $HOME/.zsh/reactor.sh
```

其中的插件必须:

1.`$HOME/.zsh/reactor.sh``myPluginLoader` 函数中注册
+ 逻辑必须适合在当前shell 执行,而非作为脚本执行
+ 权限可读且不可执行
+ 因为zsh 和bash/dash 数组下标规则不同,想要写通用的插件就不能够使用任何数组下标

1.`~/.zsh/reactor.sh``myPluginLoader` 函数中注册
2. 逻辑必须适合在当前 shell 执行,而非作为脚本执行
3. 权限可读且不可执行
4. 因为 zsh 和 bash/dash 数组下标规则不同,想要写通用的插件就不能够使用任何数组下标
3 changes: 1 addition & 2 deletions zsh/.zsh/alias/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
一些alias,并且去除了几乎所有的global alias —— 因为它们时常会引发问题。

一些 alias,并且去除了几乎所有的 global alias —— 因为它们时常会引发问题。
17 changes: 8 additions & 9 deletions zsh/.zsh/androidenv/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
如果你的系统是Arch Linux,你还需要设置一些软连接:
如果你的系统是 Arch Linux,你还需要设置一些软连接:

运行本目录下的初始化脚本:

```bash
```sh
./init.sh
```

或者手动执行(你需要清楚你在做什么):

```bash
```sh
echo /usr/lib/{libtinfo.so{,.5,.6},libncurses.so{.5,.6}} |\
xargs -d ' ' -I {} sudo ln -s /usr/lib/libncursesw.so {}
```

| 需要的库 | 链接到 |
| --- | --- |
| /usr/lib/libtinfo.so | /usr/lib/libncursesw.so |
| /usr/lib/libtinfo.so.5 | /usr/lib/libncursesw.so |
| /usr/lib/libtinfo.so.6 | /usr/lib/libncursesw.so |
| 需要的库 | 链接到 |
| ------------------------ | ----------------------- |
| /usr/lib/libtinfo.so | /usr/lib/libncursesw.so |
| /usr/lib/libtinfo.so.5 | /usr/lib/libncursesw.so |
| /usr/lib/libtinfo.so.6 | /usr/lib/libncursesw.so |
| /usr/lib/libncurses.so.5 | /usr/lib/libncursesw.so |
| /usr/lib/libncurses.so.6 | /usr/lib/libncursesw.so |

3 changes: 1 addition & 2 deletions zsh/.zsh/archpkg/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
这是一个封装了pacman 的脚本,允许以slackpkg 的使用方式管理Arch Linux 的软件包。

这是一个封装了 pacman 的脚本,允许以 slackpkg 的使用方式管理 Arch Linux 的软件包。
3 changes: 1 addition & 2 deletions zsh/.zsh/custom/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
读取`~/.custom_shellrc`

读取 `~/.custom_shellrc`
3 changes: 1 addition & 2 deletions zsh/.zsh/groot/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
跳到git 仓库顶层目录

跳到 git 仓库顶层目录
3 changes: 1 addition & 2 deletions zsh/.zsh/iam/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
根据GPG 密钥自动配置GIT 仓库环境变量

根据 GPG 密钥自动配置 GIT 仓库环境变量
15 changes: 7 additions & 8 deletions zsh/.zsh/ipmi/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
ipmitool

| 指令 | 动作 |
| --- | --- |
| ipmi-status | 电源状态 |
| ipmi-boot | 开机 |
| ipmi-halt | 关机 |
| ipmi-attach | 连接 |
| ipmi-deattach | 断开 |

| 指令 | 动作 |
| ------------- | -------- |
| ipmi-status | 电源状态 |
| ipmi-boot | 开机 |
| ipmi-halt | 关机 |
| ipmi-attach | 连接 |
| ipmi-deattach | 断开 |
7 changes: 3 additions & 4 deletions zsh/.zsh/less/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
这是一个用于替代less 的脚本,分别会优先使用vim 和nano 模仿less 的行为,
如果这两个程序没有被找到,则使用less 指令。

你可以使用sysless 直接调用系统less 指令而非less 函数。
这是一个用于替代 less 的脚本,分别会优先使用 vim 和 nano 模仿 less 的行为,
如果这两个程序没有被找到,则使用 less 指令。

你可以使用 sysless 直接调用系统 less 指令而非 less 函数。
Loading

0 comments on commit 0e6fcf7

Please sign in to comment.