diff --git a/README.md b/README.md index f37cad1..e1e79ff 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Is this your first time here? You should definitely take a look at these scripts [![system-usb-udev](polybar-scripts/system-usb-udev/screenshots/2.png)](polybar-scripts/system-usb-udev/) [![openweathermap-simple](polybar-scripts/openweathermap-simple/screenshots/1.png)](polybar-scripts/openweathermap-simple/) [![openweathermap-detailed](polybar-scripts/openweathermap-detailed/screenshots/1.png)](polybar-scripts/openweathermap-detailed/) +[![info-xampp](polybar-scripts/info-xampp/screenshots/1.png)](polybar-scripts/info-xampp/) [![player-mpris-tail](polybar-scripts/player-mpris-tail/screenshots/1.png)](polybar-scripts/player-mpris-tail/) [![info-redshift-temp](polybar-scripts/info-redshift-temp/screenshots/1.png)](polybar-scripts/info-redshift-temp/) [![hint-trash](polybar-scripts/hint-trash/screenshots/1.png)](polybar-scripts/hint-trash/) diff --git a/polybar-scripts/info-xampp-status/README.md b/polybar-scripts/info-xampp-status/README.md deleted file mode 100644 index 016258a..0000000 --- a/polybar-scripts/info-xampp-status/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Script: XAMPP status ![Github](screenshots/1.png) - -The Script prints the status of XAMPP services (Apache, MySQL, ProFTPD) if they are running. Otherwise, the script prints nothing. - -![screenshots](screenshots/xampp-status.png) - - -## Dependencies -[XAMPP](https://www.apachefriends.org/de/index.html) - -## Module - -``` -[module/xampp] -type = custom/script -interval = 10 -label = %output% -exec = ~/./.skript/xampp-status.sh -``` - -## Troubleshooting -To show the MySQL Server status, the script must own a file in /opt/lampp/var/MySQL.
-To solve this I edited the xampp script in /opt/lampp/ in the startMySQL() function, ![MySQL Troubleshooting](screenshots/xampp-mysql.png)
-The sleep is imported because the file need some time to create. -The file is owned by the mysql user. May you can fix that problem on Otherwise. This is only one solution. diff --git a/polybar-scripts/info-xampp-status/screenshots/1.png b/polybar-scripts/info-xampp-status/screenshots/1.png deleted file mode 100644 index 8b25551..0000000 Binary files a/polybar-scripts/info-xampp-status/screenshots/1.png and /dev/null differ diff --git a/polybar-scripts/info-xampp-status/screenshots/xampp-mysql.png b/polybar-scripts/info-xampp-status/screenshots/xampp-mysql.png deleted file mode 100644 index 562dbf0..0000000 Binary files a/polybar-scripts/info-xampp-status/screenshots/xampp-mysql.png and /dev/null differ diff --git a/polybar-scripts/info-xampp-status/screenshots/xampp-status.png b/polybar-scripts/info-xampp-status/screenshots/xampp-status.png deleted file mode 100644 index f8598b7..0000000 Binary files a/polybar-scripts/info-xampp-status/screenshots/xampp-status.png and /dev/null differ diff --git a/polybar-scripts/info-xampp-status/xampp-status.sh b/polybar-scripts/info-xampp-status/xampp-status.sh deleted file mode 100755 index 17d634f..0000000 --- a/polybar-scripts/info-xampp-status/xampp-status.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -a=$(/./opt/lampp/xampp status | grep Apa | cut -d " " -f3) -m=$(/./opt/lampp/xampp status | grep My | cut -d " " -f3) -f=$(/./opt/lampp/xampp status | grep Pro | cut -d " " -f3) -ret=""; - - -if [ "$a" != "not" ]; then - ret="A: %{F#0fe108}X%{F-}" -fi -if [ "$m" != "not" ]; then - ret="$ret M: %{F#0fe108}X%{F-}" -fi -if [ "$f" != "deactivated." ]; then - ret="$ret F: %{F#0fe108}X%{F-}" -fi -echo "$ret" \ No newline at end of file diff --git a/polybar-scripts/info-xampp/README.md b/polybar-scripts/info-xampp/README.md index 7ef9d4c..2a0c8c6 100644 --- a/polybar-scripts/info-xampp/README.md +++ b/polybar-scripts/info-xampp/README.md @@ -5,6 +5,15 @@ The Script prints the status of [XAMPP](https://www.apachefriends.org/de/index.h ![info-xampp](screenshots/1.png) +## Dependencies + +Create a sudo rule to allow you user to read the status information. + +```ini +username ALL = NOPASSWD: /opt/lampp/xampp +``` + + ## Module ```ini @@ -13,11 +22,3 @@ type = custom/script exec = ~/polybar-scripts/info-xampp.sh interval = 10 ``` - -## Troubleshooting - -To show the MySQL Server status, the script must own a file in /opt/lampp/var/MySQL. To solve this I edited the xampp script in /opt/lampp/ in the startMySQL() function. - -![MySQL Troubleshooting](screenshots/xampp-mysql.png) - -The sleep is imported because the file need some time to create. The file is owned by the mysql user. May you can fix that problem on Otherwise. This is only one solution. diff --git a/polybar-scripts/info-xampp/info-xampp.sh b/polybar-scripts/info-xampp/info-xampp.sh index 83b4382..63f1fd4 100755 --- a/polybar-scripts/info-xampp/info-xampp.sh +++ b/polybar-scripts/info-xampp/info-xampp.sh @@ -1,21 +1,21 @@ #!/bin/sh -if /./opt/lampp/xampp status | grep -q "Apache is running."; then - status_apache="#11" +if sudo /opt/lampp/xampp status | grep -q "Apache is running."; then + status_apache="#11" else - status_apache="#12" + status_apache="#12" fi -if /./opt/lampp/xampp status |grep -q "MySQL is running."; then - status_mysql="#21" +if sudo /opt/lampp/xampp status |grep -q "MySQL is running."; then + status_mysql="#21" else - status_mysql="#22" + status_mysql="#22" fi -if /./opt/lampp/xampp status | grep -q "ProFTPD is running."; then - status_ftp="#31" +if sudo /opt/lampp/xampp status | grep -q "ProFTPD is running."; then + status_ftp="#31" else - status_ftp="#32" + status_ftp="#32" fi echo "$status_apache $status_mysql $status_ftp"