Using bash, I have been trying to add and display a simple spinner animation in the window decoration xfwm4 (next to the title of the window) of the Nemo (3.8.6) file manager. I’m using Xubuntu 18.04.2 LTS with the base Greybird theme.
Here is what I have tried. I installed the script found at this address:
Works perfectly. This is what I obtained:
https://forum.ubuntu-fr.org/viewtopic.php?pid=22115889#p22115889
https://www.zupimages.net/up/19/26/owfa.png
On this screenshot, I would like to display the spinner next to the clock. I then tried to incorporate a simple spinner to the above script. I used this:
while :; do
for c in / - \\ \|; do
printf '%s\b' "$c"
sleep .1
done
done
The window decoration script:
while true
do
wmctrl -r :ACTIVE: -N "$(awk -F' \\|\\|' '{print $1}' <<< $(xdotool getwindowfocus getwindowname)) || $(LANG=fr_FR.UTF-8 date "+%A %d %B %Y - %H:%M:%S")"
sleep 1
done
This script properly displays a spinner in a console but:
Thanks for your time and help!
Reaplce
printf '%s\b' "$c"
with
wmctrl -r :ACTIVE: -N $(printf '%s\b' "$c")
Update:
#!/bin/bash
while :; do
d=$(LANG=fr_FR.UTF-8 date "+%A %d %B %Y - %H:%M:%S")
for c in / - \\ \|; do
wmctrl -r :ACTIVE: -N "$c $d"
sleep .1
done
done