Git Product home page Git Product logo

pc-automated-config's Introduction

 __          _______ _                      _         _____             __ _
 \ \        / / ____| |          /\        | |       / ____|           / _(_)
  \ \  /\  / / (___ | |         /  \  _   _| |_ ___ | |     ___  _ __ | |_ _  __ _
   \ \/  \/ / \___ \| |        / /\ \| | | | __/ _ \| |    / _ \|  _ \|  _| |/ _  |
    \  /\  /  ____) | |____   / ____ \ |_| | || (_) | |___| (_) | | | | | | | (_| |
     \/  \/  |_____/|______| /_/    \_\__,_|\__\___/ \_____\___/|_| |_|_| |_|\__, |
                                                                              __/ |
                                                                             |___/

Automated Windows & WSL Configuration

Autoconfig is an opinionated configuration of Dev Environment on Windows Subsystem for Linux 2 (WSL2). It if fully automated, customisable if needed, and reversible way of doing on WSL2.

Originally created for my personal use, I decided to share Autoconfig with others who may find it beneficial.

autoconfig automated configration of WSL2 development environment

It draws inspiration from Omakub, a script that configures the Ubuntu OS.

Features

Autoconfig is an opinionated collection of configuration that I used and find beneficial to my workflow. Some of these include:

1. Shell Configuration

Installs and configures Oh My Posh and initialises customised version of quick-term theme out of the box that is uncluttered and doesn't show useless information such as time, time to execute, weather, etc.

Bash shell on my posh

2. VSCode terminal styling

Configures the WSL in a way that you're VSCode terminal is slightly modified to show if the current git folder is dirty. Again clutter free and distraction free that provides only the information you need.

VSCode terminal configuration

3. Navigation Alises

I've never had a problem typing cd .. in less than half a second so that's not an alias I build. Instead, the aliases are such that it help understand the information in one glance such as

a. lsl: Shows list of all files and directories in the current folder (without hidden .files) with visual cues about which is a directory by appending / or an executable by appending *. It is an alias for ls -lF

lsl alias

b. lsa: Shows everything that lsl does + hidden files. It is an alias for ls -AlF

lsa alias

c. c opens up VSCode in current folder. Alias for code .'

4. Git shortcuts

Handy shortcuts for working with git. Divided in two components

a. gs: Shortcut for git status b. ga: Shortcut for git add

c. gcm {flag} "<commit message> : Shortcut for git commit -m, but you also need to pass a flag. The flag is the type of commit with choices from the following

  1. FEAT (f) => "โœจ FEAT: "
  2. FIX (b) => "๐Ÿ› FIX: "
  3. REFACTOR (r) => "โ™ป๏ธ REFACTOR: "
  4. DOCS (d) => "๐Ÿ“ DOCS: "
  5. STYLE (s) => "๐Ÿ’… STYLE: "
  6. PERF (p) => "โšก๏ธ PERF: "
  7. TEST (t) => "๐Ÿ”ฌ TEST: "
  8. CHORE (c) => "๐Ÿ”ง CHORE: "

d. gcam {flag} "<commit message> : Shortcut for git commit -am. e. gp: Shortcut for git push

An example is show below of committing this readme changes.

Technically gcm and gcam aren't aliases, but methods.

git shortcuts

  1. Langauges and Version management

Autoconfig uses mise for environment, dotfile, and version management. Autoconfig uses it to configured Node@LTS, [email protected] and npm@latest at the global level. Per project you can always use mise to specify which versions you need.

  1. AWS Developer Tools

Autoconfig not just installs AWS CLI, AWS CDK, and AWS SAM CLI, but it also symlinks your Windows .aws credentials if they exist so you don't have to redo the configuration in either place.

Supported Platforms

Tested on the following distributions:

  1. Ubuntu 22.04 (Windows 11 + WSL2)
  2. Ubuntu 24.04 (Windows 11 + WSL2)

It may work on other distributions, but it has not been tested.

Installing on WSL

To use you can clone this repositorya and run autoconfig.sh from the root directory.

git clone https://github.com/rehanhaider/autoconfig.git
cd autoconfig
./autoconfig.sh

By default the script will run in silent mode.

Interactive Mode

You can run the script in interactive mode by passing the -i flag.

./autoconfig.sh -i

You will need to install nerd fonts and configure them in your Microsoft Terminal settings. A font is included in the font directory.

Additional Notes

Please note that Windows configuration is not currently supported, but may be added in future updates.

pc-automated-config's People

Contributors

rehanhaider avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.