Skip to content

martukas/dotfiles

Repository files navigation

One ring to rule them all

Xubuntu Windows10 Windows11 bash PowerShell
CircleCI pre-commit Codacy Badge

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:

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:

  • 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

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 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
🐧 mx make executable: chmod 775
🐧 mw make writable: chmod 664
🐧 own take ownership as user:user
🐧 rm-ext remove all files recursively with given extension (asks to confirm)
🐧 create-user create user with sudo privileges, home directory, authorized ssh key
🪟 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:

Linux manual steps
  • flameshot kbd shortcut
  • panel items layout
  • movable window manager tabs
  • mugshot avatar
  • whisker favorites
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 & reboot
  • Configure foreign keyboards
  • Turn on night light
  • Configure 24h clock

Future improvements

Roadmap