feat(ranger): 添加Ranger配置文件

This commit is contained in:
2025-12-15 10:02:47 +08:00
parent c1b5852314
commit 66e64a7774
18 changed files with 4279 additions and 2 deletions

View File

@@ -4,3 +4,6 @@
exec-once = fcitx5 &
exec-once = waybar
exec-once = hyprpaper
exec-once = awww-daemon
exec-once = sleep 2 && ~/.config/hypr/scripts/change-wallpaper.sh

4
hypr/hyprpaper.conf Normal file
View File

@@ -0,0 +1,4 @@
ipc = off
splash = false
preload = /home/kody/Pictures/Wallpapers/wallhaven-vpq9xl_1920x1080.png
wallpaper = , /home/kody/Pictures/Wallpapers/wallhaven-vpq9xl_1920x1080.png

View File

@@ -0,0 +1,31 @@
#!/bin/sh
WALLPAPER_DIR="$HOME/Pictures/Wallpapers/"
CACHE_FILE="$HOME/.cache/current_wallpaper"
# 确保目录存在
mkdir -p "$(dirname "$CACHE_FILE")" 2>/dev/null
[ -d "$WALLPAPER_DIR" ] || mkdir -p "$WALLPAPER_DIR"
NEXT_WALLPAPER=$(find "$WALLPAPER_DIR" -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" -o -name "*.webp" \) 2>/dev/null | shuf -n1)
if [ -z "$NEXT_WALLPAPER" ]; then
echo "⚠️ 未找到壁纸文件,请添加图片到: $WALLPAPER_DIR"
exit 1
fi
# 初始化 awww (如果未运行)
if ! pgrep -x awww-daemon >/dev/null; then
awww-daemon
fi
# 平滑切换壁纸 - 与 swww 完全兼容的命令
awww img "$NEXT_WALLPAPER" \
--transition-type=wipe \
--transition-duration=1.5 \
--transition-fps=60 \
--transition-angle=30 \
--transition-bezier=.43,1.19,1,.4
# 保存当前壁纸
echo "$NEXT_WALLPAPER" > "$CACHE_FILE"
echo "✅ 壁纸已切换: $(basename "$NEXT_WALLPAPER")"

3
hypr/scripts/test.sh Normal file
View File

@@ -0,0 +1,3 @@
WALLPAPER_DIR="$HOME/Pictures/Wallpapers/"
NEXT_WALLPAPER=$(find "$WALLPAPER_DIR" -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" -o -name "*.webp" \) 2>/dev/null | shuf -n1)
echo "$NEXT_WALLPAPER"