Updates
This commit is contained in:
parent
4d7bfebf25
commit
4d85963ea4
@ -1,12 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
_getHeader "$name" "$author"
|
_getHeader "$name" "$author"
|
||||||
|
|
||||||
echo "Hide the bluetooth icon in waybar."
|
echo "Hide the bluetooth icon in ML4W waybar themes."
|
||||||
|
|
||||||
# Define File
|
# 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."
|
echo "ERROR: Target file not found."
|
||||||
sleep 2
|
sleep 2
|
||||||
_goBack
|
_goBack
|
||||||
@ -33,14 +36,35 @@ if [ ! -z $customvalue ]; then
|
|||||||
customtext="${customtemplate/VALUE/"$customvalue"}"
|
customtext="${customtemplate/VALUE/"$customvalue"}"
|
||||||
|
|
||||||
# Ensure that markers are in target file
|
# 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
|
# Write into File
|
||||||
sed -i '/'"$startMarker"'/,/'"$endMarker"'/ {
|
sed -i '/'"$startMarker"'/,/'"$endMarker"'/ {
|
||||||
//!d
|
//!d
|
||||||
/'"$startMarker"'/a\
|
/'"$startMarker"'/a\
|
||||||
'"$customtext"'
|
'"$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
|
# Reload Waybar
|
||||||
setsid $HOME/dotfiles/waybar/launch.sh 1>/dev/null 2>&1 &
|
setsid $HOME/dotfiles/waybar/launch.sh 1>/dev/null 2>&1 &
|
||||||
|
@ -46,7 +46,9 @@
|
|||||||
"modules-right": [
|
"modules-right": [
|
||||||
"custom/updates",
|
"custom/updates",
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
|
// START BT TOOGLE
|
||||||
"bluetooth",
|
"bluetooth",
|
||||||
|
// END BT TOOGLE
|
||||||
"battery",
|
"battery",
|
||||||
"network",
|
"network",
|
||||||
"group/hardware",
|
"group/hardware",
|
||||||
|
@ -49,7 +49,9 @@
|
|||||||
"modules-right": [
|
"modules-right": [
|
||||||
"custom/updates",
|
"custom/updates",
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
|
// START BT TOOGLE
|
||||||
"bluetooth",
|
"bluetooth",
|
||||||
|
// END BT TOOGLE
|
||||||
"battery",
|
"battery",
|
||||||
"network",
|
"network",
|
||||||
"group/hardware",
|
"group/hardware",
|
||||||
|
@ -49,7 +49,9 @@
|
|||||||
"modules-right": [
|
"modules-right": [
|
||||||
"custom/updates",
|
"custom/updates",
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
|
// START BT TOOGLE
|
||||||
"bluetooth",
|
"bluetooth",
|
||||||
|
// END BT TOOGLE
|
||||||
"battery",
|
"battery",
|
||||||
"network",
|
"network",
|
||||||
"group/hardware",
|
"group/hardware",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user