Skip to content

My dotfiles (fka wsl-config) for development environments on Windows, Windows Subsystem for Linux and Linux

License

Notifications You must be signed in to change notification settings

mloskot/dotfiles

Repository files navigation

dotfiles

Configuration files for development environments on Windows, Windows Subsystem for Linux and Linux. The Linux dotfiles are mainly for Debian-based distributions.

No fancy all-in-one installer script provided, but collection of install.sh and install.bat scripts.

Git

cd git
install.bat

Windows

  • Install DejaVuSansMono Nerd Font from https://www.nerdfonts.com

  • ConEmu.xml with custom tasks to Cmder config directory

    mv C:\apps\cmder_mini\vendor\conemu-maximus5\ConEmu.xml C:\apps\cmder_mini\vendor\conemu-maximus5\ConEmu.xml.original
    mklink C:\apps\cmder_mini\vendor\conemu-maximus5\ConEmu.xml %CD%\win\cmder_mini\vendor\conemu-maximus5\ConEmu.xml
  • clink.lua with slow git status workaround to Cmder vendor directory

    mv C:\apps\cmder_mini\vendor\clink.lua C:\apps\cmder_mini\vendor\clink.lua.original
    mklink C:\apps\cmder_mini\vendor\clink.lua %CD%\win\cmder_mini\vendor\clink.lua
  • clink-completions\git_prompt.lua

    mklink C:\apps\cmder_mini\vendor\clink-completions\git_prompt.lua %CD%\win\cmder_mini\vendor\clink-completions\git_prompt.lua
  • code.cmd for Code Insiders

    mklink "C:\Program Files\Microsoft VS Code Insiders\bin\code.cmd" %CD%\win\vscode\code.cmd
  • .gitconfig works for both

  • git-prompt.sh for preferred Bash prompt

    mklink %USERPROFILE%\.config\git\git-prompt.sh %CD%\win\home\.config\git\git-prompt.sh

    or

    del /S /Q "c:\Program Files\Git\etc\profile.d\git-prompt.sh"
    mklink "c:\Program Files\Git\etc\profile.d\git-prompt.sh" %CD%\win\git\etc\profile.d\git-prompt.sh

WSL

sudo -i bash -c 'echo "mloskot ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'
sudo sed -i '/bell-style none/s/^# //g' /etc/inputrc

Bash

Use bash/install.sh.

Cron

Optionally, to enable OfflineIMAP as cron job:

echo 'sudo -i service cron start' >> ~/.bashrc

Vim

ln -s /mnt/d/dotfiles/vim/.vimrc ~/.vimrc

Mail

mkdir ~/.mail
chmod 0700 ~/.mail

OfflineIMAP

sudo apt -y -q install python-pip
sudo pip install --system offlineimap
ln -s /mnt/d/dotfiles/mail/.offlineimaprc ~/.offlineimaprc
ln -s /mnt/d/dotfiles/mail/offlineimap_secret.py ~/.mail/offlineimap_secret.py
echo "<<CLIENT_ID>>" | gpg -e -r "[email protected]" -o ~/.mail/oauth2_client_id.gpg
echo "<<CLIENT_SECRET>>" | gpg -e -r "[email protected]" -o ~/.mail/oauth2_client_secret.gpg
echo "<<REFRESH_TOKEN>>" | gpg -e -r "[email protected]" -o ~/.mail/oauth2_refresh_token.gpg
# workstation
ln -s /mnt/d/dotfiles/mail/mailrun.sh ~/bin/
# laptop
ln -s /mnt/d/dotfiles/mail/mailsync.sh ~/bin/

Optionally, to run OfflineIMAP, if the customMutt shortcuts, CTRL+a and CTRL+i are not enough:

$ crontab -e
*/5 * * * * /home/mloskot/bin/mailrun.sh

Mutt

sudo apt -y -q install neomutt
which mutt || which neomutt && sudo ln -s `which neomutt` /usr/local/bin/mutt
echo -e 'set smtp_url="<<URL>"\nset smtp_pass="<<PASSWORD>"' | gpg -e -r "[email protected]" -o ~/.mail/smtp_token.gpg
ln -s /mnt/d/dotfiles/mail/.muttrc ~/.muttrc
ln -s /mnt/d/dotfiles/mail/signature ~/.mail/signature
ln -s /mnt/d/dotfiles/mail/vombatidae.mutt ~/.mail/vombatidae.mutt