Last active
September 14, 2016 13:35
-
-
Save wfxr/41044fcd9c4dcff7fd580333f89559bd to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# See http://www.slblog.net/2014/05/change-the-order-of-indicators-in-ubuntu-indicators-applet/ | |
dbus-send --type=method_call --print-reply --dest=com.canonical.indicator.application /com/canonical/indicator/application/service com.canonical.indicator.application.service.GetApplications | grep "string" > /tmp/indicators.txt | |
c=$(wc -l < /tmp/indicators.txt) | |
i=$((c / 8)) | |
s=6 | |
while [ "$i" != "0" ]; do | |
echo $(awk -v n=$s '/string/ && !--n {getline; print; exit}' /tmp/indicators.txt) | |
s=$(( $s + 8 )) | |
i=$(( $i - 1 )) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment