jbernard / dotfiles Goto Github PK
View Code? Open in Web Editor NEWDotfile management made easy
Home Page: https://pypi.org/project/dotfiles/
License: Other
Dotfile management made easy
Home Page: https://pypi.org/project/dotfiles/
License: Other
I finally attempted to include ~/.local/...
in my dotfiles set, and as a result, lost the entire contents of the folder when running dotfiles -f -s
. I realize -f
is -f
, but I'd expect files not present in my dotfiles repo, but present in ~/.local
, to remain there.
Is this intended behavior?
It could be avoided by detecting the folder exists, not symlinking it, and instead of linking the new files individually.
The -f
flag help message states "overwrite colliding dotfiles"
; there was no collision in this instance, except for the top-level folder.
If not intended, the folders should be merged together.
How do I link a non-dot file not in the home directory.
Note, I have a few regular dotfiles that are working correctly.
I want to link custom.js
in a folder called ~/.jupyter/custom/
and Im trying it like this:
externals = {
'custom.js': '~/.jupyter/custom'}
But Im getting issues. What is the proper way to do this?
Thanks,
Derek
For the more cautious users, a whitelist-like setting for dotfiles (in contrast to the existing 'ignore' option) could come in handy.
I wanted to use this software to backup my dotfiles and now it looks like a lost them all. I did
dotfiles -a .config
dotfiles -sf
dotfiles -r .config # because i didn't want to store all subfolders
I thought the last command restores the dotfiles to the original locations. But it looks like it is just a binding for rm -rf .config (why??) without a warning resulting in corrupt symlinks and a loss of several hours of configuration.
That is a bit dissapointing. Is there any way to restore my files? Any backup in a hidden location by any chance? I would highly appreciate your help.
It's only a matter of coding style and isn't that important, but there shouldn't be unnecesary exceptions created. I think OSError
is perfectly fine for all exceptions defined.
This change shouldn't break anything, because I doubt anyone is using dotfiles as library.
If you don't think these exceptions should be removed, atleast subclass DotfileException
with OSError
.
I have no idea why yet, but it seems that in core.py line 195:
dotfiles = [x for x in self.dotfiles if x.name in files]
Works fine in Python 2, but not in 3.2 or 3.3.
It wasn't clear to me from the documentation, but dotfiles supports "dot directories" just fine. Perhaps add a small note somewhere to that effect?
(Note that "dotfiles -a ~/.some_directory/" fails, you have to omit the trailing slash. This is a bit irritating as my shell autocompletes including the slash ;-) )
I'm sure I'm just missing out on some command somewhere, but my help info only shows me "add, unlinjk. status, link, remove, help" as the only commands with the version from master.
This has happened to me a few times now, and I keep face-palming myself for not remembering how "link" acts. I'm thinking that internally dotfiles keeps track of only files I've "dotfiles add"ed.. however it appears it keeps track of all the files in the repo, each one representing a dotfile according to 'dotfiles'.
For my use case this is incorrect, as I have quite a few files in my Dotfiles repo that are not actually part of my dotfile configuration and I wish them to not be tracked by dotfiles. Is this possible? Dotfiles also should do as it's told, if I tell it to unlink a file, I don't want it talking back to me with an error about how such and such file is within the repo, there is no force option so I'm kinda stuck fixing everything the hard way. Cheaky dotfiles! :p
In this case, I used "dotfiles link" to ensure that all my dotfiles were symlinked properly since I had been adding and removing a lot today. I forgot it thinks everything in my repo should be tracked. Turns out, I didn't want any of the new links it made! Those are either an encrypted version of a dotfile I use only to push to the repo, I already had the decrypted version linked (this could have caused a loss of data had the one file not ended in .gpg).. or files related to my encryption program, nothing of which I needed linked in my $HOME.. Oops.
As we figured out in my last issue, I fail at life.. my fault for doing this like 3 times now... but I think dotfiles should either be smarter with linking or at least make it easier to clean up. If I want a link removed, remove it.. I am boss. As you can see, it won't listen to me. Dotfiles owns me right now, it is totally playing the dom in this relationship..:p
*FYI the 2nd command I ran.. "dot" is a dotfiles alias, obvious maybe but just clarifying..
After adding dotfiles, doing this is kinda over head
$ cd ~/Dotfiles
$ git add vimrc
$ git commit -m "Added vimrc, welcome aboard!"
$ git push
# Proposed Add behaviour
$ dotfiles -a => should also do git add that file
# Proposed Sync behaviour
$ dotfiles -s => sync from local dotfiles dir
$ dotfiles -s --git-pull => pull from github to local dotfiles dir and then SYNC
$ dotfiles -s --git-pull-push => pull && push to local dotfiles dir and then SYNC to github
I use dotfiles to keep my configuration in sync between machines. But sometimes the settings (have to) differ for example different terminal font settings because of different screen resolutions.
What is the best way to handle such small changes across machines, while keeping the most important settings in sync?
I am specifically thinking about the Sublime Text configuration directory, which is generally:
Users/<user>/Library/Application Support/Sublime Text 2/Packages/User/
It could work something like externals
, but the other way around:
internals = {
'sublimetextconf': 'Users/<user>/Library/Application Support/Sublime Text 2/Packages/User'
}
This would make a link from Users/<user>/Library/Application Support/Sublime Text 2/Packages/User
to a directory inside the repository called sublimetextconf
First of all, thank you for this tool. I've been using it for more than a year and recommend it to all my colleagues ๐
After all this time, however, it's not entirely clear to me how to track the configuration file neovim
, which is located in ~/.config/nvim/init.vim
.
I can add the file using the command dotfiles --add ~/.config/nvim/init.vim
. This adds a init.vim
file in the ~/Dotfiles
folder. However, when I pull the repo in a different machine and sync, dotfiles is not copying the init.vim
in the new machine. I always have to manually cp
-ing it.
I read the documentation and tried a few things, but nothing seems to solve my problem. What am I missing?
Using v0.6, in my .dotfilesrc
I have:
packages = ['config']
However, when adding the .config/gtk-3.0
, dotfiles complains:
$ dotfiles -a .config/gtk-3.0
Skipping ".config/gtk-3.0", not a dotfile
The only way I found to make it work is moving it manually to $dotfiles_repo/config/gtk-3.0
and then running dotfiles -s
creates the correct symlink in .config/gtk-3.0
.
Oh, and thanks for the work, dotfiles
is awesome!
Hey, thanks for the app!
So this is my dotfiles folder:
~/git/dotfiles โโโ .tmux.conf โโโ .something_else.conf โโโ bin ย โโโ some_script
With the "prefix = . " option set, Dotfiles links "bin" to "~/.in".
I would like it to detect that "bin" does not start with "." (or whatever my specified prefix is) and should be linked to "~/bin"
I insist that my dotfiles folder should keep this format.
Thanks!
A comment in issue #32 reveals a bug when using a prefix such as .
along with packages.
I also have issues with packages.
When I put ".config" in my packages list, "dotfiles/.config/awesome" links to "..config/wesome".
when I put "config" in my packages list, .config is no longer recognized as a package.
Hey Jon,
I noticed that some files do not sync automatically.
/.gtk-bookmarks
~/.gtkrc-2.0 unsynced
~/.oh-my-zsh
~/.remmina
~/.thunderbird
~/.uml
~/.vim
~/.viminfo unsynced
~/.vimrc
gtkrc-2.0 is written by lxappearance and .viminfo contains history and markers of the current vim session. When I sync them with dotfiles -sf, they get overwritten by the old version in the repository. Do you have an idea why it's not syncing automatically as one would expect?
P.S.: updated to new version and packages work nicely (although manually)
When using a symlink in the repo dotfiles thinks that it should follow the symlink and dotfiles considers all files in the symlink target.
One of the strengths of the old dotfiles version is that it can handle symlinks and just add the symlink not all files IMO.
sarena:~$ env | grep DOTFILES
DOTFILES_REPO=/tmp/dotfiles-repo
DOTFILES_DOT=0
sarena:~$ tree -a /tmp/dotfiles-repo -I .git
/tmp/dotfiles-repo
โโโ .config
โโโ nvim -> /home/simmel/.vim
2 directories, 0 files
sarena:~$ dotfiles status
E .config/nvim/.netrwhist
? .config/nvim/autoload/pathogen.vim
? .config/nvim/bundle/DetectIndent/doc/detectindent.txt
E .config/nvim/bundle/DetectIndent/doc/tags
? .config/nvim/bundle/DetectIndent/plugin/detectindent.vim
? .config/nvim/bundle/gnupg/plugin/gnupg.vim
? .config/nvim/bundle/logstash/LICENSE
? .config/nvim/bundle/logstash/ftdetect/logstash.vim
? .config/nvim/bundle/logstash/syntax/logstash.vim
? .config/nvim/bundle/matchit/doc/matchit.txt
E .config/nvim/bundle/matchit/doc/tags
? .config/nvim/bundle/matchit/plugin/matchit.vim
? .config/nvim/bundle/openssl/plugin/openssl.vim
E .config/nvim/bundle/rcs/doc/rcs.txt
E .config/nvim/bundle/rcs/doc/tags
? .config/nvim/bundle/rcs/plugin/rcs.vim
? .config/nvim/bundle/rust.vim/LICENSE-APACHE
? .config/nvim/bundle/rust.vim/LICENSE-MIT
? .config/nvim/bundle/rust.vim/after/syntax/rust.vim
? .config/nvim/bundle/rust.vim/autoload/cargo.vim
? .config/nvim/bundle/rust.vim/autoload/rust.vim
? .config/nvim/bundle/rust.vim/autoload/rustfmt.vim
? .config/nvim/bundle/rust.vim/compiler/cargo.vim
? .config/nvim/bundle/rust.vim/compiler/rustc.vim
? .config/nvim/bundle/rust.vim/doc/rust.txt
E .config/nvim/bundle/rust.vim/doc/tags
? .config/nvim/bundle/rust.vim/ftdetect/rust.vim
? .config/nvim/bundle/rust.vim/ftplugin/rust.vim
? .config/nvim/bundle/rust.vim/indent/rust.vim
? .config/nvim/bundle/rust.vim/plugin/rust.vim
? .config/nvim/bundle/rust.vim/syntax/rust.vim
? .config/nvim/bundle/rust.vim/syntax_checkers/rust/cargo.vim
? .config/nvim/bundle/rust.vim/syntax_checkers/rust/rustc.vim
? .config/nvim/bundle/surround/doc/surround.txt
E .config/nvim/bundle/surround/doc/tags
? .config/nvim/bundle/surround/plugin/surround.vim
? .config/nvim/bundle/tcomment_vim/CHANGES.TXT
? .config/nvim/bundle/tcomment_vim/addon-info.json
? .config/nvim/bundle/tcomment_vim/autoload/tcomment.vim
E .config/nvim/bundle/tcomment_vim/doc/tags
? .config/nvim/bundle/tcomment_vim/doc/tcomment.txt
? .config/nvim/bundle/tcomment_vim/plugin/tcomment.vim
? .config/nvim/bundle/tcomment_vim/spec/tcomment/issue30.vim
? .config/nvim/bundle/tcomment_vim/spec/tcomment/issue30_sel=exclusive.vim
? .config/nvim/bundle/tcomment_vim/spec/tcomment/issue30_sel=inclusive.vim
? .config/nvim/bundle/tcomment_vim/spec/tcomment/issue30_test.c
? .config/nvim/bundle/tcomment_vim/spec/tcomment/issue30_test_1.c
? .config/nvim/bundle/tcomment_vim/spec/tcomment/issue30_test_2.c
? .config/nvim/bundle/tcomment_vim/spec/tcomment/issue30_test_3.c
? .config/nvim/bundle/vim-json/ftdetect/json.vim
? .config/nvim/bundle/vim-json/ftplugin/json.vim
? .config/nvim/bundle/vim-json/indent/json.vim
? .config/nvim/bundle/vim-json/json-test.json
? .config/nvim/bundle/vim-json/jsonp-test.jsonp
? .config/nvim/bundle/vim-json/readme.md
? .config/nvim/bundle/vim-json/syntax/json.vim
? .config/nvim/bundle/vim-makeshift/doc/makeshift.txt
E .config/nvim/bundle/vim-makeshift/doc/tags
? .config/nvim/bundle/vim-makeshift/plugin/makeshift.vim
? .config/nvim/bundle/vim-pastie/doc/pastie.txt
E .config/nvim/bundle/vim-pastie/doc/tags
? .config/nvim/bundle/vim-pastie/plugin/pastie.vim
E .config/nvim/bundle/vim-ptpb/plugin/ptpb.vim
? .config/nvim/bundle/vim-tmux/CHANGELOG.md
? .config/nvim/bundle/vim-tmux/autoload/tmux.vim
? .config/nvim/bundle/vim-tmux/compiler/tmux.vim
? .config/nvim/bundle/vim-tmux/doc/tmux.vim
? .config/nvim/bundle/vim-tmux/ftdetect/tmux.vim
? .config/nvim/bundle/vim-tmux/ftplugin/tmux.vim
? .config/nvim/bundle/vim-tmux/indent/tmux.vim
? .config/nvim/bundle/vim-tmux/syntax/tmux.vim
? .config/nvim/bundle/vimclojure/autoload/vimclojure.vim
? .config/nvim/bundle/vimclojure/autoload/vimclojure/util.vim
? .config/nvim/bundle/vimclojure/bin/clj
? .config/nvim/bundle/vimclojure/bin/clj.bat
? .config/nvim/bundle/vimclojure/bin/ng-server
? .config/nvim/bundle/vimclojure/bin/ng-server.bat
? .config/nvim/bundle/vimclojure/doc/LICENSE.txt
? .config/nvim/bundle/vimclojure/doc/clojure.txt
E .config/nvim/bundle/vimclojure/doc/tags
? .config/nvim/bundle/vimclojure/ftdetect/clojure.vim
? .config/nvim/bundle/vimclojure/ftplugin/clojure.vim
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.core.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.data.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.inspector.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.java.browse.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.java.io.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.java.javadoc.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.java.shell.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.main.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.pprint.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.repl.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.set.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.stacktrace.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.string.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.template.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.test.junit.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.test.tap.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.test.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.walk.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.xml.txt
? .config/nvim/bundle/vimclojure/ftplugin/clojure/completions-clojure.zip.txt
? .config/nvim/bundle/vimclojure/indent/clojure.vim
? .config/nvim/bundle/vimclojure/plugin/clojure.vim
? .config/nvim/bundle/vimclojure/syntax/clojure.vim
? .config/nvim/init.vim
sarena:~$
Likewise using add on a link:
sarena:~$ ln -s ~/.vim ~/.config/nvim
sarena:~$ dotfiles add ~/.config/nvim
Traceback (most recent call last):
File "/home/simmel/.local/lib/python3.5/site-packages/py/_error.py", line 66, in checked_call
return func(*args, **kwargs)
FileExistsError: [Errno 17] File exists: '../../../../../../../home/simmel/code/code/config/.config/nvim/bundle/DetectIndent/doc/tags' -> '/tmp/dotfiles-repo/.config/nvim/bundle/DetectIndent/doc/tags'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/simmel/.local/bin/dotfiles", line 11, in <module>
load_entry_point('dotfiles==0.9.dev0', 'console_scripts', 'dotfiles')()
File "/home/simmel/.local/lib/python3.5/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/simmel/.local/lib/python3.5/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/simmel/.local/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/simmel/.local/lib/python3.5/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/simmel/.local/lib/python3.5/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/simmel/.local/lib/python3.5/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/simmel/.local/lib/python3.5/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/simmel/.local/lib/python3.5/site-packages/dotfiles/cli.py", line 65, in add
perform('add', files, repo, debug)
File "/home/simmel/.local/lib/python3.5/site-packages/dotfiles/cli.py", line 29, in perform
getattr(dotfile, method)(debug)
File "/home/simmel/.local/lib/python3.5/site-packages/dotfiles/dotfile.py", line 99, in add
self._link(debug)
File "/home/simmel/.local/lib/python3.5/site-packages/dotfiles/dotfile.py", line 51, in _link
source.mksymlinkto(target, absolute=0)
File "/home/simmel/.local/lib/python3.5/site-packages/py/_path/local.py", line 90, in mksymlinkto
py.error.checked_call(os.symlink, target, self.strpath)
File "/home/simmel/.local/lib/python3.5/site-packages/py/_error.py", line 86, in checked_call
raise cls("%s%r" % (func.__name__, args))
py.error.EEXIST: [File exists]: symlink('../../../../../../../home/simmel/code/code/config/.config/nvim/bundle/DetectIndent/doc/tags', '/tmp/dotfiles-repo/.config/nvim/bundle/DetectIndent/doc/tags')
makes dotfiles go haywire.
This utility can easily be used for synchronizing arbitrary configuration folders with symlinks that may not necessarily be the home directory. I have encountered several use cases where the files that I want to manage with 'dotfiles' should not/can not be prefixed with a '.' . It would be great if there were an option to disable the insertion of a '.' at the beggining of synchronized filenames.
I ran dotfiles -m dotfiles --dry-run
this didn't do a dry run
Now my files are in the new directory, but executing dotfiles -m Dotfiles
doesn't restore it because the dir Dotfiles doesn't exist.
I can fix it, but the user experience is not that great.
I would like to 'dotfiles -a ~/.ncmpcpp' but I DO NOT want error.log. I tried adding error.log to the ignore list to no avail. I can't add the individual configs inside ~/.ncmpcpp because they are called 'config' and 'bindings'. That's bound to cause a naming conflict down the road.
Is there a way to rename the files for the purposes of dotfiles? What about nesting them in a directory called 'ncmpcpp' within ~/dotfiles?
At this point, I'm open to anything. Thanks!
Using the "add" option on files in another subdirectory of $HOME, it is not compatible with the "sync" action that does not create a symbolic link from where the "add" was used, but rather creates it in $HOME.
$ dotfiles add ~/.config/terminator/config
# Add in:
$ ~/Dotfiles/config
# Remove link:
$ rm -f ~/.config/terminator/config
# Sync
$ dotfiles --sync
# Syncs on:
$ ~/config
# It should sync on:
$ ~/.config/terminator/config
I will never mis use this bad package.
At the moment, dotfiles does not depend on any additional python packages and can be run directly from a cloned git repository. I've been looking at mitsuhiko's click project [1] and there are some nice benefits of adding that library as a runtime dependency. Specifically, command line option parsing could support both the existing syntax (--add, --list, etc) but could also support commands as git does (dotfiles add "path to file"). It also has bash completion baked in, so very little effort would yield a nicer user experience.
But, you would have to install an additional dependency. Does this bother anyone, or is a runtime dependency no big deal?
.dotfilesrc is ignored by default. Why?
OSError: Cannot call rmtree on a symbolic link
This happened to me because I wanted to replace a dotfile repository with an other one. Then I had a .vim directory in my home which was obviously also a symbolic link.
I think line 41 in core.py should be:
"if os.path.isdir(self.name) and not os.path.islink(self.name):"
instead of:
"if os.path.isdir(self.name):"
$ dotfiles -c
muelli@bigbox ~/hg/Dotfiles [โฟ:default+] $ dotfiles -d -a ~/.ssh/config
Moving /home/muelli/.ssh/config => /home/muelli/hg/Dotfiles/ssh/config
Creating symlink /home/muelli/hg/Dotfiles/ssh/config => /home/muelli/.ssh/config
$ dotfiles -a ~/.ssh/config
Traceback (most recent call last):
File "/home/muelli/.local/bin/dotfiles", line 19, in
dotfiles.cli.main()
File "/home/muelli/.local/lib/python2.7/site-packages/dotfiles/cli.py", line 247, in main
dispatch(dotfiles, cli_opts.action, cli_opts.force, args)
File "/home/muelli/.local/lib/python2.7/site-packages/dotfiles/cli.py", line 181, in dispatch
getattr(dotfiles, action)(args)
File "/home/muelli/.local/lib/python2.7/site-packages/dotfiles/core.py", line 196, in add
self._perform_action('add', files)
File "/home/muelli/.local/lib/python2.7/site-packages/dotfiles/core.py", line 219, in _perform_action
getattr(dotfile, action)()
File "/home/muelli/.local/lib/python2.7/site-packages/dotfiles/core.py", line 91, in add
self._move(self.name, self.target)
File "/home/muelli/.local/lib/python2.7/site-packages/dotfiles/core.py", line 66, in _move
shutil.move(src, dst)
File "/usr/lib64/python2.7/shutil.py", line 299, in move
copy2(src, real_dst)
File "/usr/lib64/python2.7/shutil.py", line 128, in copy2
copyfile(src, dst)
File "/usr/lib64/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: '/home/muelli/hg/Dotfiles/ssh/config'
$ mkdir ssh
$ dotfiles -a ~/.ssh/config
$
I would have expected dotfiles to run fine, i.e. creating the necessary directory in the repository on the fly.
Hey, I would like to sync just .vimrc and .vim/snippets not all the plugins in .vim/bundle, since they have compiled parts that don't work on all machines.
dotfiles -a .vim/snippets
returned "Not a dotfile". And
dotfiles -a .vim
in combination with
ignore = [
'.git',
'.gitignore',
'*.swp',
'.vim/bundle/*']
did not work either. Am I missing something here or is the inclusion of subdirectories not implemented yet?
Lots of applications have started to put their config files in configuration folders like .config
or .kde
. The current behaviour when trying to add ~/.config/mytest.conf
is the following.
dotfiles -a ~/.config/mytest.conf
Skipping ".config/mytest.conf", not a dotfile
Maybe it is possible to use your codebase to also archive those files. One could use a special prefix to keep track of the files which do not start with a dot (e.g. _
). Alternative one could assume, that if files are located in a dotfolder
that they are non-dot config.
What do you think of those solutions? I am happy to have a look in your code and potentially send a pull request, if those changes are appreciated.
It seems as though the newest version from master does not read .dotfilesrc? Or maybe my .dotfilesrc should be in the repo instead of my home dir?
Basically, I just want to configure what files dotfile should ignore when showing "status".
Thanks!
This should be fairly easy to implement.
Will dotfiles be bumped to 1.0.0 once we get the new click API in place?
It makes sense as it a major change and because this library/application/[better-verb-here] is fairly stable as well. It would be nice to have some sort of guarantee that the API will stay the same for that version.
Personally, I'm bootstrapping my dotfiles and I would like to be sure that the version of dotfiles I run has the same interface as I had when writing the bootstrap code.
PS: When should I expect to see the new release? I'm etching to use the new API in the bootstrapping. ๐
$ dotfiles --add ~/.testdotfile
$ cd ~/github/dotfiles && rm .testdotfile
$ dotfiles --remove .testdotfile
Traceback (most recent call last):
File "/usr/local/bin/dotfiles", line 19, in <module>
dotfiles.cli.main()
File "/usr/local/lib/python2.7/dist-packages/dotfiles/cli.py", line 247, in main
dispatch(dotfiles, cli_opts.action, cli_opts.force, args)
File "/usr/local/lib/python2.7/dist-packages/dotfiles/cli.py", line 181, in dispatch
getattr(dotfiles, action)(args)
File "/usr/local/lib/python2.7/dist-packages/dotfiles/core.py", line 210, in remove
self._perform_action('remove', files)
File "/usr/local/lib/python2.7/dist-packages/dotfiles/core.py", line 231, in _perform_action
getattr(dotfile, action)()
File "/usr/local/lib/python2.7/dist-packages/dotfiles/core.py", line 99, in remove
self._move(self.target, self.name)
File "/usr/local/lib/python2.7/dist-packages/dotfiles/core.py", line 66, in _move
shutil.move(src, dst)
File "/usr/lib/python2.7/shutil.py", line 301, in move
copy2(src, real_dst)
File "/usr/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/dennis/github/dotfiles/testdotfile'
$ dotfiles -l
Error: Could not find dotfiles repository "/home/vagrant/Dotfiles"
Traceback (most recent call last):
File "/vagrant/dotfiles/bin/dotfiles", line 18, in <module>
main()
File "/vagrant/dotfiles/dotfiles/cli.py", line 228, in main
check_repository_exists()
File "/vagrant/dotfiles/dotfiles/cli.py", line 200, in check_repository_exists
missing_default_repo()
File "/vagrant/dotfiles/dotfiles/cli.py", line 55, in missing_default_repo
(repo_settings['path']), CONFIG_FILE)
IndexError: tuple index out of range
Example:
โ ~ dotfiles --version
dotfiles v0.6.1
โ ~ dotfiles --sync --force
Skipping ".zshrc", use --force to override
The released version is lagging heavily behind, v0.6.4
on pip vs v0.9.dev3
on master
. Consider opening issues for things that are blocking the release.
Would it be possible to update the AUR package? The package hasn't been updated in a few years.
In some cases you may want to include a README
in your repository which tells you (or others) what to do to keep your dotfiles in sync - especially if you are as forgetful as me. This file, of course, should not become ~/.README
.
Another use case would be that there are some files (like ~/.vim/.netrwhist
) that you may want to exclude in general.
-c says "check for broken and unmanaged dotfiles".
I take "unmanaged" to mean the dotfiles in my homedirectory that aren't yet managed.
But if I run it, it doesn't print a thing even though I've only added one dotfile yet. Looking at the code, it seems like it only warns for dotfiles that aren't symlinked yet but that are already in the ~/Dotfiles/ directory.
=> Perhaps change the wording from "unmanaged" to "unlinked"? Or did I misunderstand something?
Thank you for useful software.
When I run dotfiles -s
I get my ~/.git
symlinked to ~/Dotfiles/.git
.
What purpose does this serve, please?
This example would lead to an error:
[dotfiles]
repository = $HOME/dev/src/dotfiles
ignore = [
'.git',
'.gitignore',
'*.swp',
'README.md']
Error: Could not find dotfiles repository "/home/xyz/$HOME/dev/src/dotfiles"
When using dotfiles to manage ~/.ssh
, an absolute symink is created, so:
~/.ssh --> /home/username/Dotfiles/ssh
However, this breaks ssh authentication with authorized keys. For such a symlink to work, it must be relative to the home directory, ie:
~/.ssh --> Dotfiles/ssh
It would be nice if dotfiles had a --relative
switch which provided this.
I would really like to make a simple site with documentation and it'd be great to have a modest logo and/or icon. I'm rather terrible at that sort of thing, but if anyone has ideas or would like to contribute something, I would be very grateful.
Cheers
First of all thanks for sharing this little handy tool.
There are some sensitive files which are still valid for storing as a part of dotfiles
repo, but should be encrypted so that only after sync they are of any use.
If you think it would be a valuable addition I can try contribute, even though I don't know that much about python yet ;)
Hi,
running dotfiles v0.6.4 , I lost my .config content.
I think dotfile should not override a directory with a symlink.
For example, if in my dotfiles directory I have:
.config/nvim/init.vim
And I already have a file called:
.config/nvim/some-other-conf
dotfile sync --force
should only add
.config/nvim/init.vim
As a symlink. Not the intermediate directories like .config
and .config/nvim
.
Hi,
What is the best way to deal with large .directories
(i.e. .emacs.d
, oh-my-zsh
, etc.), which are already under version control?
Thank you for dotfiles!
I don't know how to phrase this.
But maybe something in dotfilesrc like this:
repo_prefix=.
This would make it so my files in ~/Dotfiles are .tmux.conf and not tmux.conf
I have created a repo to demo the bug, please have a look at https://github.com/ratson/dotfiles-bug
I've been using this for some years on Windows, Mac and Linux to manage my dotfiles, and just recently updated to latest version. I notice you removed Windows symlink support in 48e781, which I added a very long time ago. Just wondering if that was intentional.
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.