R.L. Dane :Debian: :OpenBSD: 🍵 :MiraLovesYou:<p>Shell two-liner to watch your phone battery via KDE Connect while charging (or discharging):</p><pre><code>alias kcbatt='qdbus6 org.kde.kdeconnect /modules/kdeconnect/devices/$(grep -Em1 "^\[[0-9a-f_]+\]" ~/.config/kdeconnect/trusted_devices |tr -dc 0-9a-f_)/battery org.kde.kdeconnect.device.battery.charge'
ob=0; while b=$(kcbatt); do if ((ob!=b)); then date "+%H:%M $b%%"; ob="$b"; fi; sleep 5; done
</code></pre><p><a href="https://polymaths.social/tags/kde" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>KDE</span></a> <a href="https://polymaths.social/tags/kdeconnect" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>KDEConnect</span></a> <a href="https://polymaths.social/tags/shellscripting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShellScripting</span></a> <a href="https://polymaths.social/tags/oneliner" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OneLiner</span></a> <a href="https://polymaths.social/tags/useful" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Useful</span></a></p>