mdespuits / dotify Goto Github PK
View Code? Open in Web Editor NEWA CLI Tool for managing your dotfiles.
Home Page: http://mattdbridges.github.com/dotify
License: MIT License
A CLI Tool for managing your dotfiles.
Home Page: http://mattdbridges.github.com/dotify
License: MIT License
I see there's a dotify github
command but what if you don't want to use github?
Do you have plans to, and/or would you accept a pull request to, introduce support for manifests that allow the easy installation of 3rd party tools?
Over in the YADR project, we have been discussing the best way to handle:
We've already written a simple rake task to symlink the appropriate files, but want to focus our attention on the actual configuration. Not the plumbing.
dotify install yadr
...Checking dependencies...
Do you want to install prezto?
Y
...Installing...
...Configuring...
Do you want to install vim?
...<snip>...
...Installing YADR...
...Configuring YADR...
dotify upgrade yadr
updates files to the latest version.custom/zsh/[before|after]
directories.I'd be happy to work on the feature, but will likely need some guidance on how best to tackle it. I also noticed you're working on a refactoring so we can discuss once that is done if that makes more sense.
Kyle
Really impressed with dotify. Significantly better solution than some of the others I've seen (and much better than the nightmare I used for myself). Didn't want to get too far into the idea before running it past you, but thoughts on being able to specify paths for files/directories?
Use case. Let's say I'm storing a bunch of zsh files in a subdirectory like so for simplifying management (lots of dotfiles):
~/.dotify/zsh/**
~/.dotify/zsh/**
~/.dotify/foo/**
Those files in zsh
are eventually going to be linked directly into the home directory, i.e. ~/.dotify/zsh/zlogin
>> ~/.zlogin" but being able to keep them separated in my
~/.dotifydirectory is still nevertheless a huge productivity boon when you're dealing with more than just one or two dotfiles. I was thinking a simple setting in
.dotrc``` ought to be sufficient:
dotify_contents_to_root:
- zsh
- vim
- git
- misc
Any directories in the list would just have their contents linked directly to home root. Corollary might be an option might be for linking whole directories, ala something like this:
dotify_directory:
- dir1
- dir2
Anyhow, I was planning on implementing something similar to the first on my fork but wanted to ask and see if you had any thoughts/were planning on something similar before I jumped the gun, so to speak.
First off, great gem and tool! Is there a way to update the dotfiles (pull from repo)? Or do I have to unlink each individual file and then install them again?
Say I've installed and setup on one machine, and added .dotify to a git repository.
Now since I want to use the same dotfiles cross all my machines, I installed dotify on another machine. Then how can I fetch the git repository and setup dotify based on it?
It seems I need to copy all files out of the .dotify folder to my home folder, then do a link or setup manually?
How about adding a command to delete existing files under home folder, copy these files from .dotify, then link them automatically?
The following sequence of events is giving me an issue:
dotify unlink
.dotify save
Y
However the changes did not show up in my repo. I went to the .dotify
directory and ran git status
. Sure enough, the changes were there but hadn't been staged or commited. I had to do that manually.
In a nutshell: dotify save
does not catch dotfiles removed with dotify unlink
I don't really like YAML configuration. It feels very limiting and is not a free as something like a DSL. I intend to have this feature added (at least an initial version) by v0.8.0.
I want to use the same dotfiles on a number of machines.
I can install from github no problem but how do I pull in updates from github?
First off, great work on dotify! I just started using it and am very happy with it so far.
Do you have plans to allow linking arbitrary (i.e., NOT home folder dotfiles) files to Dotify? My use case is that I'm keeping several configuration files under version control which aren't strictly dotfiles, but which behave similarly. An example would be certain .plist files under ~/Library/Preferences.
I'm working on a simple gem, dotlink, which roughly mirrors Dotify's linking behavior, simply linking files from the filesystem at large to their corresponding path inside ~/.dotlink.
This gem would work perfectly well in tandem with Dotify (I'd just link the .dotlink folder), but I'm wondering whether it would be more useful to add this functionality to Dotify and submit it as a pull request. What are your thoughts? Would you consider incorporating such a feature? (No offense will be taken if not; I can see how this would seem a strange feature to many users.)
I have tried to install my dofiles from an existing github repo.
I installed via the following command
dotify github dagda1/dots
If I run a command such as
dotify list
I get the following error:
➜ ~ dotify list
'
/Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:154:inparse': (/Users/paulcowan/.dotrc): couldn't parse YAML at line 8 column 8 (Psych::SyntaxError) from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:154:in
parse_stream'
from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:125:inparse' from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:112:in
load'
from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:229:inload_file' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/config.rb:49:in
retrieve'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/config.rb:43:inignore' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/filter.rb:26:in
filter_ignore_files!'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/filter.rb:9:inhome' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/collection.rb:12:in
initialize'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify.rb:23:innew' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify.rb:23:in
collection'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/cli.rb:88:inlist' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor/task.rb:27:in
run'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor/invocation.rb:120:ininvoke_task' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor.rb:275:in
dispatch'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor/base.rb:425:instart' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/bin/dotify:6:in
<top (required)>'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/bin/dotify:19:inload' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/bin/dotify:19:in
My .dotrc looks like this
# Set the editor to use when editing Dotify dotfiles.
# Default: 'vim'
# Options: 'vi', 'vim', 'emacs', '[ANY OTHER TERMINAL BASED EDITOR]'
#
editor: 'vi'
#
# Ignoring files in ~/.dotify when linking:
#
ignore:
dotify:
- '.git'
- '.gitignore'
- '.gitmodules'
# Ignoring files in the home directory when linking:
dotify:
- '.rbenv'
- '.rvm'
Hey!
I have one suggestion: from what I tried, adding a new file means running the dotify setup
again, which will ask if I want to add every single dotfile, even those I already added.
What about a dotify add
command, which can be used by the setup
itself.
Thanks for this handy project! ;)
I've just spent a couple of hours trying to figure out why when presented with the prompt Do you want to link [file] to Dotify? [Yn]
and hitting enter, no link was made, no message was given.
Turns out you have to type Y
and then hit enter. I'm hoping this is a bug and not the intended way it should work?
I was trying to extend a functionality on dotify, but I wanted to keep the bdd approach dotify already has. I cloned the repo, created a new (rvm) empty gemset and then I ran bundle install
. After that on the root directory, I ran cucumber:
dotify $ cucumber
[...]
@linking @interactive
Scenario: Linking files # features/linking/linking.feature:16
When I run `dotify link` interactively # aruba-0.4.11/lib/aruba/cucumber.rb:74
And I type "no" # aruba-0.4.11/lib/aruba/cucumber.rb:78
And I type "no" # aruba-0.4.11/lib/aruba/cucumber.rb:78
And I type "yes" # aruba-0.4.11/lib/aruba/cucumber.rb:78
And I type "yes" # aruba-0.4.11/lib/aruba/cucumber.rb:78
Then a file named ".dotify/.bash_profile" should not exist # aruba-0.4.11/lib/aruba/cucumber.rb:219
expected file?(".dotify/.bash_profile") to return false, got true (RSpec::Expectations::ExpectationNotMetError)
features/linking/linking.feature:22:in `Then a file named ".dotify/.bash_profile" should not exist'
Then a file named ".dotify/.gemrc" should not exist # aruba-0.4.11/lib/aruba/cucumber.rb:219
Then a file named ".dotify/.vimrc" should exist # aruba-0.4.11/lib/aruba/cucumber.rb:215
Then a file named ".dotify/.zshrc" should exist # aruba-0.4.11/lib/aruba/cucumber.rb:215
[...]
In the end, I found that one failing scenario and 3 skipped, but dotify is actually working fine so I was wondering if the issue was on my configuration or the test itself.
Another thing that could be important. To run cucumber
I had to add simplecov
as a development dependency on the gemspec because I was getting an error about that library missing.
On github, it doesn't matter whether you enter your username with upper or lower case, it'll work. On dotify, it won't find my dotfiles if I enter trevoke/dotfiles but it'll find it if I enter Trevoke/dotfiles.
It would be nice if I could use all lower case.
Hi,
The link to the dotify configuration is broken in the readme (https://github.com/mattdbridges/dotify/tree/cli-rewrite#configuration).
How do I specify which github repo I should be backing up to?
Thanks
Paul
dotify install
I get the following error:(ruby-1.9.3) ~ $ dotify install
/Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/config.rb:65:in `symbolize_keys!': undefined method `each' for false:FalseClass (NoMethodError)
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/config.rb:48:in `retrieve'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/config.rb:43:in `ignore'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/filter.rb:26:in `filter_ignore_files!'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/filter.rb:9:in `home'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/collection.rb:11:in `initialize'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify.rb:23:in `new'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify.rb:23:in `collection'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/cli.rb:160:in `link'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:109:in `invoke'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/cli.rb:142:in `install'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/bin/dotify:6:in `<top (required)>'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/bin/dotify:19:in `load'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/bin/dotify:19:in `<main>'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
Any ideas?
Thanks.
Clean install, basically executing setup for first time gave me this.
{12:59}[1.9.3]~ ➭ dotify setup
create .dotify
Do you want to add .pry_history to Dotify? [Yn] y
create .dotify/.pry_history
Do you want to add .cups to Dotify? [Yn] y
create /home/jaimie/.dotify/.cups
Do you want to add .zsh-update to Dotify? [Yn] y
create .dotify/.zsh-update
Do you want to add .dropbox to Dotify? [Yn] y
/home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:1357:in `copy': cannot handle socket (RuntimeError)
from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:465:in `block in copy_entry'
from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:1433:in `preorder_traverse'
from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:462:in `copy_entry'
from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:437:in `block in cp_r'
from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:1515:in `block in fu_each_src_dest'
from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:1531:in `fu_each_src_dest0'
from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:1513:in `fu_each_src_dest'
from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:436:in `cp_r'
from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.1.1/lib/dotify/cli.rb:33:in `block in setup'
from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.1.1/lib/dotify/cli.rb:26:in `each'
from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.1.1/lib/dotify/cli.rb:26:in `setup'
from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor/task.rb:27:in `run'
from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor/invocation.rb:120:in `invoke_task'
from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor.rb:275:in `dispatch'
from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor/base.rb:425:in `start'
from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.1.1/bin/dotify:6:in `<top (required)>'
from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/bin/dotify:23:in `load'
from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/bin/dotify:23:in `<main>'
Env:
{13:00}[1.9.3]~ ➭ uname -a
Linux jaimie-pc 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Hi, any idea how make values configurable in dotfiles?
For example the .gitconfig. In the work I've a other email address than at home.
[user]
name = ...
email = ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.