diff options
Diffstat (limited to 'scripts/switch_wallpaper.sh')
| -rwxr-xr-x | scripts/switch_wallpaper.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/switch_wallpaper.sh b/scripts/switch_wallpaper.sh index 90842d0..a499d45 100755 --- a/scripts/switch_wallpaper.sh +++ b/scripts/switch_wallpaper.sh @@ -1,11 +1,17 @@ #!/bin/bash -# 壁纸切换:wofi 选择 -> 写入 current_wallpaper -> 重载 swaybg +# 壁纸切换:noctalia 优先,否则回退到 wofi 选择 -> 写入 current_wallpaper -> 重载 swaybg WALLPAPER_DIR="/home/catilgrass/图片/Wallpapers" CURRENT_FILE="/home/catilgrass/.config/hypr/current_wallpaper" THUMB_DIR="/tmp/wallpaper_thumbs" +# 如果 noctalia 正在运行,直接调用其消息接口 +if pgrep -x noctalia > /dev/null 2>&1; then + noctalia msg panel-open wallpaper + exit $? +fi + # 检查壁纸目录 if [ ! -d "$WALLPAPER_DIR" ]; then echo "错误: 壁纸目录不存在: $WALLPAPER_DIR" |
