Commit graph

450 commits

Author SHA1 Message Date
2481b15896 feat(bash): upgrade bash to latest version with ansible 2020-12-08 00:33:43 +01:00
2c3b574467 feat(bash): disable Homebrew auto update and analytics 2020-12-05 22:24:12 +01:00
6b4f2ecf85 fix(tmux): changing background was ignored by tmux
When moving the configuration files to $XDG_CONFIG_HOME I forgot to
change the line in .bashrc that sources the tmux configuration so bash
was still trying to source ~/.tmux.conf, which no longer exists.

This commit fixes that. Additionally, the color setting code has been
factored out of tmux.conf into tmux-colors.conf (which can be sourced
from bash profile and tmux.conf). This way the rest of the code in
tmux.conf doesn't have to be executed again when changing the background
color.
2020-12-04 18:15:41 +01:00
46936dffa9 refactor(bash): improve handling of terminal colors
This commit cleans up the code a bit and uses rgb:/RR/GG/BB over the not
recommended #RRGGBB format to specify color values.
2020-12-04 14:31:24 +01:00
f2311bddc1 style(bash): describe common terminal control sequences 2020-12-04 13:28:48 +01:00
51e1d65153 [bash] disable shellcheck warning for bash completion files
There is no need to run shellcheck for each completion file when
checking the bash profile.
2020-12-03 18:34:27 +01:00
6c7b29705e [bash] improve PATH manipulation
The previous implementation failed to prevent duplicates if the entry
being added was the only entry already present in the path. The reason
is that it always required a : to be present in order to remove the new
entry before adding it.

The new implementation is clearer and solves that. However, if the new
entry is already present it will be kept where it was, not moved to the
front of the list. This is fine at the moment.
2020-12-03 18:34:23 +01:00
eef6e7d58f [bash] fix shellcheck error SC2166
For details, see:

    https://github.com/koalaman/shellcheck/wiki/SC2166
2020-12-03 18:34:17 +01:00
93cea206a6 [bash] disable shellcheck warnings on macOS PATH fix
SC2123 warns that the PATH variable is being manipulated, but this is
exactly the intention here.

