Amethyst icon indicating copy to clipboard operation
Amethyst copied to clipboard

Update dotfile when preferences are changed

Open deiga opened this issue 11 years ago • 14 comments

If I use ~/.amethyst and change something in the preference pane it would be great if Amethyst could update my .amethyst file

Trello Card

deiga avatar Apr 17 '15 08:04 deiga

I'm increasingly convinced that this is a good idea.

ianyh avatar Jul 24 '17 02:07 ianyh

Im really interested in this feature. Im going to be getting a new work laptop soon and it will require manually copying my amethyst config from the preferences pane to a dotfile. What needs to be discussed on this? Id be happy to dive into swift and this codebase to help contribute on this.

benreyn avatar Nov 02 '19 17:11 benreyn

What's the status here?

glassdimly avatar Dec 17 '19 20:12 glassdimly

What's the status here?

Looking for status as well - If you need help on this let me know. 💃

saltyfireball avatar Feb 20 '20 15:02 saltyfireball

Also very interested in a status. I setup macOS as I setup my Linux: I sync my dotfiles on Github and use a bootstrap script to setup everything automatically. Since Amethyst does not currently have a configuration file, I actually sync the file "com.amethyst.Amethyst.plist" from my ~/Library/Preferences folder. It works more or less to be honest... A true configuration file would be the best!

What's the status? Thank you

astsu777 avatar Mar 25 '20 21:03 astsu777

For those interested, here is how I sync my settings for the moment. I have a script that actually configures the plist file with my preferences like the following (this is a mere example, adjust it however you want):

# Set windows to always stay in floating mode
defaults write com.amethyst.Amethyst.plist floating '(
        {
       id = "com.apple.systempreferences";
       "window-titles" =         (
       );
   },
       {
       id = "com.tapbots.Tweetbot3Mac";
       "window-titles" =         (
       );
   }
)'
defaults write com.amethyst.Amethyst.plist floating-is-blacklist 1

# Follow window when moved to different workspace
defaults write com.amethyst.Amethyst.plist follow-space-thrown-windows 1

# Configure layouts
defaults write com.amethyst.Amethyst.plist layouts '(
	tall, wide, floating, fullscreen
)'

# Restore layouts when application starts
defaults write com.amethyst.Amethyst.plist restore-layouts-on-launch 1

# Set window margins
defaults write com.amethyst.Amethyst.plist window-margins 1
defaults write com.amethyst.Amethyst.plist window-margin-size 6

# Do not display layout names
defaults write com.amethyst.Amethyst.plist enables-layout-hud 0
defaults write com.amethyst.Amethyst.plist enables-layout-hud-on-space-change 0

# Disable automatic update check as it is done by Homebrew
defaults write com.amethyst.Amethyst.plist SUEnableAutomaticChecks 0

# Delete the plist cache - MUST ALWAYS BE LAST
defaults read com.amethyst.Amethyst.plist > /dev/null 2>&1

astsu777 avatar Mar 25 '20 23:03 astsu777

I'd love to see this feature. Amethyst's default keyboard shortcuts mess up Polish keyboard input. Several characters are entered with Option + Shift + letter. Every time I install Amethyst on a new Mac I forget about it and wonder why I can't type in certain capital letters. It would be great if I could just check in Amethyst's config file in my dotfiles with keyboard shortcuts that don't conflict with the Polish keyboard layout.

jgonera avatar Apr 14 '20 17:04 jgonera

This file remains the same across versions more or less? Storing com.amethyst.Amethyst.plist on a git repository and linking it from there to ~/Library/Preferences/ is a bad idea?

vizcay avatar Mar 12 '22 23:03 vizcay

There are some things there that are device specific; e.g., when it saves your last layout configuration and window order it gets saved to that file.

ianyh avatar Mar 12 '22 23:03 ianyh

@ianyh another approach that will avoid the configuration file: allowing Amethyst to process command line arguments.

E.g:

amethys --cycle-layout-forward.

Then, we will be able to use whatever shortcut binder we want. For example I use skhd and I can store it's config in a dotfile for easy sharing across workstations and backups.

vizcay avatar Apr 04 '22 23:04 vizcay

the feature is not necessary, though it would be handy. just create a symbol link to plist file which is managed by yourself.

ln -fs ~/.config/Amethyst/com.amethyst.Amethyst.plist ~/Library/Preferences/com.amethyst.Amethyst.plist

LudwigWS avatar May 24 '22 04:05 LudwigWS

That's not sufficient. Commands in the plist are binary blobs, as opposed to the dot file.

ianyh avatar May 24 '22 11:05 ianyh

Oh never mind, I think I see what you're saying if you just want to keep your in-app preferences synced between devices.

ianyh avatar May 24 '22 11:05 ianyh

the feature is not necessary, though it would be handy. just create a symbol link to plist file which is managed by yourself.

ln -fs ~/.config/Amethyst/com.amethyst.Amethyst.plist ~/Library/Preferences/com.amethyst.Amethyst.plist

I was mistaken, change config will overwrite symbol link. it's lucky that we should not have to modify it frequently.

LudwigWS avatar May 25 '22 10:05 LudwigWS