hyprland 配置

安装软件包 sudo apt update sudo apt install -y \ hyprland waybar \ kitty dolphin \ wofi firefox-esr spectacle \ pavucontrol blueman brightnessctl wl-clipboard \ hyprpaper swayidle 检查显示器名称并写入配置 先运行: hyprctl monitors 示例输出: Monitor eDP-1 (ID 0): 1920x1080@60.000Hz Monitor HDMI-A-1 (ID 1): 2560x1440@144.000Hz 配置文件写法(~/.config/hypr/hyprland.conf): monitor=eDP-1,1920x1080@60,0x0,1 monitor=HDMI-A-1,2560x1440@144,1920x0,1 swayidle 用法 在配置中添加: exec-once = swayidle -w \ timeout 300 'hyprctl dispatch dpms off' \ resume 'hyprctl dispatch dpms on' 解释: -w :阻塞运行,保证进程驻留 timeout 300 'cmd' :空闲 300 秒执行命令(这里是关闭屏幕) resume 'cmd' :恢复活动后执行命令(这里是点亮屏幕) 输入设备配置 input { kb_layout = us touchpad { natural_scroll = true # 反向滚动 } } 快捷键设置 # 基础 bind=SUPER,RETURN,exec,kitty bind=SUPER,E,exec,dolphin bind=SUPER,B,exec,firefox bind=SUPER,D,exec,wofi --show drun # 窗口管理 bind=SUPER,Q,killactive bind=SUPER,F,fullscreen # 真全屏 bind=SUPER,SHIFT,F,fullscreen,1 # maximized (伪全屏,保留UI) bind=SUPER,SPACE,togglefloating bind=SUPER,P,togglepseudo # 浮动窗口操作(仅对浮动窗口有效) bind=SUPER,arrowup,moveactive,0 -50 bind=SUPER,arrowdown,moveactive,0 50 bind=SUPERCTRL,arrowup,resizeactive,0 -50 bind=SUPERCTRL,arrowdown,resizeactive,0 50 # 截图(Spectacle) bind=SUPER,SHIFT,S,exec,spectacle bind=SHIFT,PRINT,exec,spectacle -f -o ~/Pictures # 全屏保存 bind=CTRL,PRINT,exec,spectacle -c # 截图复制到剪贴板 # 音量 bind=XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5% bind=XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5% bind=XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle # 亮度 bind=XF86MonBrightnessUp,exec,brightnessctl s +10% bind=XF86MonBrightnessDown,exec,brightnessctl s 10%- 窗口美化 decoration { active_opacity = 0.9 inactive_opacity = 0.8 blur = yes blur_size = 5 blur_passes = 3 blur_new_optimizations = on rounding = 8 } 说明: ...

September 18, 2025 · wang1zhen

Linux 下 fio 测试硬盘读写性能

核心选项说明 –name: 任务名 –rw: I/O 模式 read: 顺序读 write: 顺序写 rw: 顺序读写交替 randread: 随机读 randwrite: 随机写 randrw: 随机读写交替 –bs: 块大小(block size),如 4k, 1M –size: 测试文件大小 –filename: 目标文件或设备路径 –runtime: 测试时长 –time_based: 基于时间运行,而不是直到写满 size –group_reporting: 汇总结果 –numjobs: job 数量,即多少线程/进程同时运行相同任务 –iodepth: 每个 job 可挂起的并发 I/O 请求数(队列深度) numjobs × iodepth ≈ 总并发请求数 准备测试文件 fio --name=prepare --rw=write --bs=1M --size=1G --filename=testfile --numjobs=1 --group_reporting 顺序吞吐量测试(CDM Seq QD=8 T=1) 顺序读 fio --name=seqread --rw=read --bs=1M --size=1G --filename=testfile --numjobs=1 --iodepth=8 --runtime=30 --time_based --group_reporting 顺序写 fio --name=seqwrite --rw=write --bs=1M --size=1G --filename=testfile --numjobs=1 --iodepth=8 --runtime=30 --time_based --group_reporting 随机延迟测试(CDM Rnd4K QD=1 T=1) 随机读 fio --name=latread --rw=randread --bs=4k --size=1G --filename=testfile --numjobs=1 --iodepth=1 --runtime=60 --time_based --group_reporting 随机写 fio --name=latwrite --rw=randwrite --bs=4k --size=1G --filename=testfile --numjobs=1 --iodepth=1 --runtime=60 --time_based --group_reporting 随机 IOPS 高并发(CDM Rnd4K QD=32 T=1) 随机读 fio --name=randread --rw=randread --bs=4k --size=1G --filename=testfile --numjobs=1 --iodepth=32 --runtime=60 --time_based --group_reporting 随机写 fio --name=randwrite --rw=randwrite --bs=4k --size=1G --filename=testfile --numjobs=1 --iodepth=32 --runtime=60 --time_based --group_reporting 随机 IOPS 超高并发(CDM Rnd4K QD=32 T=16) 随机读 fio --name=randread_mt --rw=randread --bs=4k --size=1G --filename=testfile --numjobs=16 --iodepth=32 --runtime=60 --time_based --group_reporting 随机写 fio --name=randwrite_mt --rw=randwrite --bs=4k --size=1G --filename=testfile --numjobs=16 --iodepth=32 --runtime=60 --time_based --group_reporting 混合负载(模拟真实业务) fio --name=randrw --rw=randrw --rwmixread=70 --bs=4k --size=1G --filename=testfile --numjobs=4 --iodepth=32 --runtime=60 --time_based --group_reporting 清理 rm testfile

September 18, 2025 · wang1zhen

tailscale cli 设置 exit 节点

查看可用 Exit 节点 tailscale status 指定 Exit 节点 # 节点名或 Tailscale 内网 IP tailscale up --exit-node=mynode 保留本地局域网访问 tailscale up --exit-node=mynode --exit-node-allow-lan-access=true 取消 Exit 节点 tailscale up --exit-node= 参数说明 `–exit-node=<节点名或IP>` 指定出口节点 `–exit-node-allow-lan-access` 允许访问本地局域网,否则所有流量都走 exit 节点

September 18, 2025 · wang1zhen

kdenlive 制作切片

工具与素材准备 剪辑:Kdenlive 字幕生成:Whisper(medium 模型) 字幕美化:Aegisub AI 分离:Demucs(–two-stems=vocals) 音频统一规格:48 kHz,双声道,WAV。 # 从录播提取音频 ffmpeg -i record.mp4 -vn -ac 2 -ar 48000 record.wav 人声与伴奏分离 使用 Demucs two-stems: demucs --two-stems=vocals record.wav 输出目录:./separated/htdemucs/record/ vocals.wav → 人声轨 no_vocals.wav → 伴奏轨 自动字幕生成(Whisper medium) 仅对人声生成字幕: whisper vocals.wav --model medium --language ja --task transcribe --output_format srt vocals.wav → 输入音频文件(人声轨) –model medium –language ja → 指定语言(日语,中文 zh,英文 en) –task transcribe → 转写模式(保持原语言) –output_format srt → 输出带时间戳的 .srt 输出:vocals.srt 字幕美化 在 Aegisub 打开 vocals.srt。 创建样式: Style: SongStyle,Noto Sans CJK JP,48,&H00FFFFFF,&H000000FF,&H00FACE87,&H64000000,0,0,0,0,100,100,0,0,1,3,1,2,10,10,30,1 白字 &H00FFFFFF ...

September 16, 2025 · wang1zhen

arch on zfs 在 zfs 上安装 archlinux

第一部分:准备安装介质 安装archiso工具 sudo pacman -S archiso 复制并自定义配置 # 复制官方配置 cp -r /usr/share/archiso/configs/releng/ ~/archlive cd ~/archlive 修改包列表 # 删除不需要的包并添加新包 sed -i '/^linux$/d; /^linux-headers$/d; /^broadcom-wl$/d' packages.x86_64 echo -e "linux-lts\nlinux-lts-headers\nzfs-utils\nzfs-dkms" >> packages.x86_64 echo "packages.x86_64 文件已更新完成" 配置pacman源 # 在文件末尾添加archzfs仓库 cat >> pacman.conf << 'EOF' [archzfs] SigLevel = TrustAll Optional Server = http://archzfs.com/$repo/$arch EOF pacman-key --recv-keys DDF7DB817396A49B2A2723F7403BD972F75D9D76 pacman-key --lsign-key DDF7DB817396A49B2A2723F7403BD972F75D9D76 # 更新包数据库 pacman -Sy echo "pacman.conf 已自动配置archzfs仓库" 更新启动配置文件 # 定义需要修改的文件列表 config_files=( "airootfs/etc/mkinitcpio.d/linux.preset" "efiboot/loader/entries/01-archiso-x86_64-linux.conf" "efiboot/loader/entries/02-archiso-x86_64-speech-linux.conf" "syslinux/archiso_pxe-linux.cfg" "syslinux/archiso_sys-linux.cfg" "grub/loopback.cfg" ) # 批量处理所有配置文件 for file in "${config_files[@]}"; do if [[ -f "$file" ]]; then echo "正在更新 $file" sed -i 's/vmlinuz-linux\([^-]\|$\)/vmlinuz-linux-lts\1/g; s/initramfs-linux/initramfs-linux-lts/g' "$file" echo "✓ $file 已更新" else echo "⚠ 警告: $file 不存在,跳过" fi done echo "所有启动配置文件已更新完成" 构建ISO mkdir -p ~/isobuild sudo mkarchiso -v -r -w /tmp/archiso-tmp -o ~/isobuild ~/archlive 构建完成后,ISO文件将位于 ~/isobuild 目录中。 ...

September 15, 2025 · wang1zhen

Debian on zfs 在 zfs 上安装 Debian linux

第一部分:准备安装介质 下载Debian 13 Live镜像 # 下载Debian 13 Live镜像(GNOME版本) wget https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-13.0.0-amd64-gnome.iso # 验证校验和(可选) wget https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/SHA256SUMS sha256sum -c SHA256SUMS --ignore-missing 制作启动U盘 # 查看可用设备 lsblk # 制作启动盘(请替换/dev/sdX为实际设备) sudo dd if=debian-live-13.0.0-amd64-gnome.iso of=/dev/sdX bs=4M status=progress oflag=sync 警告:这将完全擦除目标设备上的所有数据。 第二部分:启动并配置网络环境 启动到Live环境 从U盘启动 选择 “Advanced options” -> “Expert install” 或选择 “Rescue mode” 获得完整shell访问权限 配置网络连接 # 有线网络(通常自动配置) ip a # 无线网络配置 iwconfig wpa_supplicant -B -i wlan0 -c <(wpa_passphrase "SSID" "password") dhclient wlan0 设置系统时间 timedatectl set-ntp true 启用SSH(可选) # 切换到root用户 sudo -i # 安装必要软件包 apt install openssh-server vim # 设置用户密码 passwd user # 启动SSH服务 systemctl start ssh ip a # 查看IP地址 第三部分:磁盘分区 安装必要工具 apt install linux-headers-amd64 zfs-dkms arch-install-scripts gdisk 识别目标磁盘 ls /dev/disk/by-id lsblk fdisk -l 以下示例假设目标磁盘为 =/dev/nvme0n1=,请根据实际情况调整。 ...

September 15, 2025 · wang1zhen

sing-box webui 配置

安装 sing-box yay -S sing-box 获取订阅配置 从 prprcloud 后台复制订阅链接,然后下载到配置目录: curl -o ~/.config/sing-box/config.json '你的订阅链接' 如果在海外使用,选择直连/direct 节点。 运行 sing-box sudo sing-box run -c ~/.config/sing-box/config.json 使用 Dashboard 如果需要 Zashboard,直接访问: http://board.zash.run.place/ 在设置页无需填写任何内容。 如果不使用 Zashboard,也可以直接访问: http://localhost:9090 搭配 yacd 使用。 Aff 链接 prprcloud 订阅链接

September 15, 2025 · wang1zhen

修改网卡 MAC 地址

From https://superuser.com/questions/1011721/how-do-i-change-wifi-adapter-mac-address-for-win7-8-10-network-adapter-advance Edit Registry win+r regedit HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\00xx\NDI\params Replace 00xx with the numerical key associated with your network adapter by checking the DriverDesc string value. Under params, create a new key named NetworkAddress. Add the following string values under the NetworkAddress key: "optional"="1" "type"="edit" "uppercase"="1" "limittext"="12" "paramdesc"="Network Address" After completing the steps, check the “Advanced” tab in your network adapter’s properties. The “Network Address” field should appear. .reg file for reference: MAC.reg ...

October 16, 2024 · wang1zhen

盘丝洞弱电柜

盘丝洞弱电柜介绍 1 - 设备一览 先上全家福: 接下来就按照从外到内的顺序介绍吧。 光猫 上海电信千兆,已改桥接且拥有公网 IP,此外关闭了无用的 Wifi 功能来减少发热。 主路由 - TP-Link XDR 6080 主路由为 TP-Link 的 XDR6080,配合两台 XDR5430 组成 Easy Mesh,由主路由负责拨号。 旁路由 - J1900 小主机 旁路由/旁路网关/单臂路由……一众叫法不一,这里还是不妨就用较为通用的俗称旁路由吧。这是一台前几年购买的 4 网口 J1900 CPU 的 x86 软路由小主机,运行着一些服务(后文细说,如果有的话)。 NAS - 威联通 QNAP TS-464C 从先前的群晖 DS220+ 升级而来。四盘位目前只上了两个 16T 的硬盘组成 RAID 1,用于保存一些比较在乎的数据,例如照片备份、音乐库等,同样详情见后文。 NAS - E5 2666V3 Unraid 这台机器几乎全身都是二手硬件,硬盘甚至是服务器退役的 SAS 硬盘,除了硬件便宜几乎没有什么别的优点。 用来存储一些丢了也不心疼的数据(电影动漫大姐姐),以及虚拟机(核心多),还有一些 docker 应用。是的,如果有后文的话也会单独介绍…… 顺带一提,主板用的是精粤的主板,没有视频输出接口,因此哪怕是调 BIOS 也得用下面这块普普通通亮机卡来负责图形输出,好在 PCIE 通道数量倒是不用愁。 DELL 3050 小主机 无头小主机,安装了 Win 10 LTSC IOT,需要时可以拿来远程桌面管理家里的网络。 ...

September 18, 2024 · wang1zhen

在 Debian 稳定版中通过 APT Pinning 安装特定的 Sid 软件包

为了在 Debian 稳定版中安装特定来自 Sid 的软件包,同时保持系统的整体稳定性,可以通过 APT Pinning 来实现精细化的版本控制。 配置 APT Pinning 在 /etc/apt/preferences.d/sid 中设置优先级。 Package: * Pin: release a=stable Pin-Priority: 900 Package: * Pin: release a=stable-updates Pin-Priority: 900 Package: * Pin: release a=stable-security Pin-Priority: 900 Package: * Pin: release a=stable-backports Pin-Priority: 800 Package: * Pin: release a=unstable Pin-Priority: 100 只对特定包从 sid 更新 /etc/apt/preferences.d/sid Package: emacs-pgtk hugo eza Pin: release a=unstable Pin-Priority: 1001 应用 sudo apt update apt list --upgradable apt policy <some-package>

August 3, 2024 · wang1zhen