Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dotfile when preferences are changed #301

Open
deiga opened this issue Apr 17, 2015 · 14 comments
Open

Update dotfile when preferences are changed #301

deiga opened this issue Apr 17, 2015 · 14 comments

Comments

@deiga
Copy link
Contributor

deiga commented Apr 17, 2015

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

Trello Card

@ianyh ianyh changed the title Update ~/.amethyst when preferences are changed Update dotfile when preferences are changed Jul 24, 2017
@ianyh
Copy link
Owner

ianyh commented Jul 24, 2017

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

@benreyn
Copy link

benreyn commented Nov 2, 2019

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.

@glassdimly
Copy link

What's the status here?

@saltyfireball
Copy link

What's the status here?

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

@astsu777
Copy link

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
Copy link

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

@jgonera
Copy link

jgonera commented Apr 14, 2020

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.

@vizcay
Copy link

vizcay commented Mar 12, 2022

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?

@ianyh
Copy link
Owner

ianyh commented Mar 12, 2022

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.

@vizcay
Copy link

vizcay commented Apr 4, 2022

@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.

@LudwigWS
Copy link
Contributor

LudwigWS commented May 24, 2022

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

@ianyh
Copy link
Owner

ianyh commented May 24, 2022

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

@ianyh
Copy link
Owner

ianyh commented May 24, 2022

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

@LudwigWS
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants