Updates
This commit is contained in:
parent
4d7bfebf25
commit
4d85963ea4
@ -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 &
|
||||
|
@ -46,7 +46,9 @@
|
||||
"modules-right": [
|
||||
"custom/updates",
|
||||
"pulseaudio",
|
||||
// START BT TOOGLE
|
||||
"bluetooth",
|
||||
// END BT TOOGLE
|
||||
"battery",
|
||||
"network",
|
||||
"group/hardware",
|
||||
|
@ -49,7 +49,9 @@
|
||||
"modules-right": [
|
||||
"custom/updates",
|
||||
"pulseaudio",
|
||||
// START BT TOOGLE
|
||||
"bluetooth",
|
||||
// END BT TOOGLE
|
||||
"battery",
|
||||
"network",
|
||||
"group/hardware",
|
||||
|
@ -49,7 +49,9 @@
|
||||
"modules-right": [
|
||||
"custom/updates",
|
||||
"pulseaudio",
|
||||
// START BT TOOGLE
|
||||
"bluetooth",
|
||||
// END BT TOOGLE
|
||||
"battery",
|
||||
"network",
|
||||
"group/hardware",
|
||||
|
Loading…
Reference in New Issue
Block a user