diff --git a/hypr/settings/modules/waybar/bluetooth/module.sh b/hypr/settings/modules/waybar/bluetooth/module.sh index 88966fa..2b6f5df 100755 --- a/hypr/settings/modules/waybar/bluetooth/module.sh +++ b/hypr/settings/modules/waybar/bluetooth/module.sh @@ -1,12 +1,15 @@ #!/bin/bash _getHeader "$name" "$author" -echo "Hide the bluetooth icon in waybar." +echo "Hide the bluetooth icon in ML4W waybar themes." # Define File -targetFile="$HOME/dotfiles/waybar/themes/ml4w/config" +targetFile1="$HOME/dotfiles/waybar/themes/ml4w/config" +targetFile2="$HOME/dotfiles/waybar/themes/ml4w-blur/config" +targetFile3="$HOME/dotfiles/waybar/themes/ml4w-blur-bottom/config" +targetFile4="$HOME/dotfiles/waybar/themes/ml4w-bottom/config" -if [ ! -f $targetFile ] ;then +if [ ! -f $targetFile1 ] || [ ! -f $targetFile2 ] || [ ! -f $targetFile3 ] || [ ! -f $targetFile4 ] ;then echo "ERROR: Target file not found." sleep 2 _goBack @@ -33,14 +36,35 @@ if [ ! -z $customvalue ]; then customtext="${customtemplate/VALUE/"$customvalue"}" # Ensure that markers are in target file - if grep -s "$startMarker" $targetFile && grep -s "$endMarker" $targetFile; then + if grep -s "$startMarker" $targetFile1 && grep -s "$endMarker" $targetFile1 && grep -s "$startMarker" $targetFile2 && grep -s "$endMarker" $targetFile2 && grep -s "$startMarker" $targetFile3 && grep -s "$endMarker" $targetFile3 && grep -s "$startMarker" $targetFile4 && grep -s "$endMarker" $targetFile4; then # Write into File sed -i '/'"$startMarker"'/,/'"$endMarker"'/ { //!d /'"$startMarker"'/a\ '"$customtext"' - }' $targetFile + }' $targetFile1 + + # Write into File + sed -i '/'"$startMarker"'/,/'"$endMarker"'/ { + //!d + /'"$startMarker"'/a\ + '"$customtext"' + }' $targetFile2 + + # Write into File + sed -i '/'"$startMarker"'/,/'"$endMarker"'/ { + //!d + /'"$startMarker"'/a\ + '"$customtext"' + }' $targetFile3 + + # Write into File + sed -i '/'"$startMarker"'/,/'"$endMarker"'/ { + //!d + /'"$startMarker"'/a\ + '"$customtext"' + }' $targetFile4 # Reload Waybar setsid $HOME/dotfiles/waybar/launch.sh 1>/dev/null 2>&1 & diff --git a/waybar/themes/ml4w-blur-bottom/config b/waybar/themes/ml4w-blur-bottom/config index 8fbccf6..23eb158 100644 --- a/waybar/themes/ml4w-blur-bottom/config +++ b/waybar/themes/ml4w-blur-bottom/config @@ -46,7 +46,9 @@ "modules-right": [ "custom/updates", "pulseaudio", + // START BT TOOGLE "bluetooth", + // END BT TOOGLE "battery", "network", "group/hardware", diff --git a/waybar/themes/ml4w-blur/config b/waybar/themes/ml4w-blur/config index 5234742..608f028 100644 --- a/waybar/themes/ml4w-blur/config +++ b/waybar/themes/ml4w-blur/config @@ -49,7 +49,9 @@ "modules-right": [ "custom/updates", "pulseaudio", + // START BT TOOGLE "bluetooth", + // END BT TOOGLE "battery", "network", "group/hardware", diff --git a/waybar/themes/ml4w-bottom/config b/waybar/themes/ml4w-bottom/config index 2a1ebca..0dbdb34 100644 --- a/waybar/themes/ml4w-bottom/config +++ b/waybar/themes/ml4w-bottom/config @@ -49,7 +49,9 @@ "modules-right": [ "custom/updates", "pulseaudio", + // START BT TOOGLE "bluetooth", + // END BT TOOGLE "battery", "network", "group/hardware",