mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Make patching more resilient
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
echo "Add voxtype to waybar"
|
echo "Add voxtype to waybar"
|
||||||
|
|
||||||
patch -N ~/.config/waybar/style.css << 'EOF'
|
failed=0
|
||||||
|
|
||||||
|
if ! patch -N ~/.config/waybar/style.css << 'EOF'
|
||||||
--- a/waybar/style.css
|
--- a/waybar/style.css
|
||||||
+++ b/waybar/style.css
|
+++ b/waybar/style.css
|
||||||
@@ -74,10 +74,16 @@ tooltip {
|
@@ -74,10 +74,16 @@ tooltip {
|
||||||
@@ -22,8 +24,11 @@ patch -N ~/.config/waybar/style.css << 'EOF'
|
|||||||
+ margin: 0 0 0 7.5px;
|
+ margin: 0 0 0 7.5px;
|
||||||
+}
|
+}
|
||||||
EOF
|
EOF
|
||||||
|
then
|
||||||
|
failed=1
|
||||||
|
fi
|
||||||
|
|
||||||
patch -N ~/.config/waybar/config.jsonc << 'EOF'
|
if ! patch -N ~/.config/waybar/config.jsonc << 'EOF'
|
||||||
--- a/waybar/config.jsonc
|
--- a/waybar/config.jsonc
|
||||||
+++ b/waybar/config.jsonc
|
+++ b/waybar/config.jsonc
|
||||||
@@ -5,7 +5,7 @@
|
@@ -5,7 +5,7 @@
|
||||||
@@ -56,5 +61,17 @@ patch -N ~/.config/waybar/config.jsonc << 'EOF'
|
|||||||
"icon-size": 12,
|
"icon-size": 12,
|
||||||
"spacing": 17
|
"spacing": 17
|
||||||
EOF
|
EOF
|
||||||
|
then
|
||||||
|
failed=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $failed -eq 1 ]; then
|
||||||
|
echo -e "\033[31mUnable to update Waybar config automatically.\033[0m"
|
||||||
|
echo
|
||||||
|
|
||||||
|
if gum confirm "Reset waybar config to default to get Voxtype dictation integration?"; then
|
||||||
|
omarchy-refresh-waybar
|
||||||
|
fi
|
||||||
|
else
|
||||||
omarchy-restart-waybar
|
omarchy-restart-waybar
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user