An open API service indexing awesome lists of open source software.

https://github.com/martukas/dotfiles

My dotfiles for Linux and Windows
https://github.com/martukas/dotfiles

bash bootstrap dotbot dotfiles linux powershell windows

Last synced: about 1 month ago
JSON representation

My dotfiles for Linux and Windows

Awesome Lists containing this project

README

        

# One ring to rule them all

[![Xubuntu](https://img.shields.io/badge/Xubuntu-22.04-0044aa?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUwMS4zMTIgLTQ5NC4wMzIpIj48Y2lyY2xlIGN4PSI1MzMuMzEyIiBjeT0iNTI2LjAzMiIgcj0iMzIiIHN0eWxlPSJmaWxsOiMwNGE7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmUiLz48cGF0aCBkPSJNNTI0LjAxMyA1MTEuNzU0Yy0uNDYyIDIuMjk2LjIwMiA0LjkyMyAxLjEzMSA4LjEuMDU3LjE5Mi0uMDUyLjQzNy0uMTUuNDY2LS40MjIuMTIzLTEuMTQ1LS4wMDgtMS4yODUtLjI5Ni0uNzI0LTEuNDg2LTEuMDY5LTMuMDA2LTEuOTE0LTQuNDctLjU4NS0xLjAxMi0xLjE5LTEuOTc4LTEuOTExLTIuNjMxLS44NzYtLjc5My0xLjU2Mi0uOTUtMi40OTktLjU1OC0xLjE4Mi40OTQtMS44OTYgMS42NzgtMi4xNCAyLjc0LS4yNDkgMS4wNzYtLjE0NSAyLjMyLjA1IDMuNC4yMjggMS4yNy41MiAyLjI3Mi44OTQgMy40Ni0uMjg2Ljg0NC0yLjAwNCA1LjQ3Ny0yLjQyIDguNjktLjUzMyA0LjEyMi0yLjAzMyAxNi41OTggMTEuNzE0IDE1LjIxIDUuMDctLjUxIDkuMjAyLTIuMjg4IDEzLjExMS00LjExIDEuNzkyLS44MzYgNC4wNC0xLjkxNCA2LjItMy4xID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25lIi8+PC9nPjwvc3ZnPg==)](https://xubuntu.org/)
[![Windows10](https://img.shields.io/badge/Windows-10-0078D6?logo=windows)](https://www.microsoft.com/en-us/software-download/windows10%20)
[![Windows11](https://img.shields.io/badge/Windows-11-0078D6?logo=windows)](https://www.microsoft.com/en-us/windows/windows-11)
[![bash](https://img.shields.io/badge/GNU-Bash-4eaa25?logo=gnubash)](https://www.gnu.org/software/bash/)
[![PowerShell](https://img.shields.io/badge/PowerShell-7-26405f?logo=powershell)](https://github.com/PowerShell/PowerShell)


[![CircleCI](https://dl.circleci.com/status-badge/img/gh/martukas/dotfiles/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/martukas/dotfiles/tree/master)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e85734ffda084555a2a4ffd960e4074c)](https://app.codacy.com/gh/martukas/dotfiles/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

These are my dotfiles and bootstrap scripts for Linux and Windows systems.

The git/bash/ssh parts should work for Mac as well.

## Bootstrapping

Let's make as few assumptions as possible about what's available on the machine - no git, no Python.

These scripts will install the essentials, set up ssh credentials and clone this repo.

### Linux

This one-liner should get things going:

```shell
bash <(wget -qO- https://github.com/martukas/dotfiles/raw/master/bootstrap/bootstrap.sh)
```

### Windows

Firstly, you want to prevent OneDrive from taking over your home directories as described [here](https://answers.microsoft.com/en-us/windows/forum/all/taking-back-control-of-your-folders-from-onedrive/7b7ad05e-8b05-4bcd-9772-9e4eee880346):

- Open 'gpedit' from the Start menu
- Follow `Local Computer Policy` > `Computer Configuration` > `Administrative Templates`>`Windows Components`>`OneDrive`
- Edit and enable `Prevent the usage of OneDrive for file storage`.
- Reboot and make sure that OneDrive is not running

Start PowerShell (64 bit, with Admin privileges), and run these commands

```powershell
Set-ExecutionPolicy Unrestricted
Invoke-WebRequest -Uri "https://github.com/martukas/dotfiles/raw/master/bootstrap/bootstrap.ps1" -OutFile "bootstrap.ps1"
.\bootstrap.ps1
```

You will have to reboot before you start using the utilities below.

## First use

For first-time setup:

- go to `~/dev/dotfiles`
- run either `install.ps1` or `install.sh` as per shell type

These scripts will set up symlinks, command aliases and also run [SuperPack](https://github.com/martukas/superpack) to offer you installation of packages appropriate for your system.

## Routine use

The following aliases have (nearly) identical behaviour in bash and Powershell, Linux and Windows.

| Alias | Function |
| --------------------------- | ------------------------------------------------------------------------ |
| dfu | **dotfiles update:** pulls this repo and runs appropriate install script |
| df-upgrade | **dotfiles upgrade:** upgrades git sub-modules in this repo |
| dnb `new_branch_name` | **git new branch:** creates and pushes new branch |
| commmit-push "message" | add everything, commit with "message", push |
| commmit-push-bypass-hooks | same as above, but skips pre-commit hooks |
| git-rm-submodule | actually removes a git sub-module |
| upd | update all (`apt` and `snap`) or `winget` packages, cleanup |
| missue `123_something` | creates and pushes branch `issue_123_something` |
| issue "message" | `commit-push` appending "; updates #123" (on an `issue_123` branch) |
| la | list directory contents, including hidden files |
| cdgr | cd to git root |
| mcd | make directory and cd into it |
| up `num` | go up `num` directories |
| :penguin: mx | `make executable:` chmod 775 |
| :penguin: mw | `make writable:` chmod 664 |
| :penguin: own | take ownership as user:user |
| :penguin: rm-ext | remove all files recursively with given extension (asks to confirm) |
| :penguin: create-user | create user with sudo privileges, home directory, authorized ssh key |
| :window: Test-Administrator | Return true if in elevated session |

### Keeping repo up to date

- use the `df*` aliases above
- symlinked files will stay up to date
- "dirty" state in the `/private` subrepo will be ignored. Commit changes to that submodule separately, before you commit in parent dir

## Manual steps required

The following cannot be automated:

- [Jetbrains remote](https://www.jetbrains.com/help/idea/remote-development-overview.html)
- [CLion + PlatformIO integration](https://docs.platformio.org/en/latest/integration/ide/clion.html)

Linux manual steps

- flameshot kbd shortcut
- panel items layout
- movable window manager tabs
- mugshot avatar
- whisker favorites
- Enable [Ubuntu pro](https://ubuntu.com/pro/dashboard?) and run `sudo pro enable esm-apps`

Windows manual steps

- Mouse cursor color `Settings` > `Bluetooth & devices` > `Mouse` > `Mouse pointer`
- File associations `Settings` > `Apps` > `Default apps`
- Clementine: XSPF
- VLC: everything else it wants
- IrfanView: Everything else it wants, except TTF
- [Unblock Flameshot shortcut](https://flameshot.org/docs/guide/windows-help/) & reboot
- Configure foreign keyboards
- Turn on night light
- Configure 24h clock

## Future improvements

Roadmap

- include .profile?
- install [conan](https://docs.conan.io/2/installation.html)
- clementine remote config & script
- Linux:
- Numlock on startup
- Clone with pre-commit enabled
- Window tiling manager
- change terminal name via ssh
- NPM
- synaptic
- baobab
- circleci
- Windows:
- add whkrdc config to repo
- WLS
- dotnet
- jdk
- optional sshd and remote-desktop config
- Configure rustup shell completion [here](https://rust-lang.github.io/rustup/installation/index.html)
- Try out [oh-my-fish](https://github.com/oh-my-fish/oh-my-fish)
- Set up conditional GPG things in `.gitconfig_local` or some such
- Adopt ?
- Migrate to ?
- Adopt ?