diff --git a/bin/omarchy-first-run b/bin/omarchy-first-run index 97b41f80..277b0b2d 100755 --- a/bin/omarchy-first-run +++ b/bin/omarchy-first-run @@ -18,6 +18,7 @@ if [[ -f $FIRST_RUN_MODE ]]; then bash "$OMARCHY_PATH/install/first-run/gnome-theme.sh" bash "$OMARCHY_PATH/install/first-run/gdk-scale.sh" bash "$OMARCHY_PATH/install/first-run/swayosd.sh" + bash "$OMARCHY_PATH/install/first-run/skwd-wall.sh" bash "$OMARCHY_PATH/install/first-run/gtk-primary-paste.sh" bash "$OMARCHY_PATH/install/first-run/elephant.sh" omarchy-hook-install post-update "$OMARCHY_PATH/install/first-run/install-voxtype.hook" diff --git a/bin/omarchy-restart-skwd-wall b/bin/omarchy-restart-skwd-wall new file mode 100755 index 00000000..c83521d6 --- /dev/null +++ b/bin/omarchy-restart-skwd-wall @@ -0,0 +1,5 @@ +#!/bin/bash + +# omarchy:summary=Restart Skwd-wall wallpaper daemon + +systemctl --user restart skwd-daemon.service 2>/dev/null || true diff --git a/bin/omarchy-theme-bg-next b/bin/omarchy-theme-bg-next index e2d0bd4a..a559431e 100755 --- a/bin/omarchy-theme-bg-next +++ b/bin/omarchy-theme-bg-next @@ -12,9 +12,7 @@ mapfile -d '' -t BACKGROUNDS < <(find -L "$USER_BACKGROUNDS_PATH" "$THEME_BACKGR TOTAL=${#BACKGROUNDS[@]} if (( TOTAL == 0 )); then - notify-send "No background was found for theme" -t 2000 - pkill -x swaybg - setsid uwsm-app -- swaybg --color '#000000' >/dev/null 2>&1 & + omarchy-notification-send "No background was found for theme" -t 2000 else # Get current background from symlink if [[ -L $CURRENT_BACKGROUND_LINK ]]; then @@ -45,7 +43,6 @@ else # Set new background symlink ln -nsf "$NEW_BACKGROUND" "$CURRENT_BACKGROUND_LINK" - # Relaunch swaybg - pkill -x swaybg - setsid uwsm-app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 & +# Apply the new background through Skwd-wall +skwd wall apply "{\"type\":\"static\",\"path\":\"$CURRENT_BACKGROUND_LINK\"}" >/dev/null fi diff --git a/bin/omarchy-theme-bg-set b/bin/omarchy-theme-bg-set index 9c695d0e..1eb00009 100755 --- a/bin/omarchy-theme-bg-set +++ b/bin/omarchy-theme-bg-set @@ -20,6 +20,5 @@ fi # Create symlink to the new background ln -nsf "$BACKGROUND" "$CURRENT_BACKGROUND_LINK" -# Kill existing swaybg and start new one -pkill -x swaybg -setsid uwsm-app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 & +# Apply the new background through Skwd-wall +skwd wall apply "{\"type\":\"static\",\"path\":\"$CURRENT_BACKGROUND_LINK\"}" >/dev/null diff --git a/bin/omarchy-theme-set b/bin/omarchy-theme-set index fe57c2af..a10d6c27 100755 --- a/bin/omarchy-theme-set +++ b/bin/omarchy-theme-set @@ -68,6 +68,7 @@ omarchy-theme-set-browser omarchy-theme-set-vscode omarchy-theme-set-obsidian omarchy-theme-set-keyboard +omarchy-theme-set-skwd-wall # Call hook on theme set omarchy-hook theme-set "$THEME_NAME" >/dev/null diff --git a/bin/omarchy-theme-set-skwd-wall b/bin/omarchy-theme-set-skwd-wall new file mode 100755 index 00000000..787908eb --- /dev/null +++ b/bin/omarchy-theme-set-skwd-wall @@ -0,0 +1,14 @@ +#!/bin/bash + +# omarchy:summary=Refresh Skwd-wall after an Omarchy theme change +# omarchy:hidden=true + +THEME_COLORS="$HOME/.config/omarchy/current/theme/skwd-wall-colors.json" +SKWD_COLORS="$HOME/.cache/skwd-wall/colors.json" + +if [[ -f $THEME_COLORS ]]; then + mkdir -p "$(dirname "$SKWD_COLORS")" + cp "$THEME_COLORS" "$SKWD_COLORS" +fi + +skwd wall cache_rebuild >/dev/null diff --git a/config/skwd-wall/config.json b/config/skwd-wall/config.json new file mode 100644 index 00000000..aaa2d7e6 --- /dev/null +++ b/config/skwd-wall/config.json @@ -0,0 +1,79 @@ +{ + "compositor": "hyprland", + "monitor": "", + "general": { + "locale": "", + "closeOnSelection": true, + "reopenAtLastSelection": false, + "filterBarAlwaysVisible": false, + "notifyOnWallpaperChange": false, + "randomIncludeWE": false, + "randomIncludeFavourites": false + }, + "paths": { + "wallpaper": "~/.config/omarchy/current/theme/backgrounds", + "videoWallpaper": "~/videowalls", + "cache": "", + "templates": "", + "scripts": "", + "steam": "", + "steamWorkshop": "", + "steamWeAssets": "" + }, + "features": { + "matugen": false, + "ollama": false, + "steam": false, + "wallhaven": false + }, + "colorSource": "magick", + "ollama": { + "url": "http://localhost:11434", + "model": "gemma3:4b", + "consolidateEnabled": true + }, + "steam": { + "apiKey": "", + "username": "" + }, + "wallhaven": { + "apiKey": "" + }, + "matugen": { + "schemeType": "scheme-fidelity", + "mode": "dark" + }, + "integrations": [], + "components": { + "wallpaperSelector": { + "displayMode": "slices", + "sliceSpacing": -30, + "hexScrollStep": 1, + "customPresets": {}, + "expandedWidth": 768, + "sliceHeight": 432, + "sliceWidth": 108, + "visibleCount": 14, + "skewOffset": 28 + } + }, + "wallpaperMute": true, + "pickOnlyMode": false, + "externalWallpaperCommand": "", + "postProcessing": [], + "performance": { + "imageOptimizePreset": "balanced", + "imageOptimizeResolution": "4k", + "videoConvertPreset": "balanced", + "videoConvertResolution": "2k", + "autoOptimizeImages": false, + "autoConvertVideos": false, + "imageTrashDays": 7, + "videoTrashDays": 7, + "autoDeleteImageTrash": false, + "autoDeleteVideoTrash": false + }, + "transition": { + "durationMs": 200 + } +} diff --git a/default/hypr/autostart.lua b/default/hypr/autostart.lua index 7eed5fbb..3ac29274 100644 --- a/default/hypr/autostart.lua +++ b/default/hypr/autostart.lua @@ -3,7 +3,6 @@ hl.on("hyprland.start", function() hl.exec_cmd("uwsm-app -- mako") hl.exec_cmd("! omarchy-toggle-enabled waybar-off && uwsm-app -- waybar") hl.exec_cmd("uwsm-app -- fcitx5 --disable notificationitem") - hl.exec_cmd("uwsm-app -- swaybg -i ~/.config/omarchy/current/background -m fill") hl.exec_cmd("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1") hl.exec_cmd("omarchy-first-run") hl.exec_cmd("omarchy-powerprofiles-init") diff --git a/default/themed/skwd-wall-colors.json.tpl b/default/themed/skwd-wall-colors.json.tpl new file mode 100644 index 00000000..60d0c05e --- /dev/null +++ b/default/themed/skwd-wall-colors.json.tpl @@ -0,0 +1,27 @@ +{ + "primary": "{{ accent }}", + "primaryText": "{{ selection_foreground }}", + "primaryContainer": "{{ selection_background }}", + "primaryContainerText": "{{ selection_foreground }}", + "onPrimary": "{{ selection_foreground }}", + "secondary": "{{ color2 }}", + "secondaryText": "{{ background }}", + "secondaryContainer": "{{ color8 }}", + "secondaryContainerText": "{{ foreground }}", + "tertiary": "{{ active_border_color }}", + "tertiaryText": "{{ background }}", + "tertiaryContainer": "{{ color12 }}", + "tertiaryContainerText": "{{ foreground }}", + "background": "{{ background }}", + "backgroundText": "{{ foreground }}", + "surface": "{{ background }}", + "surfaceText": "{{ foreground }}", + "surfaceVariant": "{{ color8 }}", + "surfaceVariantText": "{{ foreground }}", + "surfaceContainer": "{{ color10 }}", + "outline": "{{ active_border_color }}", + "shadow": "#000000", + "inverseSurface": "{{ foreground }}", + "inverseSurfaceText": "{{ background }}", + "inversePrimary": "{{ accent }}" +} diff --git a/install/first-run/skwd-wall.sh b/install/first-run/skwd-wall.sh new file mode 100644 index 00000000..a3e95d1e --- /dev/null +++ b/install/first-run/skwd-wall.sh @@ -0,0 +1,2 @@ +systemctl --user daemon-reload +systemctl --user enable --now skwd-daemon.service diff --git a/install/omarchy-base.packages b/install/omarchy-base.packages index acdddc47..6ee75819 100644 --- a/install/omarchy-base.packages +++ b/install/omarchy-base.packages @@ -117,7 +117,7 @@ spotify socat starship sushi -swaybg +skwd-wall swayosd system-config-printer tesseract diff --git a/migrations/1778494413.sh b/migrations/1778494413.sh new file mode 100644 index 00000000..7e045b50 --- /dev/null +++ b/migrations/1778494413.sh @@ -0,0 +1,16 @@ +echo "Replace swaybg with Skwd-wall for wallpaper selection" + +omarchy-pkg-add skwd-wall +omarchy-pkg-drop swaybg + +if [[ ! -f ~/.config/skwd-wall/config.json ]]; then + mkdir -p ~/.config/skwd-wall + cp "$OMARCHY_PATH/config/skwd-wall/config.json" ~/.config/skwd-wall/config.json +fi + +omarchy-theme-refresh + +systemctl --user daemon-reload +systemctl --user enable --now skwd-daemon.service 2>/dev/null || true + +skwd wall apply "{\"type\":\"static\",\"path\":\"$HOME/.config/omarchy/current/background\"}" >/dev/null 2>&1 || true