SC1091 warns that /etc/profile cannot be checked. This is fine, as this
file is provided by the platform and there is no need to check it here.
2020-12-03 18:34:05 +01:00
2a19e95ae5 [bash] disable shellcheck warning on VIMINIT
shellcheck(1) is warning that the single quotes prevent the expression
from being expanded. However, this is the desired behavior because this
expression is meant to be interpreted by vim(1), not bash(1).
2020-12-03 18:33:58 +01:00
2a1a30dd9e [bash] fix shellcheck error SC2155
This makes sure the return code of extracting the path from manpath(1)
is not ignored. Also, unset the MANPATH environment variable instead of
just assigning an empty string to it, so that manpath(1) determines a
suitable default hierarchy to search for manual pages.
2020-12-03 18:33:52 +01:00
cf0a08baaf [bash] fix shellcheck error SC1073
The way I was doing the test is incorrect, as [ is the test(1) program
and the shell builtin command is not something it understands. Instead,
I now just let the shell execute `command` and then set the variable if
`brew` is available.
2020-12-03 18:33:45 +01:00
220f9a7122 [bash] fix shellcheck error SC2148
For details, see:

    https://github.com/koalaman/shellcheck/wiki/SC2148
2020-12-03 18:33:32 +01:00
80b6aee1ed Add Bounrs staging server to SSH config 2020-08-18 17:28:19 +02:00
da4c3090a3 Add preliminary SSH config 2020-08-18 14:19:41 +00:00
aa74a7651b Fix typo in imagemagick package name 2020-06-30 12:10:50 +02:00
d60dd8a0ab Add back user to bash prompt 2020-03-05 11:14:16 +01:00
068bccca57 Update playground SSH alias
This requires the local key (fernandos@N17FERNANDOS3) to be added to
~/.ssh/authorized_keys but uses a more standard and straightforward way
to connect via SSH.

Also, we now connect via a host-only network. This makes us independent
from any port forwarding later.
2020-03-05 10:20:37 +01:00
ab107815a0 Prevent errors when installing vim plugins with ansible 2020-03-05 08:09:03 +00:00
bf313d7bcf Update README for deployment with ansible 2020-03-04 19:58:03 +01:00
48884d0a9a Rename host group to dotfiles 2020-03-04 19:42:04 +01:00
facf7f2926 Merge remote-tracking branch 'origin/ansible' 2020-03-04 19:30:48 +01:00
20efb65a16 Sync ssh with master branch 2020-03-04 19:08:55 +01:00
9455d8d285 Sync vim with master branch 2020-03-04 19:08:40 +01:00
661576726d Sync python with master branch 2020-03-04 19:08:26 +01:00
6590626a7a Sync mintty with master branch 2020-03-04 19:08:09 +01:00
0647d72858 Sync bash with master branch 2020-03-04 19:07:50 +01:00
4a55214ef4 Sync vim with ansible branch 2020-03-04 18:45:21 +01:00
6d52828759 Sync bash with ansible branch 2020-03-04 18:31:15 +01:00
c1294813d8 Update playground ssh configuration 2020-03-04 17:29:19 +01:00
6330dce222 Make sure $XDG_CACHE_HOME/bash exists
`bash` will not save history if this directory doesn't exist - it will
create the file but not the directories in the path.

Just to be safe, we do the same for `less`.
2020-03-04 12:56:45 +01:00
2e4bb9e376 Use default value for IdentityFile
As I am creating new keys with the ed25519 type, the constraint was
inconvenient. I now let SSH use the default, which will use either RSA
od ED25519, whatever is available.
2020-03-04 12:38:20 +01:00
c6305ae9ad Change local vimrc to $XDG_CONFIG_HOME/vim/vimrc.local 2020-03-04 12:04:15 +01:00
ad6e137d04 Use correct syntx highlighting for Vagrantfile (ruby) 2020-03-04 12:03:40 +01:00
409b519dc0 Fix JSON syntax coloring for number, boolean, null
See the following comment for why this way broken:

    https://github.com/elzr/vim-json/issues/37#issuecomment-500044818
2020-03-04 11:42:30 +01:00
1febfc980f Remove rcrc syntax highlighting from vim
No longer using rcm (https://github.com/thoughtbot/rcm) to manage my
dotfiles.
2020-03-04 11:42:30 +01:00
e8c1452562 Organize vim plugin configurations 2020-03-04 11:42:30 +01:00
1c5f02eb8f Make numbers and booleans stand out in vim 2020-03-04 11:42:30 +01:00
6e73dbea71 Change vim mapping for cycling line number style
<leader>r is used by plugins to run code, so better free it up.
2020-03-04 11:42:23 +01:00
b437ad60bf Improve vim window navigation
I use windows much more than tabs, so it makes sense to make window
navigation more convenient.
2020-03-04 11:42:23 +01:00
ca73637add Auto reload vimrc on save 2020-03-04 11:42:22 +01:00
fc5db841e3 Clean up globals() for python interactive sessions
Previously the global namespace of all interactive python session were
polluted with all the stuff we did in this initialization script. For
example, globals()['__doc__'] would show the docstring from this file.

While none of this was ciritical, it could be confusing sometimes. So
this commit fixes that.
2020-02-26 16:49:01 +01:00
c0b024974a Fix PATH manipulation bug in bash profile
This bug caused entries to not be removed if they were already present
in the beginning of the list before being prepended. This could lead to
duplication of entires, usually this ended up being /usr/local/bin.
2020-02-21 11:03:59 +01:00
77cd259e28 Change polaris ssh ports
Since the old ports I was using are now no longer accessible from work,
I had to change to the following:

    - 143/imap for SSH logins and tunneling
    - 587/smtp for access to git repos over SSH

Hopefully these ports will stay open because they are common services.
2020-02-19 12:05:32 +01:00
7b4ed26e21 Fix mapping conflict in vimrc for <leader>r
Now <leader>r only cylces through types of line numbering.
2020-01-30 19:31:35 +01:00
ea74eca230 Remove kj binding to exit Insert mode in vim
The timeout every time I ended a word with k was annoying me. So there
aren't really any words that end in j and one mapping for this is
enough.
2020-01-30 19:23:20 +01:00
773c2142b2 Use default behavior for CtrlP working directory
The default value is:
  let g:ctrlp_working_path_mode = 'ra'

which means:
  a - like "c", but only applies when the current working directory outside of
      CtrlP isn't a direct ancestor of the directory of the current file.
  r - the nearest ancestor that contains one of these directories or files:
      .git .hg .svn .bzr _darcs

So this makes it more convenient to work within repositories, which is
what I mostly do anyway.
2020-01-30 19:20:58 +01:00
e0fb9191e5 Emulate AltGr via Ctrl + Alt in mintty 2020-01-30 19:17:54 +01:00
7d961dd352 Remove optional --- from YAML files 2019-11-16 12:32:43 +00:00
073790d6cf Add Mac apps via homebrew cask 2019-11-16 12:27:32 +00:00