If you have any suggestions for improving these scripts, this repository, or this README, please let me know!
These scripts provide an easy way to manage sync settings for Dropbox on Linux.
Make sure you have the following installed before using dropboxsyncmenu
:
Optional:
- Fira Code (great font!)
After setup, you'll have either DBX
or ---
show up in your polybar (haven't gotten around to switching to icons yet).
- If
---
shows, Dropbox isn't running. - If
DBX
shows, Dropbox is running.- You can
left-click
to rundropbox status
which usesnotify-send
to tell you if it's up to date, syncing files, indexing, etc. - You can
right-click
to load the Rofi-powereddropboxsyncmenu
(first picture below)
- You can
The first menu lets you choose between:
- Synced Directories: This is a list of directories currently synced and showing up in your local Dropbox directory.
- Choosing from this list runs
dropbox exclude add <directory>
which will unsync it from your computer.
- Choosing from this list runs
- Excluded Directories: This is a list of directories that are not synced to your local directory.
- Choosing from this list runs
dropbox exclude remove <directory>
which will start syncing it to your computer.
- Choosing from this list runs
I haven't yet figured out how to mix the two lists in a way that indicates whether the directory is synced or unsynced all in one list, but the end goal is one list!
Here's the 'Synced Directories' menu:
And the 'Excluded Directories' menu:
- Move the
dropboxstatus
anddropboxsyncmenu
files to your scripts directory. For me this is inDropbox/scripts
, but you can use the default of$HOME/.config/polybar/scripts
as well. - Make sure both of those files are executible by running
chmod +x <filename>
- Set the
DROPBOX
variable indropboxsyncmenu
to wherever your Dropbox directory is located if different from$HOME/Dropbox
- If needed, set the
FILE
variable to a directory this script can use for its.tmp
file. (the file gets auto deleted at the end). The default is your$HOME
directory, but I use$HOME/.temp
- If you don't use ZSH, change the first line of both scripts to match your shell (example for Bash users:
#!/bin/bash
)
Note: The 'Synced Directories' search uses the tree
command and has a depth of 2 when building the menu list (meaning it won't show a pics/vacation/bali
directory since that is 3 directories deep). To change this, go to line 26 in the dropboxsyncmenu script and change 2
to your preferred depth.
- Add the
dropboxstatus
module from theuser_modules.ini
file:- Copy line 11 - 16 into your
polybar/user_modules.ini
file. - Add
dropboxstatus
to yourpolybar/config.ini
file like I have here on line 32 - If needed, change
exec
,click-left
, andclick-right
so it has the correct path for where you placed the scripts during Step 1.
- Copy line 11 - 16 into your
- Make sure
include-file = ~/.config/polybar/user_modules.ini
is added to your~/.config/polybar/config.ini
file like so on line 5
- Add
centermenu.rasi
to your~/.config/rofi
directory- If you don't have Fira Code installed, either install it or change the font on line 9 of the
centermenu.rasi
file.
- If you don't have Fira Code installed, either install it or change the font on line 9 of the