Fix symlink paths to use absolute paths
Changed scripts to use realpath() to create absolute symlinks instead of relative paths, which were breaking with filenames containing special characters. Also added sleep delay before restarting waybar.
This commit is contained in:
parent
af8f372739
commit
600a35020b
@ -21,9 +21,11 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$choice" ]]; then
|
if [[ -n "$choice" ]]; then
|
||||||
ln -sf "$waybar_layouts/$choice" "$waybar_config"
|
# Use absolute path for the symlink target
|
||||||
|
ln -sf "$(realpath "$waybar_layouts/$choice")" "$waybar_config"
|
||||||
echo "Switched to: $choice"
|
echo "Switched to: $choice"
|
||||||
killall waybar
|
killall waybar
|
||||||
|
sleep 0.5
|
||||||
waybar &
|
waybar &
|
||||||
else
|
else
|
||||||
echo "No selection made"
|
echo "No selection made"
|
||||||
|
|||||||
@ -21,9 +21,11 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$choice" ]]; then
|
if [[ -n "$choice" ]]; then
|
||||||
ln -sf "$waybar_styles/$choice" "$waybar_css"
|
# Use absolute path for the symlink target
|
||||||
|
ln -sf "$(realpath "$waybar_styles/$choice")" "$waybar_css"
|
||||||
echo "Switched to: $choice"
|
echo "Switched to: $choice"
|
||||||
killall waybar
|
killall waybar
|
||||||
|
sleep 0.5
|
||||||
waybar &
|
waybar &
|
||||||
else
|
else
|
||||||
echo "No selection made"
|
echo "No selection made"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user