Initial import: Lua config, trimmed omarchy scripts, theme system
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# archypr:summary=Set the current background image
|
||||
# archypr:args=<path-to-image>
|
||||
# archypr:examples=omarchy theme bg set ~/Pictures/wallpaper.png
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo "Usage: archypr-theme-bg-set <path-to-image>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BACKGROUND="$(realpath "$1")"
|
||||
CURRENT_BACKGROUND_LINK="$HOME/.config/omarchy/current/background"
|
||||
|
||||
if [[ ! -f "$BACKGROUND" ]]; then
|
||||
echo "File does not exist: $BACKGROUND" >&2
|
||||
exit 1
|
||||
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 &
|
||||
Reference in New Issue
Block a user