summaryrefslogtreecommitdiff
path: root/scripts/switch_wallpaper.sh
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-14 08:49:11 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-14 08:49:11 +0800
commit96b802d74d5268b1fbacd41ebfc2ea2bed947ff3 (patch)
tree90ecab0794139fe9e85d5e0657f02bb1e5459860 /scripts/switch_wallpaper.sh
parentf3347980f311bfeb650c679cf4f048d5b1db608f (diff)
feat: integrate noctalia as primary shell and launcherHEADmaster
Replace ashell with noctalia for startup, add fallback logic to use noctalia when available, otherwise fall back to wofi-based tools for launcher, wallpaper picking, and screenshots.
Diffstat (limited to 'scripts/switch_wallpaper.sh')
-rwxr-xr-xscripts/switch_wallpaper.sh8
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"