DominikJaniec / EnvConfigs

My personal environment's configuration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EnvConfigs

My Personal Environment's Configuration and Setup

-- Domin

Initial preparation

  1. Obtain current repository by cloning it, or what is more likely at fresh environment, by downloading ZIP archive and extracting it. Then place that EnvConfig within desired Repos Home Directory - e.g. ~/Repos or D:\Repos.

  2. Using !elevate-session.ps1 script, start PowerShell session (PSSession) elevated to the Administrator Role.

  3. Set necessary execution policy for the whole machine:

    Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned -Confirm
  4. Install Chocolatey: a package manager for Windows, using elevated PSSession:

    ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) `
        | Invoke-Expression

Software via Chocolatey

  1. Execute prepare script: > .\Choco\!prepare.ps1

    • Optional script's parameter: -PkgLevel (core|tools|dev|full)
    • Default value is assumed to be: -PkgLevel full
    • Each value encompass all previous levels.
  2. That script requires Chocolatey and have to be executed from PSSession elevated to Admin.

  3. What does that script do?

Shells & Git configuration

  1. Execute prepare script: > .\Shells\!prepare.ps1

    • Script provides a single switch: -PwshAllUsers.
  2. That script have to be executed from PSSession elevated to Admin from target user.

    • This requirement could be lifted, when creating SymbolicLink will be available to normal users.
  3. What does that script do?

    • Will make symbolic-links at Home (~/) directory of current user with Bash and Git configuration files: .bash_profile + .bashrc, and .gitconfig.
    • Will install pwsh-modules: posh-git and oh-my-posh, which are utilized by Profile.ps1 for more user friendly UX of terminal.
    • Symbolic-link will also be created for profile-file for PowerShell at ~/Documents/PowerShell/Profile.ps1 - no profile for old but yet default PowerShell 5.
    • When -PwshAllUsers is provided, the Pwsh is set up with Profile and Modules for All Users under C:/Program Files/PowerShell.

System Windows configuration

  1. Execute prepare script: > .\System\!prepare.ps1

    • Script has a few switches. When any of then is present, only related changes will be executed. Script by default executes all of them.
    • Available switches: -AssocTxtfile, -CtxMenuCleanUp, -ProcessExpSchedule, -WinExplorerPrepare, -DittoConfigSetup, -FluxConfigSetup, -HWiNFO64ConfigSetup, -UpdateScriptInstall.
  2. That script have to be executed from PSSession elevated to Admin from target user.

  3. What does that script do?

    • -AssocTxtfile: Will setup every defined files' extensions to be treated as Text-Based files by Windows Explorer.
    • -CtxMenuCleanUp: Will clean up context menu of folders from unnecessary defined entries.
    • -WinExplorerPrepare: Will fix Explorer's display configuration and organize Quick Access with a few handy folders. This script expect that there is a parent directory called Repos and one of theirs sibling is called Personal - both of them will be pinned.
    • -ProcessExpSchedule: Will schedule Process Explorer by Mark Russinovich to start on Logon.
    • -DittoConfigSetup: Will load into Register non-default-personal Ditto's configuration.
    • -FluxConfigSetup: Will import Register-based f.lux's configuration adjusted for Domin's lifestyle.
    • -HWiNFO64ConfigSetup: Will configure HWiNFO64 to sense CPU and GPU temperatures of CGL.
    • -UpdateScriptInstall: Will link update-system.bat into PATH available directory, so Admin can request and execute whole System update.

Visual Studio Code

  1. Execute prepare script: > .\VSCode\!prepare.ps1

    • Optional multi-value parameter: -Extensions: defines which extensions groups will be installed. Available values: core, tools, dev, webdev, work, extra - where all matches to every extension and multiple values are separated by comma.
    • There are two additional switches: SkipExtra and SkipWork, which excludes matched group even explicitly requested.
    • By default -Extensions assumes all group, for ease of use.
  2. That script requires installed VS Code, which could be download from Microsoft.

  3. What does that script do?

Visual Studio 2017

  1. Extensions and configuration presented in file: VSCommunity.md.
  2. Download and install it from Microsoft (Community version).

Keyboard

  1. Use any Ergodox compatible devices and load recent.hex layout.
  2. More details one can find at: Keyboard/README.md.

Assumptions and remarks

  • Chapters presented above are set in the proposed order of execution of steps for configuration setup.

  • Initial placement of EnvConfigs repository is very important and should be under desired Repos:

    • Many prepare script (i.e. !prepare.ps1) will make symbolic-links into files located here.
    • The prepare script of System will pin as favorites and decorate a parent directory as Repos.
    • Every prepare script should be run from this repository's root directory via PowerShell.
  • It is required to have PowerShell in version greater then 3.0. Fortunately, Windows 10 currently comes with version 5.1 - to check it, one can type: $PSVersionTable.PSVersion within running PSSession.

  • Almost all scripts expect to be run within PowerShell session with elevated permissions to the Administrator Role. To obtain elevated PowerShell console, just execute:

    PowerShell.exe -NoProfile -File ".\!elevate-session.ps1"

Track the EnvConfigs repository

  1. While preparing fresh environment, current repository was probably just downloaded as ZIP without any Git Tracking ability - as there were no git available at beginning of setup.

    • It is not recommended to clone it again in desired place, as it should be already in expected Repos Home Directory.
    • It is strongly encouraged to restore Git support within current directory - to easily track future configuration changes.
  2. To reestablish Git support within current repository, one should use favorite terminal under their own user account and call in order:

    git init --initial-branch=main
    git remote add origin https://github.com/DominikJaniec/EnvConfigs.git
    git fetch
    git reset origin/main --mixed
    git branch --set-upstream-to=origin/main
    git status

About

My personal environment's configuration

License:MIT License


Languages

Language:PowerShell 89.5%Language:Shell 5.3%Language:Batchfile 2.8%Language:F# 2.3%