Created
April 30, 2020 14:03
-
-
Save m-rey/bbfbc90cdcea21a11b7932203bd6be78 to your computer and use it in GitHub Desktop.
Waybar module to display how many users are connected to a minecraft server. Displays usernames on left click and opens the TLauncher Minecraft client flatpak on right click.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"custom/minecraft": { | |
"format": "⬢ {}", | |
"interval": 10, | |
"exec": "printf '\\x06\\x00\\x00\\x00\\x00\\x00\\x01\\x01\\x00' | nc -N $SERVER_IP $SERVER_PORT | tr -cd '[:print:]' | jq -r '.players.online, .players.max'| xargs printf '%d/%d'", | |
"on-click": "printf '\\x06\\x00\\x00\\x00\\x00\\x00\\x01\\x01\\x00' | nc -N $SERVER_IP $SERVER_PORT | tr -cd '[:print:]' | jq -r '.players.sample[] | .name' | xargs -0 notify-send 'online users'", | |
"on-click-right": "flatpak run org.tlauncher.TLauncher" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment