Hi.
There "should" be no problem using Dropbox with AutoKey. To Dropbox, the
AutoKey files are just plain text files.
Several points:
1) Each AutoKey phrase and script consists of two files, a file
containing the body of the script or phrase and a sidecar file
containing the metadata for the script or phrase. You have to make sure
you copy/move the pairs together or they will not work.
Scripts: my_script.py / .my_script.json
Phrases: my_phrase.txt / .my_phrase.json
Because the metadata file names start with a dot, they are hidden files
by default and some copy commands like cp will miss them by default.
rsync will get them.
I have filed an enhancement request to unhide these files because we get
questions/problems like this all the time. The developers think it's a
good idea, but I don't believe it has been worked on yet.
An artifact of this scheme and of the way Linux works is that you cannot
name any of your phrases/scripts with a dot as the first character of
the name. It won't break anything, but they won't work either.
2) Prior to 0.95.10, AutoKey didn't bother to check if a folder already
exists when you created it in the AutoKey Main window. This would
effectively delete everything in that folder.
Hopefully, that has been fixed, but always make a backup of all your
hard work before proceeding with this sort of file management.
3) After you add or delete script/phrase files manually from outside of
AutoKey, they should be functional immediately. But, since AutoKey does
not watch its directories, the changes will not show up in the main
window until you quit and restart AutoKey. (They may not be available
before restarting AutoKey, but we don't have a test case where they are
not, so it hasn't been looked into yet.)
4) When you create a new folder from within AutoKey, it allows you to
provide a path to the folder, so it can be anywhere. If your regular
user account that AutoKey is running under has read/write access to the
files, AutoKey will be able to use them.
AutoKey needs to be able to write to these files in the obvious cases
such as when you edit the body of a phrase or script from within AutoKey
and also when you change any of the associated metadata such as the
hotkey, trigger phrase, or window filter.
The part I'm not sure of is that there may be one or more statistical
fields that get written when a phrase/script is just used. It looks like
usageCount counts how many times the phrase/script has been invoked. In
a single user setup, this is a non-issue, but if you are sharing your
configuration between multiple concurrent users using something like
Dropbox, it might be possible for two processes to attempt to update a
file at the same time with unpredictable results. If usageCount gets the
wrong value, nobody probably cares. I'm not even sure if it gets used.
But, if the file gets corrupted, that's another story. If you use this
personally so that you are only actively using one instance of AutoKey
at a time, there shouldn't be an issue. I will follow up on this with
the developers.
5) As for the subfolder issue, that "should" be up to Linux which is
perfectly comfortable with such things. If you can produce a test case
of a failure with this, I would guess that fixing it would have a pretty
high priority.
6) A way you can use symlinks is to put one or more of them in your
local $HOME/.config/autokey directory tree. They could point to things
anywhere, including in Dropbox, because Dropbox won't even know the
symlinks exist.
7) The old way of doing things that works (if there are still bugs in
AutoKey with respect to folders.) :
Go into AutoKey and create a new folder with the name you want and
nothing in it. It can have any path you like as long as it is all user
read/write (and execute for any directories involved.)
From outside of AutoKey, copy your new subdirectory tree of scripts and
phrases into the one you just created from within AutoKey.
Restart AutoKey.
I have been doing this for years and it works fine. I store all my
scripts and phrases in a folder subtree outside of $HOME/.config/autokey.
This has a couple of side benefits. If I reinstall or even purge
AutoKey, all of my phrases and scripts are completely safe. They are
also more convenient to access for editing and making backups.
8) Script/phrase metadata is stored as relatively simple, line-oriented,
human-readable json text files. They can be hand edited or created en
masse by scripts.
I wrote a proof-of-concept bash script which converts AutoHotKey phrases
to AutoKey phrases. It's proof-of-concept because it only converts a
couple of the many parameters AutoHotKey supports and because it only
handles single-line phrases. Available upon request. (I am open to
developing it further, time permitting, but I know nothing about
AutoHotKey.)
Joe
On 2/17/20 12:03 AM, Linfeng Li wrote:
> Please advise if there are other places check for settings for
> conditional-hotkeys: I first got Autokey on the test-machine from the
> App Store of Pop OS and found it to be outdated. Then, I deleted it
> and installed through the latest gtk.deb installer. Yet, in my
> *~/.config/autokey *directory, I did not find anything that specified
> a few of the /conditional mappings/ that I have defined for Firefox
> windows.
>
> RE: sym-link - I was warned against sym-linking files from/to Dropbox
> by Dropbox support people. They said it would mess up Dropbox clients.
>
> Does Autokey have any of the "sourcing feature"? For my dotfiles for
> the shell, *source $HOME/Dropbox/some_dir/some_sh* does the job of
> identifying where the shared settings are located. Across multiple
> machines, I kept a physical copy of the dotfiles on the hard-drive
> through Dropbox, and only adjust the $HOME variable through the local
> ~/.bashrc.
>
> When I attempt to "add an existing folder" to AutoKey-gtk, through the
> "New/Folder" menu item, the folder was added but not any of its nested
> folder nor files. I was doubting if this is the intended behavior as well.
>
>
>
> On Sunday, February 16, 2020 at 11:41:32 PM UTC-5, Keith Bainbridge
> wrote:
>
> Have you looked into sym-linking your .config/autokey/ directory to
> those several machines? The nearest I have gone is sym-linking into
> virtual machices. Also, I have several config type files (including
> autokey) stored on a data partition and sym-linked into my home -
> makes
> multi booting easier.
>
> Keith Bainbridge
>
>
keith.bai...@gmail.com <javascript:>
> > an email to
autoke...@googlegroups.com <javascript:>
> > <mailto:
autokey-user...@googlegroups.com <javascript:>>.
> <
https://groups.google.com/d/msgid/autokey-users/6728e5be-0677-451c-8a3c-3498a733d26c%40googlegroups.com?utm_medium=email&utm_source=footer
> <
https://groups.google.com/d/msgid/autokey-users/6728e5be-0677-451c-8a3c-3498a733d26c%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "autokey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
autokey-user...@googlegroups.com
> <mailto:
autokey-user...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/autokey-users/55c33cdb-ebe2-4383-add6-a85bc1685d74%40googlegroups.com
> <
https://groups.google.com/d/msgid/autokey-users/55c33cdb-ebe2-4383-add6-a85bc1685d74%40googlegroups.com?utm_medium=email&utm_source=footer>.