You are not logged in.

#1 2025-06-16 16:23:41

wroob
New Member
From: United Kingdom
Registered: 2025-06-11
Posts: 4

Dropbox without XFCE panel or Maestral

Dropbox is like a never ending thorn in the side and I really should take time to move my things off it.

I like my tint panel though so this is how I keep notified what Dropbox is doing with yad, might be useful if you'd like to use it? I haven't gone mad with buttons and stuff cos I don't use them. I just install the latest Dropbox client and allow it to run from autostart, then run this afterwards.

Wroob

#!/bin/bash
# Wroob's dropbox scriptette

DROPBOX_BIN=$(command -v dropbox)
CHECK_INTERVAL=1

get_dropbox_status() {
    if command -v "$DROPBOX_BIN" &> /dev/null; then
        "$DROPBOX_BIN" status 2>&1
    else
        echo "Dropbox: Error - '$DROPBOX_BIN' not found. Is Dropbox installed and in your PATH?"
    fi
}

(
    while true; do
        CURRENT_STATUS=$(get_dropbox_status | sed 's/"//g')
        SHORT_STATUS=$(echo "$CURRENT_STATUS" | grep -E '^(Downloading|Uploading|Indexing)' | tr '\n' ' ')
        [[ -z "$SHORT_STATUS" ]] && SHORT_STATUS="$CURRENT_STATUS"
        echo -e "tooltip:$SHORT_STATUS\r"

        if [[ "$SHORT_STATUS" == *"Up to date"* ]]; then
            echo -e "icon:dropboxstatus-idle\r"
        elif [[ "$SHORT_STATUS" =~ ^(Starting|Syncing|Connecting|Downloading|Uploading|Indexing) ]]; then
          toggle=$(( 1 - toggle ))
          if (( toggle )); then
            echo -e "icon:dropboxstatus-busy"
          else
            echo -e "icon:dropboxstatus-busy2"
          fi
        else
            echo -e "icon:dropboxstatus-x"
        fi

        sleep "$CHECK_INTERVAL"
    done
) | stdbuf -i0 -o0 -e0 yad --notification --listen

Last edited by wroob (2025-06-17 19:39:55)

Offline

#2 2025-06-16 21:55:56

manyroads
Member
From: around here, somewhere
Registered: 2019-04-16
Posts: 158
Website

Re: Dropbox without XFCE panel or Maestral

You could use rclone also... should that float your boat.

Last edited by manyroads (2025-06-16 21:56:12)


Pax vobiscum,
Mark Rabideau - https://many-roads.com  https:/eirenicon.org 
i3wm, dwm, hlwm on sid/ arch ~ Reg. Linux User #449130
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken

Offline

#3 2025-06-17 02:48:49

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,652
Website

Re: Dropbox without XFCE panel or Maestral

Hi wroob - how are you installing dropbox?
Users who installed it via the BL script will find

john@boron:~$ type dropbox
dropbox is /home/john/bin/dropbox

So it is in PATH, but installed locally.  ~/bin/dropbox is the CLI controlling script dropbox.py that they supply. Is that also what you have in /usr/bin/dropbox?

Anyway, maybe you'd want to consider looking for "dropbox" elsewhere in the user's $PATH?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#4 2025-06-17 19:42:56

wroob
New Member
From: United Kingdom
Registered: 2025-06-11
Posts: 4

Re: Dropbox without XFCE panel or Maestral

@johnraff : I didn't know about the BL script, usually I just install it globally with the client and sudo dpkg.

maybe you'd want to consider looking for "dropbox" elsewhere in the user's $PATH?

Good idea! I've updated the script.

Offline

Board footer

Powered by FluxBB