Skip to content

Instantly share code, notes, and snippets.

@wfxr
Last active September 14, 2016 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wfxr/41044fcd9c4dcff7fd580333f89559bd to your computer and use it in GitHub Desktop.
Save wfxr/41044fcd9c4dcff7fd580333f89559bd to your computer and use it in GitHub Desktop.
#!/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