omegak / dotfiles Goto Github PK
View Code? Open in Web Editor NEWThis project forked from holman/dotfiles
The ultimate bastion for my dotfiles and more
License: MIT License
This project forked from holman/dotfiles
The ultimate bastion for my dotfiles and more
License: MIT License
Rely on linuxbrew
instead of apt-get
in order to simplify installation scripts. The project is still a bit green, but it's worth keeping an eye on it.
Disclaimer. This is thoroughly explained so my future self remember the whole thing when he comes back to the issue I'm about to give up upon for today.
This is gonna be useful for debugging install
and *-deps
steps of dot
command. I want to show at the end of each step the log files of the topics that failed.
My idea is to grep only the log files that contain the name of the failed topic:
find -L /tmp -maxdepth 1 -name *$logfile_suffix | grep '$error_topics'
For grep
to grep for several words the following syntax is used:
grep 'a\|b'
Now it should simply be about joining with \|
the array errors
containing the failed topics, but well, this is Shell, so it's not gonna be so easy, apparently. I first have to resolve to defining a custom function.
function join { local IFS="$1"; shift; echo "$*"; }
This allows me to join the $errors into a string with a separator:
$ echo `join \| ${errors[@]}`
homebrew|whatever
The problem is that there is no way to use \|
as separator as IFS
only takes the first character |
(since \
in the command is used to escape |
) and so I have to sed
the result to replace |
for \|
:
$ echo `join \| ${errors[@]}` | sed 's/|/\\|/g'
homebrew\|whatever
So far so good... Let's story this in a variable so that it can be used as initially intended by `grep
error_topics=`join \| ${errors[@]} | sed 's/|/\\|/g'`
echo $error_topics
And the output is:
homebrew|whatever
And I couldn't find any way to store it correctly. :'(
In the file zsh/config.zsh
the command git_info_for_prompt
is referenced, but it doesn't exist anywhere in the project.
I found this out after a clean install. When the make
command finished and I opened a new terminal window, I got the error message:
zsh: command not found: git_info_for_prompt
dotfiles
is growing quite a lot, as it's aiming to setup the whole system, and the initial install is anything but quick because it downloads a lot of things. This is quite a pain when you simply want to quickly have a comfortable environment over ssh. You could simply do make link
but some .zsh
files expect some packages to be already installed.
I see two ways to go, non-mutually exclusive:
.zsh
fail gracefully if the package is missing.Study if a mechanism to update some things in dotfiles makes sense or if updates are needed they should be done manually. Also, study if EVERYTHING has to be updated, or things to be updated can be defined.
This I may want to have updated automatically:
As some of the configuration files I have are part of other repositories, I am using git submodules to keep track of them wherever I clone my dotfiles.
For doing that, it's as simple as:
$ git submodule init
$ git submodule update
However, whenever there is a change in any of the submodules, they are needed to be committed and pushed per module, which can become quite bothersome in case there are many. Inspired in Homesick, these common operations with submodules that are expected to happen often could be performed from the top-level directory with a single command.
It would make sense extending the dot
bin file to add such options.
Get ideas from other frameworks.
It took me some time to fully grasp the difference of philosophy between install
and dot
.
dot
runs as the last step of bootstrap
and makes sure that all dependencies get installed. install
depends on things that will be installed with dot
, such as homebrew, python or cask.
I would like dot
to run all dependency-install scripts like those and avoiding them to be run with install
. A good naming could be install-dep.sh
.
Add visual feedback when stash is not empty.
I was trying this but it didn't work.
# Disable auto-completion of remote branches on `git checkout`
# Source: http://stackoverflow.com/a/17133279/1901977
zstyle ':completion::complete:git-checkout:argument-rest:headrefs' command "git for-each-ref --format='%(refname)' refs/heads 2>/dev/null"
It seems something broke and sudo
is not kept for unattended installations.
Have dot
as the main entry point for running dotfiles-related commands.
dot bootstrap
: Runs bootstrap script. Useful when new *.symlink
files are added.dot install
: Runs install script. Useful when new install.sh
scripts are added.dot update
: Runs dot script.dot edit
: Opens dofiles repo in editorIt'd be cool to have a way to define topics that are not always installed, like indico
for example, that only makes sense for my computer at work. I'm thinking on some way to mark topics at optional so on dot install
a prompt asks for installing or ignoring. Another take would be having some way to define different configuration sets (i.e. lite, standard, indico) and simply selecting which one apply.
Probably related to #20.
Probably, the best way to go is using one of the oh-my-zsh themes.
In any case, some inspiration:
I would like to completely isolate hard dependencies from user customizations/scripts. This will make fork&hack more friendly as there would be little risk to mess with the important bits. The missing parts are mostly install.deps.sh
scripts and some parts in zsh
such as zshrc.symlink
.
The way I see it is to have topic folders within .dot/
that will work in the same fashion as topic folder outside, only that they run first.
Either granularly per install script or by something in dot
like:
brew update && upgrade `brew outdated`
I have barely scratched the surface of everything ZSH has to offer.
Make bootstrap/dot to run stup scripts per topic. Useful to create symlinks to folders outside homefolder such as SublimeText2 settings.
Make the prompt to show the name of the machine only when it's not the local machine. This could be added to the bootstrap script to set it.
https://github.com/susam/inwee
WeeChat keeps configuration in several .conf files in ~/.weechat directory. The configuration can be edited with WeeChat /set commands. Unfortunately, the same .conf files contain both the default configuration options that have not been altered by the user as well as custom configuration options specified by the user. This makes it clumsy to pick only the user specific custom configuration
As for now, the scripts assume this will always run in a osx environment.
Main limitations for this are:
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.