mirror of
https://gitee.com/hotalexnet/openbsd.git
synced 2026-05-11 02:05:53 +08:00
20250919
This commit is contained in:
parent
a839ae917f
commit
0a62c7efdf
11 changed files with 120 additions and 46 deletions
31
.Xresources
31
.Xresources
|
|
@ -1,13 +1,8 @@
|
|||
! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
|
||||
!XTerm*loginShell:true ! 将Urxvt作为登录shell启动 (例如读取~/.profile或~/.bash_profile)
|
||||
|
||||
! ==============================================================================
|
||||
! 字体配置
|
||||
! ==============================================================================
|
||||
!URxvt*font: xft:Maple Mono Normal CN Medium:size=8
|
||||
!URxvt*boldFont: xft:Maple Mono Normal CN Medium:bold:size=8
|
||||
!URxvt*italicFont: xft:Maple Mono Normal CN Medium:size=8
|
||||
!URxvt*boldItalicFont: xft:Maple Mono Normal CN Medium:bold:italic:size=8
|
||||
URxvt*font: xft:MesloLGM Nerd Font Mono:size=9,xft:Sarasa Term SC Nerd:size=9
|
||||
URxvt*boldFont: xft:MesloLGM Nerd Font Mono:bold:size=9,xft:SarasaTermSC Nerd SemiBold:size=9
|
||||
URxvt*italicFont: xft:MesloLGM Nerd Font Mono:size=9,xft:Sarasa Term SC Nerd:size=9
|
||||
|
|
@ -123,17 +118,17 @@ URxvt*color15: #ECEFF4
|
|||
! 隐藏滚动条
|
||||
URxvt*scrollBar: false
|
||||
! 滚动条在右侧
|
||||
URxvt*scrollBar_right: true
|
||||
!URxvt*scrollBar_right: true
|
||||
! 滚动条悬浮在窗口边缘
|
||||
URxvt*scrollBar_floating: true
|
||||
!URxvt*scrollBar_floating: true
|
||||
! 仅在需要时显示滚动条
|
||||
URxvt*scrollBar_on_request: true
|
||||
!URxvt*scrollBar_on_request: true
|
||||
! 滚动条颜色
|
||||
URxvt*scrollcolor: #888888
|
||||
!URxvt*scrollcolor: #888888
|
||||
! 滚动条槽颜色
|
||||
URxvt*troughcolor: #333333
|
||||
!URxvt*troughcolor: #333333
|
||||
! 滚动条厚度
|
||||
URxvt*thickness: 8
|
||||
!URxvt*thickness: 8
|
||||
|
||||
! 滚动条回溯缓冲区大小(保存多少行历史)
|
||||
URxvt*saveLines: 10000
|
||||
|
|
@ -153,7 +148,7 @@ URxvt*cursorBlink: true
|
|||
! ==============================================================================
|
||||
! 其他实用功能
|
||||
! ==============================================================================
|
||||
! 关闭闪烁的bell(通常比audible bell更烦人)
|
||||
! 关闭闪烁的bell
|
||||
URxvt*bell-urxvt: false
|
||||
! 启动audible bell(声音提示)
|
||||
URxvt*audibleBell: true
|
||||
|
|
@ -168,7 +163,7 @@ URxvt*lineSpace: 0
|
|||
|
||||
!------------------------------------------------------------------------------
|
||||
!Xterm 核心配置
|
||||
!定义 XTerm 类名,所有以下配置都将应用于 XTerm 实例
|
||||
!定义 XTerm 类名
|
||||
XTerm*termName: xterm-256color
|
||||
|
||||
! ==============================================================================
|
||||
|
|
@ -180,19 +175,11 @@ XTerm*renderFont: true
|
|||
! 指定主字体和字号
|
||||
! 格式: xft:Font Name:size=SIZE
|
||||
! 注意: Xterm 在处理粗体/斜体字体时,通常会通过字体渲染库自动合成,
|
||||
! 或者你可以尝试为 boldFont, italicFont 单独指定,但效果可能不如Urxvt灵活。
|
||||
! 或者可以尝试为 boldFont, italicFont 单独指定,但效果可能不如Urxvt灵活。
|
||||
XTerm*faceName: xft:MesloLGM Nerd Font Mono:style=Normal:size=9,xft:Sarasa Term SC Nerd:size=9
|
||||
! 显式设置字号,与faceName配合
|
||||
XTerm*faceSize: 9
|
||||
|
||||
! 备用字体 (如果主字体中没有某个字符,会尝试使用备用字体)
|
||||
! 对于中文或 Emoji 支持至关重要。多个字体用逗号分隔,并按照优先级排列。
|
||||
! Xterm 对 fallbackFont 的支持不如 Urxvt 那么直接,有时需要将它们串联在 faceName 中。
|
||||
! 尝试将它们放在 faceName 中,或者如果你的 Xterm 版本支持,可以尝试 fallbackFont。
|
||||
! 更稳妥的做法是,确保你的主字体(如 Maple Mono CN)本身就包含了这些字符集。
|
||||
! 或者:
|
||||
! XTerm*faceName: xft:Maple Mono Normal CN Medium:size=9:antialias=true:autohint=true,xft:Noto Color Emoji:size=10,xft:WenQuanYi Micro Hei:size=9
|
||||
|
||||
! 设置字符宽度模式 (对于中文字符很重要)
|
||||
! 这是解决 Xterm 中文字符过宽或重叠问题的关键。
|
||||
XTerm*cjkWidth: true
|
||||
|
|
|
|||
10
.bashrc
10
.bashrc
|
|
@ -1,10 +0,0 @@
|
|||
export LANG=zh_CN.UTF-8
|
||||
export LC_ALL=zh_CN.UTF-8
|
||||
|
||||
alias ls='colorls -Ga'
|
||||
alias ll='colorls -Gal'
|
||||
alias df='df -h'
|
||||
alias du='du -sh'
|
||||
alias ifconfig='/home/alex/color_ifconfig'
|
||||
|
||||
export PS1="\[\e[1;3;36m\]\u@\h \[\e[0;33m\]\w \[\e[0m\]>"
|
||||
|
|
@ -51,7 +51,7 @@ tiling_drag modifier titlebar
|
|||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
bindsym Control+u exec urxvt
|
||||
bindsym Control+u exec alacritty
|
||||
bindsym Control+n exec nvim-qt
|
||||
bindsym Control+f exec firefox
|
||||
bindsym Control+g exec gvim
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# wm independent hotkeys
|
||||
#
|
||||
|
||||
# 打开 xterm
|
||||
# 打开 alacritty
|
||||
super + Return
|
||||
xterm
|
||||
alacritty
|
||||
|
||||
# 启动 rofi
|
||||
super + @space
|
||||
|
|
|
|||
5
.cwmrc
5
.cwmrc
|
|
@ -20,9 +20,6 @@ gap 32 29 2 2
|
|||
# 窗口移动距离
|
||||
moveamount 2
|
||||
|
||||
# 设置窗口焦点循环顺序(Alt+Tab)
|
||||
#cycle
|
||||
|
||||
# 边缘粘附行为(窗口推动吸附边缘)
|
||||
snapdist 10
|
||||
|
||||
|
|
@ -92,7 +89,7 @@ bind-key 4S-9 window-movetogroup-9
|
|||
# 快速打开程序
|
||||
bind-key C-Return xterm # Ctrl+enter 打开xterm
|
||||
bind-key C-g gvim # Ctrl+g 打开Vim
|
||||
bind-key C-u urxvt # Ctrl+u 打开urxvt
|
||||
bind-key C-u alacritty # Ctrl+u 打开alacritty
|
||||
bind-key C-n nvim-qt # Ctrl+n 打开Neovim
|
||||
bind-key C-m firefox # Ctrl+m 打开firefox
|
||||
bind-key C-k /home/alex/bin/kitty-chinese.sh # Ctrl+k 打开kitty
|
||||
|
|
|
|||
2
.kshrc
2
.kshrc
|
|
@ -9,7 +9,7 @@ alias ls='colorls -Ga'
|
|||
alias ll='colorls -Gal'
|
||||
alias df='df -h'
|
||||
alias du='du -sh'
|
||||
alias ifconfig='/home/alex/color_ifconfig'
|
||||
alias ifconfig='$HOME/bin/color_ifconfig'
|
||||
alias kitty="GLFW_IM_MODULE=ibus kitty"
|
||||
|
||||
# git 分支显示
|
||||
|
|
|
|||
|
|
@ -15,11 +15,10 @@ bar_enabled = 0 # 关闭自带bar
|
|||
modkey = Mod4
|
||||
|
||||
# 常用程序
|
||||
program[term] = /usr/X11R6/bin/xterm
|
||||
program[rxvt] = /usr/local/bin/urxvt
|
||||
program[term] = /home/alex/bin/kitty-chinese.sh
|
||||
program[alacritty] = /usr/local/bin/alacritty
|
||||
program[browser] = /usr/local/bin/firefox
|
||||
program[neovim] = /usr/local/bin/nvim-qt
|
||||
program[kitty] = /home/alex/bin/kitty-chinese.sh
|
||||
program[rofi_drun] = /usr/local/bin/rofi -show drun -theme gruvbox-dark -show-icons
|
||||
program[rofi_run] = /usr/local/bin/rofi -show run -theme gruvbox-dark -show-icons
|
||||
program[rofi_window] = /usr/local/bin/rofi -show window -theme gruvbox-dark -show-icons
|
||||
|
|
@ -54,10 +53,9 @@ bind[free_toggle] = MOD+y # 切换窗口的工作区/
|
|||
|
||||
# 程序快捷键
|
||||
bind[term] = Mod+Shift+Return
|
||||
bind[rxvt] = Mod+t
|
||||
bind[alacritty] = Mod+t
|
||||
bind[browser] = Mod+m
|
||||
bind[neovim] = Mod+n
|
||||
bind[kitty] = Mod+x
|
||||
bind[rofi_drun] = Mod+r
|
||||
bind[rofi_run] = Mod+e
|
||||
bind[rofi_window] = Mod+w
|
||||
|
|
|
|||
2
.twmrc
2
.twmrc
|
|
@ -70,7 +70,7 @@ menu "Utilities"
|
|||
{
|
||||
"Top" !"xterm -T Top -n Top -e top &"
|
||||
"Firefox" !"firefox &"
|
||||
"Urxvt" !"urxvt &"
|
||||
"Urxvt" !"alacritty &"
|
||||
"Kitty" !"kitty &"
|
||||
"" f.nop
|
||||
"Neovim" !"nvim-qt &"
|
||||
|
|
|
|||
101
README.md
Normal file
101
README.md
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
# OpenBSD 配置文件仓库
|
||||
|
||||
> 我的 OpenBSD 个性化配置集合
|
||||
> 简洁 · 高效 · 安全 · 键盘驱动
|
||||
|
||||
本仓库存放我使用的 OpenBSD 系统配置文件。配置以轻量级窗口管理器(`spectrwm` / `cwm`)、终端工具(`tmux` + `alacritty` / `kitty`)为核心,追求极简、高效与可维护性。
|
||||
|
||||
**系统:OpenBSD 7.X**
|
||||
|
||||
****风格**:键盘优先 · 配色统一 · 脚本驱动**
|
||||
|
||||
---
|
||||
## 仓库概览
|
||||
|
||||
```sh
|
||||
openbsd/
|
||||
├── .Xresources # X11 资源配置 (颜色, 字体等)
|
||||
├── .config/ # 第三方软件配置目录
|
||||
│ └── alacritty # alacritty 终端模拟器配置目录
|
||||
│ └── bat # bat 配置目录
|
||||
│ └── bspwm # bspwm 窗口管理器配置目录
|
||||
│ └── sxhkd
|
||||
│ └── i3 # i3 窗口管理器配置目录
|
||||
│ └── kitty # kitty 终端模拟器配置目录
|
||||
│ └── lf # lf 文件管理器配置目录
|
||||
│ └── polybar # polybar 状态栏配置目录
|
||||
│ └── ranger # ranger 文件管理器配置目录
|
||||
│ └── tint2 # tint2 状态栏配置目录
|
||||
├── .cwmrc # cwm 窗口管理器配置文件
|
||||
├── .i3status.conf # i3status 状态栏配置
|
||||
├── .kshrc # Korn Shell 配置文件
|
||||
├── .profile # 用户登陆环境变量
|
||||
├── .spectrwm # spectrwm 窗口管理器配置文件
|
||||
├── .tmux.conf # tmux 终端复用器配置文件
|
||||
├── .twmrc # twm 窗口管理器配置文件
|
||||
├── .xsession # X Window 启动脚本
|
||||
├── GNUstep/ # Window Maker 窗口管理器配置目录
|
||||
├── backgrounds/ # 桌面壁纸
|
||||
├── bin/ # 自定义脚本与工具目录
|
||||
└── list # 我的OpenBSD安装包列表,包含上述所有软件
|
||||
```
|
||||
---
|
||||
|
||||
## 快速使用指南
|
||||
|
||||
### 1. 克隆仓库
|
||||
|
||||
```sh
|
||||
git clone https://gitee.com/hotalexnet/openbsd.git ~/dotfiles
|
||||
```
|
||||
### 2. 安装软件包
|
||||
|
||||
```
|
||||
doas pkg_add -l ~/dotfiles/list
|
||||
|
||||
```
|
||||
### 3. 备份现有配置(推荐)
|
||||
|
||||
```Shell
|
||||
mkdir ~/dotfiles_backup_$(date +%F)
|
||||
cp ~/.profile ~/.Xresources ~/.xsession ~/.tmux.conf ~/dotfiles_backup_$(date +%F)/ 2>/dev/null || echo "无旧配置"
|
||||
```
|
||||
### 4. 创建软链接(推荐方式)
|
||||
|
||||
```sh
|
||||
ln -sf ~/dotfiles/.profile ~/
|
||||
ln -sf ~/dotfiles/.Xresources ~/
|
||||
ln -sf ~/dotfiles/.xsession ~/
|
||||
ln -sf ~/dotfiles/.tmux.conf ~/
|
||||
ln -sf ~/dotfiles/.cwmrc ~/
|
||||
ln -sf ~/dotfiles/.spectrwm.conf ~/
|
||||
ln -sf ~/dotfiles/.i3status.conf ~/
|
||||
ln -sf ~/dotfiles/.config ~/
|
||||
ln -sf ~/dotfiles/bin ~/
|
||||
```
|
||||
### 5. 重载配置
|
||||
重启 X 或重新登录以应用 .xsession
|
||||
|
||||
---
|
||||
|
||||
## 注意事项
|
||||
|
||||
敏感信息:本仓库未包含密码、API 密钥等敏感信息。如需配置 Git,请使用 .gitconfig.local 或手动设置。
|
||||
终端兼容性:部分软件依赖支持 ANSI 颜色的终端。
|
||||
窗口管理器选择:.xsession 中需明确启动 cwm 或 spectrwm,避免冲突。
|
||||
字体依赖:配置中使用了第三方特定字体(如 MesloFont 或 SarasaTermSCNerd),请确保已安装。
|
||||
|
||||
---
|
||||
|
||||
## 配置哲学
|
||||
|
||||
KISS 原则:保持简单,避免过度配置。
|
||||
可移植性:尽量使用 OpenBSD 基础工具,减少外部依赖。
|
||||
键盘驱动:通过快捷键提升效率,减少鼠标依赖。
|
||||
安全优先:默认启用 unveil、pledge,配置最小权限。
|
||||
|
||||
---
|
||||
|
||||
## 许可
|
||||
|
||||
除非另有说明,本仓库内容以 BSD 3-Clause 开源发布。
|
||||
1
list
1
list
|
|
@ -23,6 +23,7 @@ firefox--
|
|||
fzf--
|
||||
gimp--%snapshot
|
||||
git--
|
||||
glmark2--
|
||||
gmake--
|
||||
go--
|
||||
gucharmap--
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue