Updates
This commit is contained in:
2
hypr/settings/modules/system/nmapplet/config.sh
Normal file
2
hypr/settings/modules/system/nmapplet/config.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
name="nw-applet "
|
||||
order=1
|
||||
35
hypr/settings/modules/system/nmapplet/module.sh
Executable file
35
hypr/settings/modules/system/nmapplet/module.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
echo "Enable or disable the network manager applet (nw-applet) in the Systray."
|
||||
echo "(nw-applet must be installed on your system)"
|
||||
echo "IMPORTANT: Please reboot your system after a change."
|
||||
echo
|
||||
# Define File
|
||||
targetFile1="$HOME/dotfiles/hypr/conf/autostart.conf"
|
||||
settingsFile="$HOME/dotfiles/.settings/waybar_nmapplet"
|
||||
|
||||
# Define Markers
|
||||
startMarker="START NM APPLET"
|
||||
endMarker="END NM APPLET"
|
||||
|
||||
# Select Value
|
||||
customvalue=$(gum choose "Enable" "Disable")
|
||||
|
||||
if [ ! -z $customvalue ]; then
|
||||
if [ "$customvalue" == "Enable" ] ;then
|
||||
customtext="exec-once = nm-applet"
|
||||
else
|
||||
customtext="# exec-once = nm-applet"
|
||||
fi
|
||||
|
||||
_replaceInFile $startMarker $endMarker $customtext $targetFile1
|
||||
_writeSettings $settingsFile $customtext
|
||||
|
||||
# Reload Waybar
|
||||
_goBack
|
||||
else
|
||||
echo "ERROR: Define a value."
|
||||
sleep 2
|
||||
_goBack
|
||||
fi
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
echo "Hide or show the bluetooth icon in ML4W waybar themes."
|
||||
echo "Hide or show the bluetooth module in ML4W waybar themes."
|
||||
|
||||
# Define File
|
||||
targetFile1="$HOME/dotfiles/waybar/themes/ml4w/config"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
echo "Define the start command to start the networkmanager."
|
||||
echo "Define the start command to start the networkmanager (Must be installed on your system)."
|
||||
echo "Possible values: alacritty -e nmtui, nm-connection-editor, etc."
|
||||
|
||||
# Define File
|
||||
targetFile="$HOME/dotfiles/.settings/networkmanager.sh"
|
||||
|
||||
2
hypr/settings/modules/waybar/network/config.sh
Normal file
2
hypr/settings/modules/waybar/network/config.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
name="Show/Hide Network"
|
||||
order=1
|
||||
40
hypr/settings/modules/waybar/network/module.sh
Executable file
40
hypr/settings/modules/waybar/network/module.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
_getHeader "$name" "$author"
|
||||
|
||||
echo "Hide or show the network module in ML4W waybar themes."
|
||||
|
||||
# Define File
|
||||
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"
|
||||
settingsFile="$HOME/dotfiles/.settings/waybar_network"
|
||||
|
||||
# Define Markers
|
||||
startMarker="START NETWORK TOOGLE"
|
||||
endMarker="END NETWORK TOOGLE"
|
||||
|
||||
# Select Value
|
||||
customvalue=$(gum choose "SHOW" "HIDE")
|
||||
|
||||
if [ ! -z $customvalue ]; then
|
||||
if [ "$customvalue" == "SHOW" ] ;then
|
||||
customtext=" \"network\","
|
||||
else
|
||||
customtext=" \/\/\"network\","
|
||||
fi
|
||||
|
||||
_replaceInFile $startMarker $endMarker $customtext $targetFile1
|
||||
_replaceInFile $startMarker $endMarker $customtext $targetFile2
|
||||
_replaceInFile $startMarker $endMarker $customtext $targetFile3
|
||||
_replaceInFile $startMarker $endMarker $customtext $targetFile4
|
||||
_writeSettings $settingsFile $customtext
|
||||
|
||||
# Reload Waybar
|
||||
setsid $HOME/dotfiles/waybar/launch.sh 1>/dev/null 2>&1 &
|
||||
_goBack
|
||||
else
|
||||
echo "ERROR: Define a value."
|
||||
sleep 2
|
||||
_goBack
|
||||
fi
|
||||
Reference in New Issue
Block a user