From 1fbb9b16d9916b04a84345d24402ff30b32a0a94 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 29 Dec 2019 13:31:28 +0100 Subject: [PATCH 001/102] First custom commit --- bootstrap/w10-settings.json | 78 -------------------------------- configurations/git/gitconfig.txt | 4 +- configurations/git/gitignore.txt | 8 +--- main.ps1 | 52 ++++++++++----------- 4 files changed, 26 insertions(+), 116 deletions(-) diff --git a/bootstrap/w10-settings.json b/bootstrap/w10-settings.json index edad069..92e74c0 100644 --- a/bootstrap/w10-settings.json +++ b/bootstrap/w10-settings.json @@ -1,17 +1,5 @@ { "programs": [ - { - "program": "geforce-experience", - "name": "GeForce Experience", - "installation": true, - "default": true - }, - { - "program": "geforce-driver", - "name": "GeForce Game Ready Driver", - "installation": true, - "default": true - }, { "program": "docker-desktop", "name": "Docker Desktop", @@ -48,66 +36,18 @@ "installation": false, "default": true }, - { - "program": "jdk8", - "name": "Java Development Kit 8", - "installation": false, - "default": false - }, { "program": "wsl", "name": "Windows Linux Subsystem (Ubuntu 18.04)", "installation": false, "default": true }, - { - "program": "pgadmin", - "name": "pgAdmin", - "installation": false, - "default": false - }, - { - "program": "httrack", - "name": "HTTrack", - "installation": true, - "default": false - }, - { - "program": "bitwarden", - "name": "BitWarden", - "installation": true, - "default": false - }, { "program": "ccleaner", "name": "CCleaner", "installation": true, "default": false }, - { - "program": "polar", - "name": "Polar Bookshelf", - "installation": true, - "default": false - }, - { - "program": "qbittorrent", - "name": "qBitorrent", - "installation": true, - "default": false - }, - { - "program": "sharex", - "name": "ShareX", - "installation": true, - "default": false - }, - { - "program": "station", - "name": "Station", - "installation": true, - "default": false - }, { "program": "vlc", "name": "VLC Media Player", @@ -132,29 +72,11 @@ "installation": true, "default": false }, - { - "program": "google-backup-and-sync", - "name": "Google Backup and Sync", - "installation": true, - "default": true - }, { "program": "dropbox", "name": "Dropbox", "installation": true, "default": true - }, - { - "program": "megasync", - "name": "Mega", - "installation": true, - "default": true - }, - { - "program": "dell-update", - "name": "Dell Update", - "installation": true, - "default": true } ] } diff --git a/configurations/git/gitconfig.txt b/configurations/git/gitconfig.txt index 135f5a7..6646b0e 100644 --- a/configurations/git/gitconfig.txt +++ b/configurations/git/gitconfig.txt @@ -1,6 +1,6 @@ [user] - name = Matheus Rocha Vieira - email = matheusrv@email.com + name = Audun L. Solemdal + email = auls@equinor.com signingkey = KEY_ID [commit] diff --git a/configurations/git/gitignore.txt b/configurations/git/gitignore.txt index 84d48d8..2d705e1 100644 --- a/configurations/git/gitignore.txt +++ b/configurations/git/gitignore.txt @@ -13,6 +13,7 @@ _site *.swp *.vi *.zip +*.gz *~ # OS or Editor folders @@ -29,13 +30,6 @@ _site nbproject Thumbs.db -# Komodo -.komodotools -*.komodoproject - -# grunt-html-validation -validation-report.json -validation-status.json # Folders to ignore bower_components diff --git a/main.ps1 b/main.ps1 index d366d67..912e078 100644 --- a/main.ps1 +++ b/main.ps1 @@ -364,19 +364,33 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: "robotofonts" #Default Install "k-litecodecpackfull" - "ffmpeg" - "jre8" - "7zip" "googlechrome" - "autohotkey" "sysinternals" # Dev Tools Must Have "git.install" "lepton" "powershell" - "virtualbox" "vagrant" - "putty" + "vscode" + "greenshot" + "winrar" + "GoogleChrome" + # Work use + "wsl" + "docker" + "slack" + "micorosft-windows-terminal" + "azure-cli" + "git" + "poshgit" + "dotnetcore-sdk" + ##"kubernetes-helm --version 2.13.1" + # Private use + "steam" + "leagueoflegends" + "vlc" + "spotify" + ) ForEach ($Program in $Programs) { Write-Output "`n [ START ] $Program" @@ -386,6 +400,9 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: $StopWatchElapsed = $StopWatch.Elapsed.TotalSeconds Write-Output " [ DONE ] $Program ... $StopWatchElapsed seconds`n" } + RefreshEnv + code --install-extension Shan.code-settings-sync # Vscode needs settings sync from github gist + $AllPrograms = Get-Content 'bootstrap\w10-settings.json' | Out-String | ConvertFrom-Json ForEach ($row in $AllPrograms.programs) { $ProgramName = $row.name @@ -403,10 +420,6 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: Enable-UAC RefreshEnv Start-Process -FilePath 'autoruns' -Wait - $OzoneInstall = Read-Host -Prompt "`n Do you wish to install Ozone Exon V30 Mice Driver? (Y/n)" - if ([string]::IsNullOrWhiteSpace($OzoneInstall) -Or $OzoneInstall -eq 'Y' -Or $OzoneInstall -eq 'y') { - Start-Process -FilePath 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' -ArgumentList 'https://www.ozonegaming.com/product/exon-v30' - } $OfficeInstall = Read-Host -Prompt "`n Do you wish to install Office? (Y/n)" if ([string]::IsNullOrWhiteSpace($OfficeInstall) -Or $OfficeInstall -eq 'Y' -Or $OfficeInstall -eq 'y') { Start-Process -FilePath 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' -ArgumentList 'https://old.reddit.com/r/sjain_guides/comments/9m4m0k/microsoft_office_201319_simple_method_to_download' @@ -421,12 +434,6 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: $regKeyHttp = $regKey -f 'http' $regKeyHttps = $regKey -f 'https' switch -Regex ($defaultBrowser.ToLower()) { - # Internet Explorer - 'ie|internet|explorer' { - Set-ItemProperty $regKeyHttp -name ProgId IE.HTTP - Set-ItemProperty $regKeyHttps -name ProgId IE.HTTPS - break - } # Firefox 'ff|firefox' { Set-ItemProperty $regKeyHttp -name ProgId FirefoxURL @@ -439,19 +446,6 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: Set-ItemProperty $regKeyHttps -name ProgId ChromeHTML break } - # Safari - 'sa*|apple' { - Set-ItemProperty $regKeyHttp -name ProgId SafariURL - Set-ItemProperty $regKeyHttps -name ProgId SafariURL - break - } - # Opera - 'op*' { - Set-ItemProperty $regKeyHttp -name ProgId Opera.Protocol - Set-ItemProperty $regKeyHttps -name ProgId Opera.Protocol - break - } - } } Set-DefaultBrowser chrome $GlobalStopWatch.Stop() From e24c7ed53dc17c4369447a9d686c2b0281285d0a Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 29 Dec 2019 13:43:47 +0100 Subject: [PATCH 002/102] personal settings --- bootstrap/unix-settings.json | 161 ++--------------------------------- main.sh | 2 +- 2 files changed, 10 insertions(+), 153 deletions(-) diff --git a/bootstrap/unix-settings.json b/bootstrap/unix-settings.json index 5cd5c89..6eb5f3e 100644 --- a/bootstrap/unix-settings.json +++ b/bootstrap/unix-settings.json @@ -1,9 +1,9 @@ { "personal": { - "name": "Matheus Rocha Vieira", - "email": "matheusrv@email.com", - "githubuser": "MatheusRV", - "defaultfolder": "/mnt/d/Cloud/GitHub" + "name": "Audun L. Solemdal", + "email": "auls@equinor.com", + "githubuser": "solomson", + "defaultfolder": "/mnt/c/appl/repos/sdp" }, "programs": [ { @@ -12,65 +12,28 @@ "installation": "true", "default": false }, - { - "program": "protobuf", - "name": "Google Protobuf", - "installation": "false", - "default": false - }, { "program": "azurecli", "name": "Azure Comand-line Interface", - "installation": "false", - "default": false - }, - { - "program": "herokucli", - "name": "Heroku Comand-line Interface", - "installation": "false", - "default": false - }, - { - "program": "gcloudcli", - "name": "Google Cloud Comand-line Interface", - "installation": "false", - "default": false - }, - { - "program": "gcloudsdk", - "name": "Google Cloud Software Development Kit", - "installation": "false", - "default": false - }, - { - "program": "rlang", - "name": "R Lang", "installation": "true", "default": false }, - { - "program": "rstudio", - "name": "RStudio", - "installation": "false", - "default": false, - "dependencies": "rlang" - }, { "program": "powershell", "name": "PowerShell", - "installation": "false", + "installation": "true", "default": false }, { "program": "dotnet", "name": "dotNet", - "installation": "false", + "installation": "true", "default": false }, { "program": "dotnetnuget", "name": "dotNet nuGet", - "installation": "false", + "installation": "true", "default": false, "dependencies": "dotnet" }, @@ -95,32 +58,6 @@ "installation": "false", "default": false }, - { - "program": "php", - "name": "PHP Hypertext Preprocessor", - "installation": "true", - "default": false - }, - { - "program": "php-composer", - "name": "PHP Composer", - "installation": "false", - "default": false, - "dependencies": "php" - }, - { - "program": "php-laravel", - "name": "Laravel", - "installation": "false", - "default": false, - "dependencies": "php" - }, - { - "program": "mysql", - "name": "MySQL", - "installation": "false", - "default": false - }, { "program": "mysql-phpmyadmin", "name": "phpMyAdmin", @@ -167,36 +104,6 @@ "default": false, "config": true }, - { - "program": "yarn-strapi", - "name": "Strapi", - "installation": "false", - "default": false, - "dependencies": "nvm" - }, - { - "program": "yarn-localtunnel", - "name": "LocalTunnel", - "installation": "false", - "default": false, - "dependencies": "nvm", - "hostname": "matheusrv1", - "port": "60000" - }, - { - "program": "yarn-prettier", - "name": "Prettier", - "installation": "false", - "default": false, - "dependencies": "nvm" - }, - { - "program": "yarn-leasot", - "name": "Leasot", - "installation": "false", - "default": false, - "dependencies": "nvm" - }, { "program": "anaconda", "name": "Anaconda", @@ -236,26 +143,6 @@ "default": false, "dependencies": "pyenv" }, - { - "program": "golang", - "name": "GoLang", - "installation": "true", - "default": false - }, - { - "program": "rvm", - "name": "Ruby Version Manager", - "installation": "true", - "default": false, - "config": true - }, - { - "program": "ruby-jekyll", - "name": "Jekyll", - "installation": "false", - "default": false, - "dependencies": "rvm" - }, { "program": "vagrant", "name": "Vagrant", @@ -278,45 +165,15 @@ { "program": "kubectl", "name": "Kubernetes", - "installation": "false", + "installation": "true", "default": false }, { "program": "kubernetes-helm", "name": "Kubernetes Helm", - "installation": "false", + "installation": "true", "default": false, "dependencies": "kubectl" - }, - { - "program": "mosh", - "name": "Mosh", - "installation": "false", - "default": false - }, - { - "program": "shfmt", - "name": "shfmt", - "installation": "false", - "default": false - }, - { - "program": "shellcheck", - "name": "ShellCheck", - "installation": "true", - "default": false - }, - { - "program": "x11server", - "name": "X11 Server", - "installation": "true", - "default": false - }, - { - "program": "netkit", - "name": "NetKit", - "installation": "false", - "default": false } ], "configurations": { diff --git a/main.sh b/main.sh index d72e7bf..e1a3430 100644 --- a/main.sh +++ b/main.sh @@ -105,7 +105,7 @@ EOF if [ "$(_jq '.installation')" == true ]; then programdependencies="$(jq -r '.programs[] | select(.program=="'"${programslug}"'").dependencies' "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" dependencieinstallation="$(jq -r '.programs[] | select(.program=="'"${programdependencies}"'").installation' "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" - if [ "${programdependencies}" == "null" ] || [ "${dependencieinstallation}" == true ]; then + if [ "${programdependencies}" == "nu+ll" ] || [ "${dependencieinstallation}" == true ]; then installflag=true else installflag=false From 33425ccf0542dbba8f731a603ec6483681d0c988 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 29 Dec 2019 14:21:13 +0100 Subject: [PATCH 003/102] add closing } --- main.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.ps1 b/main.ps1 index 912e078..db1aa93 100644 --- a/main.ps1 +++ b/main.ps1 @@ -387,7 +387,7 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: ##"kubernetes-helm --version 2.13.1" # Private use "steam" - "leagueoflegends" + #"leagueoflegends" "vlc" "spotify" @@ -451,6 +451,7 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: $GlobalStopWatch.Stop() $GlobalStopWatchElapsed = $StopWatch.Elapsed.TotalSeconds Write-Output "`n Total Execution Time ... $GlobalStopWatchElapsed seconds`n" + } } else { Write-Output "`n [ ERROR ] You must execute this script with administrator privileges`n" From 7db3d518ce4d0622bc07e0d8f66e4306202209cd Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 29 Dec 2019 14:40:28 +0100 Subject: [PATCH 004/102] remove computernames --- bootstrap/unix-settings.json | 4 ++-- main.ps1 | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bootstrap/unix-settings.json b/bootstrap/unix-settings.json index 6eb5f3e..9d603af 100644 --- a/bootstrap/unix-settings.json +++ b/bootstrap/unix-settings.json @@ -3,7 +3,7 @@ "name": "Audun L. Solemdal", "email": "auls@equinor.com", "githubuser": "solomson", - "defaultfolder": "/mnt/c/appl/repos/sdp" + "defaultfolder": "/mnt/c/Users/audun.solemdal/Documents" }, "programs": [ { @@ -177,7 +177,7 @@ } ], "configurations": { - "debug": "true", + "debug": "false", "purge": "false" } } diff --git a/main.ps1 b/main.ps1 index 912e078..de12ee1 100644 --- a/main.ps1 +++ b/main.ps1 @@ -4,7 +4,6 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: Write-Output "`n [ START ] Configuring System Run" $StopWatch = [System.Diagnostics.Stopwatch]::StartNew() Set-ExecutionPolicy RemoteSigned - $ComputerName = Get-Random -InputObject "Turing", "Knuth", "Berners-Lee", "Torvalds", "Hopper", "Ritchie", "Stallman", "Gosling", "Church", "Dijkstra", "Cooper", "Gates", "Jobs", "Wozniak", "Zuckerberg", "Musk", "Nakamoto", "Dotcom", "Snowden", "Kruskal", "Neumann" $StopWatch.Stop() $StopWatchElapsed = $StopWatch.Elapsed.TotalSeconds Write-Output " [ DONE ] Configuring System Run ... $StopWatchElapsed seconds`n" @@ -295,9 +294,6 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: $StopWatch.Stop() $StopWatchElapsed = $StopWatch.Elapsed.TotalSeconds Write-Output " [ DONE ] Remove Unnecessary Windows Registries ... $StopWatchElapsed seconds`n" - if ($env:computername -ne $ComputerName) { - Rename-Computer -NewName $ComputerName - } } else { $PurgeMode = Read-Host -Prompt "`n Enable Purge Mode (y/N)" From 4dee058d9202221e7a4ed64c2d593bfd939e12a7 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 29 Dec 2019 14:45:40 +0100 Subject: [PATCH 005/102] fix typo --- main.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.ps1 b/main.ps1 index c258287..69b756a 100644 --- a/main.ps1 +++ b/main.ps1 @@ -375,7 +375,7 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: "wsl" "docker" "slack" - "micorosft-windows-terminal" + "microsoft-windows-terminal" "azure-cli" "git" "poshgit" From fe6db3dc10cb524052fe9d1f3cd25b35018030a1 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 29 Dec 2019 15:03:58 +0100 Subject: [PATCH 006/102] personal settings --- bootstrap/w10-settings.json | 40 +++++-------------------------------- main.ps1 | 10 +++++----- 2 files changed, 10 insertions(+), 40 deletions(-) diff --git a/bootstrap/w10-settings.json b/bootstrap/w10-settings.json index 92e74c0..bb8d5a1 100644 --- a/bootstrap/w10-settings.json +++ b/bootstrap/w10-settings.json @@ -9,25 +9,19 @@ { "program": "dotnet", "name": "dotNet Framework 3.5 (include dotNet 2.5 and 3.0)", - "installation": true, + "installation": false, "default": true }, { "program": "github-desktop", "name": "GitHub Desktop", - "installation": true, + "installation": false, "default": true }, - { - "program": "vscode", - "name": "VSCode", - "installation": true, - "default": true - }, { "program": "hyperv", "name": "Hyper-V", - "installation": true, + "installation": false, "default": true }, { @@ -36,46 +30,22 @@ "installation": false, "default": true }, - { - "program": "wsl", - "name": "Windows Linux Subsystem (Ubuntu 18.04)", - "installation": false, - "default": true - }, { "program": "ccleaner", "name": "CCleaner", "installation": true, "default": false }, - { - "program": "vlc", - "name": "VLC Media Player", - "installation": true, - "default": false - }, - { - "program": "spotify", - "name": "Spotify", - "installation": false, - "default": false - }, { "program": "discord", "name": "Discord", - "installation": true, - "default": false - }, - { - "program": "steam", - "name": "Steam", - "installation": true, + "installation": false, "default": false }, { "program": "dropbox", "name": "Dropbox", - "installation": true, + "installation": false, "default": true } ] diff --git a/main.ps1 b/main.ps1 index 69b756a..3c158bc 100644 --- a/main.ps1 +++ b/main.ps1 @@ -180,11 +180,11 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: Write-Output "`n [ DOING ] Opens PC to This PC, not quick access" Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1 Write-Output "`n [ DOING ] Taskbar where window is open for multi-monitor" - Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2 - Write-Output "`n [ DOING ] Disable Quick Access: Recent Files" - Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowRecent -Type DWord -Value 0 - Write-Output "`n [ DOING ] Disable Quick Access: Frequent Folders" - Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowFrequent -Type DWord -Value 0 + Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 0 + Write-Output "`n [ DOING ] Enable Quick Access: Recent Files" + Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowRecent -Type DWord -Value 1 + Write-Output "`n [ DOING ] Enable Quick Access: Frequent Folders" + Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowFrequent -Type DWord -Value 1 Stop-Process -processName: Explorer -force # This will restart the Explorer service to make this work. } Write-Output "`n [ START ] Unistall Windows10 Unnecessary and Blotware Apps" From 03b2ab6aff6cde6d6dc1a48a2ccd67c0c5a6e16d Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 29 Dec 2019 15:20:52 +0100 Subject: [PATCH 007/102] ensure module import --- bootstrap/version.json | 2 +- main.ps1 | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/version.json b/bootstrap/version.json index 892d905..9266bd6 100644 --- a/bootstrap/version.json +++ b/bootstrap/version.json @@ -17,7 +17,7 @@ "GOLANG_VERSION": "1.12.1", "VAGRANT_VERSION": "2.2.5", "DOCKER_COMPOSE_VERSION": "1.24.0", - "KUBECTL_VERSION": "1.10.0", + "KUBECTL_VERSION": "1.14.8", "KUBERNETES_HELM_VERSION": "2.6.1", "SHFMT_VERSION": "2.6.4", "NETKIT_VERSION": "2.8", diff --git a/main.ps1 b/main.ps1 index 3c158bc..815acad 100644 --- a/main.ps1 +++ b/main.ps1 @@ -20,6 +20,7 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) RefreshEnv cinst -y boxstarter + Import-Module Boxstarter.Chocolatey $StopWatch.Stop() $StopWatchElapsed = $StopWatch.Elapsed.TotalSeconds From 38c260bc755e8c624ca5d855f99ce2a4f44e64ad Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 29 Dec 2019 15:23:16 +0100 Subject: [PATCH 008/102] hide system files --- main.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.ps1 b/main.ps1 index 815acad..ac95bd0 100644 --- a/main.ps1 +++ b/main.ps1 @@ -171,8 +171,8 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: Set-NetConnectionProfile -NetworkCategory Private Write-Output "`n [ DOING ] Setting dark theme as default" Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 - Write-Output "`n [ DOING ] Show hidden files, Show protected OS files, Show file extensions" - Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions + Write-Output "`n [ DOING ] Show hidden files, Show file extensions" + Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced HideFileExt "0" #--- File Explorer Settings --- Write-Output "`n [ DOING ] Adds things back in your left pane like recycle bin" From ab75f74044e9bc329b913f3095a24871b120ad1c Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Mon, 30 Dec 2019 13:24:24 +0100 Subject: [PATCH 009/102] explorer cleanup --- main.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.ps1 b/main.ps1 index ac95bd0..7dcd33d 100644 --- a/main.ps1 +++ b/main.ps1 @@ -186,7 +186,16 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowRecent -Type DWord -Value 1 Write-Output "`n [ DOING ] Enable Quick Access: Frequent Folders" Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowFrequent -Type DWord -Value 1 + Write-Output "`n [ DOING ] Removing 3D Objects folder" + Remove-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}\' + #pictures + Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag' -Name Thispcpolicy "Show" + # videos + Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag' -Name Thispcpolicy "Hide" Stop-Process -processName: Explorer -force # This will restart the Explorer service to make this work. + # music + Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag' -Name Thispcpolicy "Hide" + } Write-Output "`n [ START ] Unistall Windows10 Unnecessary and Blotware Apps" $StopWatch = [System.Diagnostics.Stopwatch]::StartNew() From 2fd2ef054a850900415325bfd05161bdf0405029 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sat, 4 Jan 2020 11:26:01 +0100 Subject: [PATCH 010/102] Add win10 upgrade script for mom --- momspc.ps1 | 233 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 momspc.ps1 diff --git a/momspc.ps1 b/momspc.ps1 new file mode 100644 index 0000000..8529fcf --- /dev/null +++ b/momspc.ps1 @@ -0,0 +1,233 @@ +$Privacy = Read-Host -Prompt "`n Do you care about privacy? (Y/n)" +if ([string]::IsNullOrWhiteSpace($Privacy) -Or $Privacy -eq 'Y' -Or $Privacy -eq 'y') { + Write-Output "`n [ START ] Protecting Privacy" + $StopWatch = [System.Diagnostics.Stopwatch]::StartNew() + #Disables Windows Feedback Experience + Write-Output " [ DOING ] Disabling Windows Feedback Experience program" + $Advertising = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" + If (Test-Path $Advertising) { + Set-ItemProperty $Advertising Enabled -Value 0 + } + #Stops Cortana from being used as part of your Windows Search Function + Write-Output " [ DOING ] Stopping Cortana from being used as part of your Windows Search Function" + $Search = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" + If (Test-Path $Search) { + Set-ItemProperty $Search AllowCortana -Value 0 + } + #Disables Web Search in Start Menu + Write-Output " [ DOING ] Disabling Bing Search in Start Menu" + $WebSearch = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" + Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" BingSearchEnabled -Value 0 + If (!(Test-Path $WebSearch)) { + New-Item $WebSearch + } + New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search' -Name DisableWebSearch -Type DWORD -Value 1 + Set-ItemProperty $WebSearch DisableWebSearch -Value 1 + #Stops the Windows Feedback Experience from sending anonymous data + Write-Output " [ DOING ] Stopping the Windows Feedback Experience program" + $Period = "HKCU:\Software\Microsoft\Siuf\Rules" + If (!(Test-Path $Period)) { + New-Item $Period + } + Set-ItemProperty $Period PeriodInNanoSeconds -Value 0 + #Prevents bloatware applications from returning and removes Start Menu suggestions + Write-Output " [ DOING ] Adding Registry key to prevent bloatware apps from returning" + $registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" + $registryOEM = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" + If (!(Test-Path $registryPath)) { + New-Item $registryPath + } + Set-ItemProperty $registryPath DisableWindowsConsumerFeatures -Value 1 + If (!(Test-Path $registryOEM)) { + New-Item $registryOEM + } + Set-ItemProperty $registryOEM ContentDeliveryAllowed -Value 0 + Set-ItemProperty $registryOEM OemPreInstalledAppsEnabled -Value 0 + Set-ItemProperty $registryOEM PreInstalledAppsEnabled -Value 0 + Set-ItemProperty $registryOEM PreInstalledAppsEverEnabled -Value 0 + Set-ItemProperty $registryOEM SilentInstalledAppsEnabled -Value 0 + Set-ItemProperty $registryOEM SystemPaneSuggestionsEnabled -Value 0 + #Preping mixed Reality Portal for removal + Write-Output " [ DOING ] Setting Mixed Reality Portal value to 0 so that you can uninstall it in Settings" + $Holo = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Holographic" + If (Test-Path $Holo) { + Set-ItemProperty $Holo FirstRunSucceeded -Value 0 + } + #Disables Wi-fi Sense + Write-Output " [ DOING ] Disabling Wi-Fi Sense" + $WifiSense1 = "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" + $WifiSense2 = "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" + $WifiSense3 = "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config" + If (!(Test-Path $WifiSense1)) { + New-Item $WifiSense1 + } + Set-ItemProperty $WifiSense1 Value -Value 0 + If (!(Test-Path $WifiSense2)) { + New-Item $WifiSense2 + } + Set-ItemProperty $WifiSense2 Value -Value 0 + Set-ItemProperty $WifiSense3 AutoConnectAllowedOEM -Value 0 + #Disables live tiles + Write-Output " [ DOING ] Disabling live tiles" + $Live = "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" + If (!(Test-Path $Live)) { + New-Item $Live + } + Set-ItemProperty $Live NoTileApplicationNotification -Value 0 + #Turns off Data Collection via the AllowTelemtry key by changing it to 0 + Write-Output " [ DOING ] Turning off Data Collection" + $DataCollection1 = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" + $DataCollection2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" + $DataCollection3 = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" + If (Test-Path $DataCollection1) { + Set-ItemProperty $DataCollection1 AllowTelemetry -Value 0 + } + If (Test-Path $DataCollection2) { + Set-ItemProperty $DataCollection2 AllowTelemetry -Value 0 + } + If (Test-Path $DataCollection3) { + Set-ItemProperty $DataCollection3 AllowTelemetry -Value 0 + } + #Disabling Location Tracking + Write-Output " [ DOING ] Disabling Location Tracking" + $SensorState = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" + $LocationConfig = "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" + If (!(Test-Path $SensorState)) { + New-Item $SensorState + } + Set-ItemProperty $SensorState SensorPermissionState -Value 0 + If (!(Test-Path $LocationConfig)) { + New-Item $LocationConfig + } + Set-ItemProperty $LocationConfig Status -Value 0 + #Disables People icon on Taskbar + Write-Output " [ DOING ] Disabling People icon on Taskbar" + $People = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" + If (!(Test-Path $People)) { + New-Item $People + } + Set-ItemProperty $People PeopleBand -Value 0 + #Disables scheduled tasks that are considered unnecessary + Write-Output " [ DOING ] Disabling scheduled tasks" + Get-ScheduledTask XblGameSaveTaskLogon | Disable-ScheduledTask + Get-ScheduledTask XblGameSaveTask | Disable-ScheduledTask + Get-ScheduledTask Consolidator | Disable-ScheduledTask + Get-ScheduledTask UsbCeip | Disable-ScheduledTask + Get-ScheduledTask DmClient | Disable-ScheduledTask + Get-ScheduledTask DmClientOnScenarioDownload | Disable-ScheduledTask + Write-Output " [ DOING ] Stopping and disabling WAP Push Service" + #Stop and disable WAP Push Service + Stop-Service "dmwappushservice" + Set-Service "dmwappushservice" -StartupType Disabled + Write-Output " [ DOING ] Stopping and disabling Diagnostics Tracking Service" + #Disabling the Diagnostics Tracking Service + Stop-Service "DiagTrack" + Set-Service "DiagTrack" -StartupType Disabled + $StopWatch.Stop() + $StopWatchElapsed = $StopWatch.Elapsed.TotalSeconds + Write-Output " [ DONE ] Protecting Privacy ... $StopWatchElapsed seconds`n" +} +$WindowsConfig = Read-Host -Prompt "`n Do wish configure Windows? (Y/n)" +if ([string]::IsNullOrWhiteSpace($WindowsConfig) -Or $WindowsConfig -eq 'Y' -Or $WindowsConfig -eq 'y') { + Write-Output "`n [ DOING ] Setting network category to private" + Set-NetConnectionProfile -NetworkCategory Private + Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced HideFileExt "0" + #--- File Explorer Settings --- + Write-Output "`n [ DOING ] Opens PC to This PC, not quick access" + Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1 + Write-Output "`n [ DOING ] Taskbar where window is open for multi-monitor" + Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 0 + Write-Output "`n [ DOING ] Enable Quick Access: Recent Files" + Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowRecent -Type DWord -Value 1 + Write-Output "`n [ DOING ] Enable Quick Access: Frequent Folders" + Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowFrequent -Type DWord -Value 1 + Write-Output "`n [ DOING ] Removing 3D Objects folder" + Remove-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}\' + # videos + Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag' -Name Thispcpolicy "Hide" + Stop-Process -processName: Explorer -force # This will restart the Explorer service to make this work. + # music + Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag' -Name Thispcpolicy "Hide" + Stop-Process -processName: Explorer -force # This will restart the Explorer service to make this work. + +} +Write-Output "`n [ START ] Unistall Windows10 Unnecessary and Blotware Apps" +$StopWatch = [System.Diagnostics.Stopwatch]::StartNew() +$AppXApps = @( + "*Microsoft.BingNews*" + "*Microsoft.Messaging*" + "*Microsoft.Microsoft3DViewer*" + "*Microsoft.MicrosoftOfficeHub*" + "*Microsoft.MicrosoftSolitaireCollection*" + "*Microsoft.NetworkSpeedTest*" + "*Microsoft.Office.Sway*" + "*Microsoft.OneConnect*" + "*Microsoft.People*" + "*Microsoft.Print3D*" + "*Microsoft.CommsPhone*" + "*Microsoft.WindowsAlarms*" + "*Microsoft.WindowsCamera*" + "*microsoft.windowscommunicationsapps*" + "*Microsoft.WindowsFeedbackHub*" + "*Microsoft.WindowsMaps*" + "*Microsoft.WindowsSoundRecorder*" + "*Microsoft.Xbox.TCUI*" + "*Microsoft.XboxApp*" + "*Microsoft.XboxGameOverlay*" + "*Microsoft.XboxIdentityProvider*" + "*Microsoft.XboxSpeechToTextOverlay*" + "*Microsoft.ZuneMusic*" + "*Microsoft.People*" + "*Microsoft.ZuneVideo*" + #Sponsored Windows 10 AppX Apps + #Add sponsored/featured apps to remove in the "*AppName*" format + "*EclipseManager*" + "*Autodesk*" + "*BubbleWitch*" + "*MarchofEmpires*" + "*McAfee*" + "*Minecraft*" + "*Netflix*" + "*ActiproSoftwareLLC*" + "*AdobeSystemsIncorporated.AdobePhotoshopExpress*" + "*Duolingo-LearnLanguagesforFree*" + "*PandoraMediaInc*" + "*CandyCrush*" + "*Wunderlist*" + "*Flipboard*" + "*Twitter*" + "*Facebook*" + "*Spotify*" + #Optional: Typically not removed but you can if you need to for some reason + #"*Microsoft.Advertising.Xaml_10.1712.5.0_x64__8wekyb3d8bbwe*" + #"*Microsoft.Advertising.Xaml_10.1712.5.0_x86__8wekyb3d8bbwe*" + #"*Microsoft.BingWeather*" + #"*Microsoft.MSPaint*" + #"*Microsoft.MicrosoftStickyNotes*" + #"*Microsoft.Windows.Photos*" + #"*Microsoft.WindowsCalculator*" + #"*Microsoft.WindowsStore*" +) +foreach ($App in $AppXApps) { + Write-Output " [ DOING ] Removing $App from registry" + Get-AppxPackage -Name $App | Remove-AppxPackage -ErrorAction SilentlyContinue + Get-AppxPackage -Name $App -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue + Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $App | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue +} +[regex]$WhitelistedApps = 'Microsoft.Paint3D|Microsoft.WindowsCalculator|Microsoft.WindowsStore|Microsoft.Windows.Photos|CanonicalGroupLimited.UbuntuonWindows|Microsoft.XboxGameCallableUI|Microsoft.XboxGamingOverlay|Microsoft.Xbox.TCUI|Microsoft.XboxGamingOverlay|Microsoft.XboxIdentityProvider|Microsoft.MicrosoftStickyNotes|Microsoft.MSPaint*' +Get-AppxPackage -AllUsers | Where-Object { $_.Name -NotMatch $WhitelistedApps } | Remove-AppxPackage +Get-AppxPackage | Where-Object { $_.Name -NotMatch $WhitelistedApps } | Remove-AppxPackage +Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -NotMatch $WhitelistedApps } | Remove-AppxProvisionedPackage -Online +$StopWatch.Stop() +$StopWatchElapsed = $StopWatch.Elapsed.TotalSeconds +Write-Output " [ DONE ] Unistall Windows10 Unnecessary and Blotware Apps ... $StopWatchElapsed seconds`n" +Write-Output "`n [ START ] Remove Unnecessary Windows Registries" +$StopWatch = [System.Diagnostics.Stopwatch]::StartNew() + +ForEach ($Key in $Keys) { + Write-Output " [ DOING ] Removing $Key from registry" + Remove-Item $Key -Recurse +} +$StopWatch.Stop() +$StopWatchElapsed = $StopWatch.Elapsed.TotalSeconds +Write-Output " [ DONE ] Remove Unnecessary Windows Registries ... $StopWatchElapsed seconds`n" \ No newline at end of file From 901b3e1dd8eb242b738c485caf40e50db8b433ee Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Tue, 14 Jan 2020 20:11:23 +0100 Subject: [PATCH 011/102] fix typo in wsl script --- main.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.sh b/main.sh index e1a3430..d72e7bf 100644 --- a/main.sh +++ b/main.sh @@ -105,7 +105,7 @@ EOF if [ "$(_jq '.installation')" == true ]; then programdependencies="$(jq -r '.programs[] | select(.program=="'"${programslug}"'").dependencies' "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" dependencieinstallation="$(jq -r '.programs[] | select(.program=="'"${programdependencies}"'").installation' "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" - if [ "${programdependencies}" == "nu+ll" ] || [ "${dependencieinstallation}" == true ]; then + if [ "${programdependencies}" == "null" ] || [ "${dependencieinstallation}" == true ]; then installflag=true else installflag=false From 28fe32866cd2faa05a9b84ce32a9b52f4e81e263 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Tue, 14 Jan 2020 20:11:43 +0100 Subject: [PATCH 012/102] add startup script --- start.ps1 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 start.ps1 diff --git a/start.ps1 b/start.ps1 new file mode 100644 index 0000000..a86dfff --- /dev/null +++ b/start.ps1 @@ -0,0 +1,25 @@ +#Declare URLs, then open URLs in chrome + +$urls = @( + "https://youtube.com" + "https://portal.azure.com" + "https://google.com" + "https://github.com/equinor/sdp-aks" + "https://github.com/equinor/sdp-flux" + "https://git.equinor.com" + +) + +Start-Process "firefox.exe" $urls + +# Bypass UAC admin prompts for the scripts duration +Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 0 + +# Open Termnials + vscode +Start-Process "wsl" -Verb RunAs +Start-Process "powershell" -Verb RunAs +Start-Process "code" -Verb RunAs +Start-Process shell:appsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App -Verb RunAs # Windows Terminal + +# Re-enable UAC prompts (use value "1" for max validation) +Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 2 From df98eea3d452d59b416b53e5b6dcd00aa8e6b5b0 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Tue, 14 Jan 2020 20:11:50 +0100 Subject: [PATCH 013/102] keybinds and readme --- README.md | 27 ++++++++++++--------------- keybinds.ahk | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 keybinds.ahk diff --git a/README.md b/README.md index 43afe75..053cbcb 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,16 @@ -# dotfiles -User-specific application configuration is traditionally stored in so called dotfiles. Dotfiles are plain text configuration files on Unix-y systems for things like our shell, ~/.zshrc, our editor in ~/.vimrc, and many others. They are called "dotfiles" as they typically are named with a leading . making them hidden files on your system, although this is not a strict requirement. +# Changes in this fork -Since these files are all plain text, we can gather them together in a git repository and use that to track the changes you make over time. +## Todo -## Install the Windows Subsystem for Linux -Before installing any Linux distros for WSL, you must ensure that the "Windows Subsystem for Linux" optional feature is enabled: +- global powershell profile for productivity +- windows terminal settings sync +- Zsh + autosuggestions in wsl +- some kind of sync/deployment of files in this repo to my hosts? -1. Open PowerShell as Administrator and run: -``` -Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -``` -2. Restart your computer when prompted. -3. To download distros using PowerShell, use curl. -``` -curl.exe -L -o ubuntu-1804.appx https://aka.ms/wsl-ubuntu-1804 -``` -Note: Windows 10 Spring 2018 Update (or later) includes the popular curl command-line utility with which you can invoke web requests from the command line. +Done: +- Personal settings and preferences + +Startup files (move to %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup): +- start.ps1 - Startup at work +- WIP: keybinds.ahk - Global keybinds to stop bad habits, increase productivity \ No newline at end of file diff --git a/keybinds.ahk b/keybinds.ahk new file mode 100644 index 0000000..8c1b3c5 --- /dev/null +++ b/keybinds.ahk @@ -0,0 +1,35 @@ +IfWinActive, Adminstrator: Windows Powershell +{ +::ssh::ssh -l auls +return +} + +#c:: +if WinExist("Kalkulator") || if WinExist("Calculator") +{ + WinActivate ; Automatically uses the window found above. + Send, {Escape} + Send, {Enter} + return +} +else +{ + Run, calc.exe + return +} + +return + +#n:: +if WinExist("Untitled - Notepad") || if WinExist("*Untitled - Notepad") +{ + WinActivate ; Automatically uses the window found above. + Send, {Enter} + Send, {Enter} + return +} +else +{ + Run, notepad.exe + return +} \ No newline at end of file From f55311c959bf344348200e975c68fbafc30dcb8e Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Tue, 14 Jan 2020 21:57:03 +0100 Subject: [PATCH 014/102] many new keybinds --- keybinds.ahk | 70 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/keybinds.ahk b/keybinds.ahk index 8c1b3c5..2465ae1 100644 --- a/keybinds.ahk +++ b/keybinds.ahk @@ -1,9 +1,60 @@ +; Default state of lock keys +SetNumlockState, AlwaysOn +;SetCapsLockState, AlwaysOff +SetScrollLockState, AlwaysOff +return + +; Suspend AutoHotKey +CapsLock & p::Suspend ; +return + +; Always on Top +^SPACE:: Winset, Alwaysontop, , A ; ctrl + space +Return + +; Google Search highlighted text +CapsLock & e:: +{ + Send, ^c + Sleep 50 + Run, http://www.google.com/search?q=%clipboard% + Return +} + +; Rebind useless key to braces ++|:: +{ + Send, {RAlt Down}{7}{RAlt Up} + Send, {RAlt Down}{0}{RAlt Up} + return +} + + +; Scroll tab forward (chrome) +CapsLock & WheelDown:: +{ + Send ^{Tab} + sleep 50 + return +} + +; Scroll tab back (chrome) +CapsLock & WheelUp:: +{ + Send, ^+{Tab} + sleep 50 + return +} + + +; Save time on ssh commands IfWinActive, Adminstrator: Windows Powershell { ::ssh::ssh -l auls return } +; Cleanup for calculators #c:: if WinExist("Kalkulator") || if WinExist("Calculator") { @@ -14,12 +65,10 @@ if WinExist("Kalkulator") || if WinExist("Calculator") } else { - Run, calc.exe + ; Run, calc.exe return } -return - #n:: if WinExist("Untitled - Notepad") || if WinExist("*Untitled - Notepad") { @@ -32,4 +81,17 @@ else { Run, notepad.exe return -} \ No newline at end of file +} + +; Unused F keys + +; Launch VSCODE and create .md file for notes. alternative to notepad +F4::Run, %userprofile%\AppData\Local\Programs\Microsoft VS Code\Code.exe "c:/appl/notes/%A_DD%-%A_MM%-%A_YYYY%.md", max +return +; Launch Slack +F7::Run "%userprofile%\AppData\Local\slack\slack.exe" +return + +; Launch Outlook +F8::Run "%programfiles%\Microsoft Office\root\Office16\OUTLOOK.EXE" +return \ No newline at end of file From 7115fe53b66c99a41a71bc74db9e9822307cfde5 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Tue, 14 Jan 2020 23:20:07 +0100 Subject: [PATCH 015/102] wip: vscode shortcuts --- keybinds.ahk | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/keybinds.ahk b/keybinds.ahk index 2465ae1..07529fb 100644 --- a/keybinds.ahk +++ b/keybinds.ahk @@ -50,8 +50,8 @@ CapsLock & WheelUp:: ; Save time on ssh commands IfWinActive, Adminstrator: Windows Powershell { -::ssh::ssh -l auls -return + ::ssh::ssh -l auls + return } ; Cleanup for calculators @@ -85,13 +85,30 @@ else ; Unused F keys -; Launch VSCODE and create .md file for notes. alternative to notepad -F4::Run, %userprofile%\AppData\Local\Programs\Microsoft VS Code\Code.exe "c:/appl/notes/%A_DD%-%A_MM%-%A_YYYY%.md", max +; Open vscode +F3:: +{ + p = %userprofile%\AppData\Local\Programs\Microsoft VS Code\Code.exe + a = C:\Appl\repos + Run, %comspec% /K ""%p%" -n %a%",, max + return +} return ; Launch Slack F7::Run "%userprofile%\AppData\Local\slack\slack.exe" return ; Launch Outlook -F8::Run "%programfiles%\Microsoft Office\root\Office16\OUTLOOK.EXE" -return \ No newline at end of file +F8:: +Run "%programfiles%\Microsoft Office\root\Office16\OUTLOOK.EXE" +return + +; Structured logging in vscode +F4:: +{ + p = %userprofile%\AppData\Local\Programs\Microsoft VS Code\Code.exe + a = C:\Appl\notes + b = C:\Appl\notes\%A_DD%-%A_MM%-%A_YYYY%.md + Run, %comspec% /K ""%p%" -n %a%" " %b%", max + return +} \ No newline at end of file From a67ecb1d963d7760dc158bb4d21b369859685b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Wed, 15 Jan 2020 07:49:15 +0100 Subject: [PATCH 016/102] startup folder & pwsh profile --- keybinds.ahk => startup/keybinds.ahk | 0 startup/profile.ps1 | 74 ++++++++++++++++++++++++++++ start.ps1 => startup/start.ps1 | 0 3 files changed, 74 insertions(+) rename keybinds.ahk => startup/keybinds.ahk (100%) create mode 100644 startup/profile.ps1 rename start.ps1 => startup/start.ps1 (100%) diff --git a/keybinds.ahk b/startup/keybinds.ahk similarity index 100% rename from keybinds.ahk rename to startup/keybinds.ahk diff --git a/startup/profile.ps1 b/startup/profile.ps1 new file mode 100644 index 0000000..2617475 --- /dev/null +++ b/startup/profile.ps1 @@ -0,0 +1,74 @@ +# cp this file to $PSHOME\Profile.ps1 (all users, allhosts) + +# Default folder +cd "C:\Appl\repos" + +# Critical Modules + +Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git.psd1' + +# Alias + +set-alias grep select-string +#Set-Alias doc docker.exe +#Set-Alias dock docker-compose.exe +Set-Alias k kubectl.exe +Set-Alias he helm.exe +#Set-Alias flux fluxctl.exe sync --k8s-fwd-ns flux + +# Bash functionality + +function TouchFile ($name) +{ + New-Item -Path . -Name $name +} + +Set-alias -name touch -Value TouchFile + +# Azure handy + +function AzLogin() +{ + az login +} + +function AzSub() +{ + az account set --subscription "SDP Tools" +} + +function Get-AzRgContent($rgname) +{ + Get-AzResource -ResourceGroupName $rgname +} + +function List-AzRg() +{ + Get-AzResourceGroup | select -Property ResourceGroupName +} + +# Helm + +function HelmDel($name) +{ + $m = helm ls | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String + # $n = $m -replace '(^\s+|\s+$)','' -replace '\s+',' ' | %{$_.split(" ")[10]} + + helm del --purge $name +} + +function KubeUp($name) +{ + $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String | %{$_.split(" ")[0]} + $n = $m.Substring(2) + + kubectl scale deployments -n $n --replicas=1 --all +} + +function KubeDown($name) +{ + $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String | %{$_.split(" ")[0]} + $n = $m.Substring(2) + + kubectl scale deployments -n $n --replicas=0 --all +} \ No newline at end of file diff --git a/start.ps1 b/startup/start.ps1 similarity index 100% rename from start.ps1 rename to startup/start.ps1 From d17271d3b84446c2bf12217860de8ee460603f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Wed, 15 Jan 2020 08:28:49 +0100 Subject: [PATCH 017/102] kubectl utils --- startup/profile.ps1 | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 2617475..18f715a 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -1,4 +1,4 @@ -# cp this file to $PSHOME\Profile.ps1 (all users, allhosts) +# cp ./startup/profile.ps1 $PSHOME\Profile.ps1 (all users, allhosts) # Default folder cd "C:\Appl\repos" @@ -47,7 +47,7 @@ function List-AzRg() Get-AzResourceGroup | select -Property ResourceGroupName } -# Helm +# Containers function HelmDel($name) { @@ -71,4 +71,30 @@ function KubeDown($name) $n = $m.Substring(2) kubectl scale deployments -n $n --replicas=0 --all +} + +function KubeCon($con) +{ + $o = "sdpaks-$con-k8s" + kubectl config use-context $o + + if ($?){ + Write-host "Currently in " -NoNewline + Write-Host $con -ForegroundColor Green -NoNewline + Write-Host " cluster" -ForegroundColor Yellow + } +} + +function KubeNs($name) +{ + # always returns true.. nneed workaround + kubectl config set-context --current --namespace=$name + if($?) { + $con = kubectl config current-context + Write-host "Currently at " -NoNewline -ForegroundColor Yellow + Write-Host $name -ForegroundColor Cyan -NoNewline + Write-Host " namespace in " -ForegroundColor Yellow -NoNewline + Write-Host $con -ForegroundColor Green -NoNewline + Write-Host " cluster" -ForegroundColor Yellow + } } \ No newline at end of file From 573ddab774d494c5e78a6b3306d42f9ab8fb2a0e Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Wed, 15 Jan 2020 21:36:47 +0100 Subject: [PATCH 018/102] Get used to not using capslock --- startup/keybinds.ahk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/startup/keybinds.ahk b/startup/keybinds.ahk index 07529fb..4d12f1d 100644 --- a/startup/keybinds.ahk +++ b/startup/keybinds.ahk @@ -1,6 +1,6 @@ ; Default state of lock keys SetNumlockState, AlwaysOn -;SetCapsLockState, AlwaysOff +SetCapsLockState, AlwaysOff SetScrollLockState, AlwaysOff return @@ -13,7 +13,7 @@ return Return ; Google Search highlighted text -CapsLock & e:: +CapsLock & Space:: { Send, ^c Sleep 50 From 01d43abd7e4dc324202da0eac7160afdc32c8158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Thu, 16 Jan 2020 07:50:28 +0100 Subject: [PATCH 019/102] shorter function names --- startup/profile.ps1 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 18f715a..1a9b746 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -14,7 +14,6 @@ set-alias grep select-string #Set-Alias dock docker-compose.exe Set-Alias k kubectl.exe Set-Alias he helm.exe -#Set-Alias flux fluxctl.exe sync --k8s-fwd-ns flux # Bash functionality @@ -32,7 +31,7 @@ function AzLogin() az login } -function AzSub() +function Set-AzSub() { az account set --subscription "SDP Tools" } @@ -57,7 +56,7 @@ function HelmDel($name) helm del --purge $name } -function KubeUp($name) +function KUp($name) { $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String | %{$_.split(" ")[0]} $n = $m.Substring(2) @@ -65,7 +64,7 @@ function KubeUp($name) kubectl scale deployments -n $n --replicas=1 --all } -function KubeDown($name) +function KDown($name) { $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String | %{$_.split(" ")[0]} $n = $m.Substring(2) @@ -73,7 +72,7 @@ function KubeDown($name) kubectl scale deployments -n $n --replicas=0 --all } -function KubeCon($con) +function KCon($con) { $o = "sdpaks-$con-k8s" kubectl config use-context $o @@ -85,7 +84,7 @@ function KubeCon($con) } } -function KubeNs($name) +function KNs($name) { # always returns true.. nneed workaround kubectl config set-context --current --namespace=$name @@ -97,4 +96,9 @@ function KubeNs($name) Write-Host $con -ForegroundColor Green -NoNewline Write-Host " cluster" -ForegroundColor Yellow } +} + +function FSync() +{ + fluxctl.exe sync --k8s-fwd-ns flux } \ No newline at end of file From 1bd1cc79676706e34fa9e07bddbb74bc638d1eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Thu, 16 Jan 2020 07:51:53 +0100 Subject: [PATCH 020/102] need f8 key --- startup/keybinds.ahk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup/keybinds.ahk b/startup/keybinds.ahk index 4d12f1d..d53ae41 100644 --- a/startup/keybinds.ahk +++ b/startup/keybinds.ahk @@ -99,7 +99,7 @@ F7::Run "%userprofile%\AppData\Local\slack\slack.exe" return ; Launch Outlook -F8:: +F2:: Run "%programfiles%\Microsoft Office\root\Office16\OUTLOOK.EXE" return From 5feca0320bc47387b732402f5eba7fd7d11c4b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Thu, 16 Jan 2020 07:54:15 +0100 Subject: [PATCH 021/102] other paths --- startup/keybinds.ahk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/startup/keybinds.ahk b/startup/keybinds.ahk index d53ae41..c8a049c 100644 --- a/startup/keybinds.ahk +++ b/startup/keybinds.ahk @@ -88,25 +88,25 @@ else ; Open vscode F3:: { - p = %userprofile%\AppData\Local\Programs\Microsoft VS Code\Code.exe + p = %programfiles%\Microsoft VS Code\Code.exe a = C:\Appl\repos Run, %comspec% /K ""%p%" -n %a%",, max return } return ; Launch Slack -F7::Run "%userprofile%\AppData\Local\slack\slack.exe" +F7::Run "%programfiles%\slack\slack.exe" return ; Launch Outlook F2:: -Run "%programfiles%\Microsoft Office\root\Office16\OUTLOOK.EXE" +Run "%programfiles(x86)%\Microsoft Office\root\Office16\OUTLOOK.EXE" return ; Structured logging in vscode F4:: { - p = %userprofile%\AppData\Local\Programs\Microsoft VS Code\Code.exe + p = %programfiles%\Microsoft VS Code\Code.exe a = C:\Appl\notes b = C:\Appl\notes\%A_DD%-%A_MM%-%A_YYYY%.md Run, %comspec% /K ""%p%" -n %a%" " %b%", max From e6ae0010e93f4cadfeecbd23a3c0b67bfcd6f6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Thu, 16 Jan 2020 13:57:13 +0100 Subject: [PATCH 022/102] add terminal settings --- startup/keybinds.ahk | 6 +- startup/settings.json | 178 +++++++++++++++++++++++++++++ startup/terminal_wallpaper_022.jpg | Bin 0 -> 12507 bytes 3 files changed, 181 insertions(+), 3 deletions(-) create mode 100644 startup/settings.json create mode 100644 startup/terminal_wallpaper_022.jpg diff --git a/startup/keybinds.ahk b/startup/keybinds.ahk index c8a049c..7b1d669 100644 --- a/startup/keybinds.ahk +++ b/startup/keybinds.ahk @@ -99,9 +99,9 @@ F7::Run "%programfiles%\slack\slack.exe" return ; Launch Outlook -F2:: -Run "%programfiles(x86)%\Microsoft Office\root\Office16\OUTLOOK.EXE" -return +;;F2:: +;Run "%programfiles(x86)%\Microsoft Office\root\Office16\OUTLOOK.EXE" +;return ; Structured logging in vscode F4:: diff --git a/startup/settings.json b/startup/settings.json new file mode 100644 index 0000000..514e83e --- /dev/null +++ b/startup/settings.json @@ -0,0 +1,178 @@ +// eq - C:\Users\auls\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json + + +// To view the default settings, hold "alt" while clicking on the "Settings" button. +// For documentation on these settings, see: https://aka.ms/terminal-documentation + +{ + "$schema": "https://aka.ms/terminal-profiles-schema", + + "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "initialCols": 158, + "initialRows": 38, + "windowRestoreMode": "lastPositionAndSize", + "initialPosition": "-3845, 0", + + + + "profiles": [ + { + // Make changes here to the powershell.exe profile + "acrylicOpacity": 0.5, + "background": "#012456", + "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\terminal_wallpaper_022.jpg", + "backgroundImageOpacity": 1, + "backgroundImageStechMode": "uniformToFill", + "colorScheme": "Campbell", + "cursorHeight": 25, + "fontFace": "Fira Code", + "fontSize": 16, + "icon": "ms-appdata:///roaming/pwsh-32.png", + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "name": "PowerShell", + "commandline": "powershell.exe", + "padding": "10, 10, 0, 10", + "hidden": false, + "startingDirectory": "%USERPROFILE%/Documents/sdp" + }, + { + "guid": "{6f9994f0-4403-5e85-9cce-98e5da3839bb}", + "hidden": false, + "name": "Bash", + "source": "Windows.Terminal.Wsl", + "padding": "10, 10, 0, 10", + "startingDirectory": "C:/Appl/repos", + "backgroundImageStechMode": "uniformToFill", + "colorScheme": "Campbell", + "cursorHeight": 25, + "fontFace": "Fira Code", + "fontSize": 16 + }, + { + "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", + "hidden": false, + "name": "Azure Cloud Shell", + "source": "Windows.Terminal.Azure" + } + ], + + // Add custom color schemes to this array + "schemes": [], + + // Add any keybinding overrides to this array. + // To unbind a default keybinding, set the command to "unbound" + "keybindings": [ + + { + "command": "splitHorizontal", + "keys": [ "ctrl+shift+up" ] + }, + { + "command": "splitVertical", + "keys": [ "ctrl+shift+right" ] + }, + { + "command": "newTab", + "keys": [ + "ctrl+t" + ] + }, + { + "command": "newTabProfile0", + "keys": [ + "ctrl+shift+1" + ] + }, + { + "command": "newTabProfile1", + "keys": [ + "ctrl+shift+2" + ] + }, + { + "command": "prevTab", + "keys": [ + "ctrl+tab" + ] + }, + { + "command": "openSettings", + "keys": [ + "ctrl+," + ] + }, + { + "command": "scrollUp", + "keys": [ + "shift+up" + ] + }, + { + "command": "scrollUpPage", + "keys": [ + "pgup" + ] + }, + { + "command": "switchToTab0", + "keys": [ + "ctrl+1" + ] + }, + { + "command": "switchToTab1", + "keys": [ + "ctrl+2" + ] + }, + { + "command": "switchToTab2", + "keys": [ + "ctrl+3" + ] + }, + { + "command": "switchToTab3", + "keys": [ + "ctrl+4" + ] + }, + { + "command": "moveFocusUp", + "keys": [ "ctrl+alt+up" ] + }, + { + "command": "moveFocusDown", + "keys": [ "ctrl+alt+down" ] + }, + { + "command": "moveFocusLeft", + "keys": [ "ctrl+alt+left" ] + }, + { + "command": "moveFocusRight", + "keys": [ "ctrl+alt+right" ] + }, + { + "command": "resizePaneUp", + "keys": [ "shift+alt+up" ] + }, + { + "command": "resizePaneDown", + "keys": [ "shift+alt+down" ] + }, + { + "command": "resizePaneLeft", + "keys": [ "shift+alt+left" ] + }, + { + "command": "resizePaneRight", + "keys": [ "shift+alt+right" ] + }, + { + "command": "closePane", + "keys": [ "ctrl+w" ] + } + ] + } + \ No newline at end of file diff --git a/startup/terminal_wallpaper_022.jpg b/startup/terminal_wallpaper_022.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b98b31ff1e2bf41899bf26c9eb81eea6df606c65 GIT binary patch literal 12507 zcmb8Vd0bN4-!BfRXeuTqrkI7=fTHC@DoubwhUN^)w$v~cp|WG@Nwb_Ml#ZEJmKNfK z4CVluoze!ivXg=enWwVJC#Rlc9_yAT>+a6?`Q6v+cmKO<%U+AM_u8)gUZ2nVGc10L z|9Ay4rcw7%Ay60u0tF8U*t0Gm=Fs7d!Lg|XjEj@Arz>V7b`oR%}2@vgn?}0!V zU=4xjltCc6V6E-s;_7q``kyuwrUfZ4__s|0uiX;-fA=^$ISHWudD@R3;FbRrAF%p4 zn}2KY4V(y0c!JY*40v{NBH-O1q!6!t`@kE#f+?iXfM5b9{;(tGcx*f-)p@HE2Agss z;aEIoA8jv&7D(BPN!{*Z=YaVo<|fpuUm)NxOEH0#=&;oI;^{$gOjtHo7;vhp1V9;c5ZcbbAhhX z(=+~0!Tc=5|JU;44g{$OBWeB6g4#e}NT?PP`lAn$0D=Ce{0EJH!GLLL>*)U5`+qur zHb7vF!CnXq2Gjak|6DH!6bUo2KBTqAIVhX-%Q>6cHst^HI0ys@HL-^Mn1C2+fn$+c zNXQ<@Hz+CxW~5(!KgTd!V+V<=vJGD6U1xpYLy^NETx~gDaxl2zm)UsTNLh;hTjk2J z7eF=bN!njJs_EIA=|K- zs+f7Vykhb3c4qL;&J}J`)AiY^8heDYv~;82!Zh0k zP*b<|hKawCGdQ<*zE~X<5TKqp9ZN{NY4lsv)0xu={#T=}tCm-Gg}m7lCTt4W_$q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o z3$39cXrsnpdf#Vaepb0}V zlq{%n9E@fOGI-asr@LHoxyd1HrcefEQ^|~#iIH2+!&^5lner|_9FXOsBU6A>8n=K=M$A`quvRxbo0PBLQ<;6~RKapj(Hjvf94cEH@3J7Wl=t&Kq4dJuxc6KXR2QLh&@W zpctT6>Zms&#H>Q;*HN_NFQitHZd9q*_}9+zuc!toXy=tj;vbIr%)IuTRh}(5u*5m1 zb~dZET)d>Nw>_iNRs(>$KKI7L$75*qY%cyNm{6an;NDxfXN?91RWa!Y207GEo-e}5 z1jo|o@V#ILa}XF4Q5E1G5QWJNr20seM{D%LQ-}&LPBt4CD9xq2w1x!s^EQ@k+_O>t z#R3`Xl{?5M_sKX2@*jk3G7?P=d1WD(fHsFsRm#ylWF-QD-k!^l#rtPZC~CkRQ$@|e zY%pK)EH&u1-+f^X@TAWB*rL@X^)vWCTwn^9l*{PgsEE@dz+my>R3PDZF#pr?n5nKs ztEHSupQj%)&G>o@J{ox&Jyhl6C7}qF;Lk(amHb9L8`KbjJdX?J3yE~WMoe~qJ#LTgTRqR+oWZl#8XvO^J50h9|2s_o{iat2 z%37JNiFP?uAADXpG3Vd&&(_a_N3Ji++Gy{L@%>x|E5nr8l-ZX9ZyUllkM> F{{}$fB|88B literal 0 HcmV?d00001 From 4b57391fd91236c96cfe236d4f7d629d71a7b53e Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Thu, 16 Jan 2020 18:09:53 +0100 Subject: [PATCH 023/102] move trash --- CONTRIBUTING.md | 0 remote-install.ps1 | 9 ----- remote-install.sh | 82 ---------------------------------------------- trash | 49 --------------------------- 4 files changed, 140 deletions(-) delete mode 100644 CONTRIBUTING.md delete mode 100644 remote-install.ps1 delete mode 100644 remote-install.sh delete mode 100644 trash diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index e69de29..0000000 diff --git a/remote-install.ps1 b/remote-install.ps1 deleted file mode 100644 index aa0958b..0000000 --- a/remote-install.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -# Set execution policy to remote signed -Set-ExecutionPolicy RemoteSigned - -#TODO: Folder Control (Redirect For a Temp & Check if folder exist) -#TODO: Welcome Message -#TODO: Manage PowerShell install files dynamic - -RefreshEnv -& .\main.ps1 diff --git a/remote-install.sh b/remote-install.sh deleted file mode 100644 index 2f51705..0000000 --- a/remote-install.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -{ - - : ' - printf "\n [ START ] Version Management Control\n" - starttime=$(date +%s) - trap '' 2 - if ! git clone https://github.com/molovo/lumberjack; then - echo "Download failed downloading molovo/lumberjack! Exiting." - kill $$ - fi - if [ -d /usr/local/bin/lj ]; then - filesha1=find "${PWD}"/lumberjack/lj -type f -print0 | xargs -0 sha1sum | sort | sha1sum - filesha2=find /usr/local/bin/lj -type f -print0 | xargs -0 sha1sum | sort | sha1sum - if [ "$filesha1" != "$filesha2" ]; then - sudo rm -f -R /usr/local/bin/lj - sudo mv lumberjack/lj /usr/local/bin - fi - else - sudo mv lumberjack/lj /usr/local/bin - fi - if ! git clone https://github.com/MatheusRV/dotfiles; then - echo "Download failed downloading matheusrv/dotfiles! Exiting." - kill $$ - fi - filesha1=find "${PWD}"/dotfiles -type f -print0 | xargs -0 sha1sum | awk '{print $1}' | sha1sum - exit 1 - filesha2=find "${PREVIOUS_PWD}" -type f -print0 | xargs -0 sha1sum | sort | sha1sum - if [ "$filesha1" != "$filesha2" ]; then - if [ -d "${PREVIOUS_PWD}"/programs ]; then - filesha1=find "${PWD}"/dotfiles/programs -type f -print0 | xargs -0 sha1sum | sort | sha1sum - filesha2=find "${PREVIOUS_PWD}"/programs -type f -print0 | xargs -0 sha1sum | sort | sha1sum - if [ "$filesha1" != "$filesha2" ]; then - sudo rm -f -R "${PREVIOUS_PWD}"/programs - sudo mv "${PWD}"/dotfiles/programs "${PREVIOUS_PWD}"/programs - fi - else - sudo mv "${PWD}"/dotfiles/programs "${PREVIOUS_PWD}"/programs - fi - if [ -f "${PREVIOUS_PWD}"/main.sh ]; then - filesha1=sha1sum "${PWD}"/dotfiles/main.sh - filesha2=sha1sum "${PREVIOUS_PWD}"/main.sh - if [ "$filesha1" != "$filesha2" ]; then - sudo rm -f -R "${PREVIOUS_PWD}"/programs - sudo mv "${PWD}"/dotfiles/programs "${PREVIOUS_PWD}"/programs - fi - else - sudo mv "${PWD}"/dotfiles/main.sh "${PREVIOUS_PWD}" - fi - fi - if [ -f "${PREVIOUS_PWD}"/bootstrap/version.json ]; then - filesha1=sha1sum "${PWD}"/bootstrap/version.json - filesha2=sha1sum "${PREVIOUS_PWD}"/bootstrap/version.json - if [ "$filesha1" != "$filesha2" ]; then - sudo rm -f "${PREVIOUS_PWD}"/bootstrap/version.json - chmod +x "${PWD}"/bootstrap/version.json - sudo mv "${PWD}"/bootstrap/version.json "${PREVIOUS_PWD}"/bootstrap - fi - else - chmod +x "${PREVIOUS_PWD}"/bootstrap/version.json - sudo mv "${PWD}"/bootstrap/version.json "${PREVIOUS_PWD}"/bootstrap - fi - if [ -f /usr/local/bin/chkinstall ]; then - filesha1=sha1sum "${PREVIOUS_PWD}"/programs/tools-and-services/chkinstall.sh - filesha2=sha1sum /usr/local/bin/chkinstall - if [ "$filesha1" != "$filesha2" ]; then - sudo rm -f /usr/local/bin/chkinstall - chmod +x "${PREVIOUS_PWD}"/programs/tools-and-services/chkinstall.sh - sudo cp "${PREVIOUS_PWD}"/programs/tools-and-services/chkinstall.sh /usr/local/bin/chkinstall - fi - else - chmod +x "${PREVIOUS_PWD}"/programs/tools-and-services/chkinstall.sh - sudo cp "${PREVIOUS_PWD}"/programs/tools-and-services/chkinstall.sh /usr/local/bin/chkinstall - fi - - lj --file "${PREVIOUS_PWD}"/dotfiles.log --level debug - trap 2 - endtime=$(date +%s) - printf " [ DONE ] Version Control ... %s seconds\n" "$((endtime - starttime))" - ' - "${PREVIOUS_PWD}"/main.sh "${PREVIOUS_PWD}" -} diff --git a/trash b/trash deleted file mode 100644 index f74ba8a..0000000 --- a/trash +++ /dev/null @@ -1,49 +0,0 @@ -printf "\n php Version: (Type 72 for php7.2, type 7.1 for php7.1 or 56 for php5.6 or 'n' to escape): " -read -r phpv -if [ -z "${phpv}" ]; then - phpv=72 - printf "php7.2" -elif [ "${phpv}" == 7.1 ] || [ "${phpv}" == 71 ]; then - phpv=71 - printf "php7.1" -elif [ "${phpv}" == 5.6 ] || [ "${phpv}" == 56 ]; then - phpv=56 - printf "php7.1" -else - phpv=false -fi -if [ ! "${phpv}" == false ]; then - printf "\n Install Laravel (Y/n): " - read -r laravel - if [ -z "${laravel}" ] || [ "${laravel}" == Y ] || [ "${laravel}" == y ]; then - laravel=true - else - laravel=false - fi - printf "\n Install php Composer (Y/n): " - read -r phpcomposer - if [ -z "${phpcomposer}" ] || [ "${phpcomposer}" == Y ] || [ "${phpcomposer}" == y ]; then - phpcomposer=true - else - phpcomposer=false - fi -else - laravel=false - phpcomposer=false -fi - -trap '' 2 # Signal 2 is Control-C, now disabled. - command - command - command - trap 2 # Reenables Control-C - -git clone https://github.com/molovo/lumberjack - lumberjack/lj /usr/local/bin - -lj --file /usr/local/var/log/myawesomescript.log --level critical -emergency, alert, critical, error, warning, notice, info or debug -lj critical ‘Something went wrong’ -lj 'This is a notice' - -command && command-to-execute-on-success || command-to-execute-on-failure From 23e13960bcddb28b26e67003a009ac3e80593045 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Thu, 16 Jan 2020 18:32:47 +0100 Subject: [PATCH 024/102] cleanup --- startup/boot.cmd | 11 +++++++++++ startup/keybinds.ahk | 7 +++++++ startup/{settings.json => profiles.json} | 2 +- startup/start.ps1 | 10 ++++++++-- 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 startup/boot.cmd rename startup/{settings.json => profiles.json} (97%) diff --git a/startup/boot.cmd b/startup/boot.cmd new file mode 100644 index 0000000..75cd25b --- /dev/null +++ b/startup/boot.cmd @@ -0,0 +1,11 @@ +cd C:\appl\repos\dotfiles +git pull + +copy ".\startup\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y +copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y +.\startup\keybinds.ahk + +PowerShell -Command "Set-ExecutionPolicy RemoteSigned" +PowerShell -Command "& {c:\appl\repos\dotfiles\startup\profile.ps1}" + +exit \ No newline at end of file diff --git a/startup/keybinds.ahk b/startup/keybinds.ahk index 7b1d669..e62c856 100644 --- a/startup/keybinds.ahk +++ b/startup/keybinds.ahk @@ -111,4 +111,11 @@ F4:: b = C:\Appl\notes\%A_DD%-%A_MM%-%A_YYYY%.md Run, %comspec% /K ""%p%" -n %a%" " %b%", max return +} + +; Mouse click with useless key (right ctrl) +RCtrl:: +{ + Click + Return } \ No newline at end of file diff --git a/startup/settings.json b/startup/profiles.json similarity index 97% rename from startup/settings.json rename to startup/profiles.json index 514e83e..c97c814 100644 --- a/startup/settings.json +++ b/startup/profiles.json @@ -1,4 +1,4 @@ -// eq - C:\Users\auls\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json +// eq - %LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json // To view the default settings, hold "alt" while clicking on the "Settings" button. diff --git a/startup/start.ps1 b/startup/start.ps1 index a86dfff..47fa638 100644 --- a/startup/start.ps1 +++ b/startup/start.ps1 @@ -10,14 +10,20 @@ $urls = @( ) -Start-Process "firefox.exe" $urls +Test-Path "C:\Program Files\Mozilla Firefox" +if($?) +{ + Start-Process "firefox.exe" $urls +} +else { + Start-Process "chrome.exe" $urls +} # Bypass UAC admin prompts for the scripts duration Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 0 # Open Termnials + vscode Start-Process "wsl" -Verb RunAs -Start-Process "powershell" -Verb RunAs Start-Process "code" -Verb RunAs Start-Process shell:appsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App -Verb RunAs # Windows Terminal From 9d43ca3b6a47e645877e0f7ad2b121a842518c46 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Thu, 16 Jan 2020 18:35:07 +0100 Subject: [PATCH 025/102] fix startup file --- startup/boot.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup/boot.cmd b/startup/boot.cmd index 75cd25b..21c4dbe 100644 --- a/startup/boot.cmd +++ b/startup/boot.cmd @@ -6,6 +6,6 @@ copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTermina .\startup\keybinds.ahk PowerShell -Command "Set-ExecutionPolicy RemoteSigned" -PowerShell -Command "& {c:\appl\repos\dotfiles\startup\profile.ps1}" +PowerShell -Command "& {c:\appl\repos\dotfiles\startup\start.ps1}" exit \ No newline at end of file From a822e35f23faa43dfae68fcf6d90e74594871e72 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Thu, 16 Jan 2020 18:42:53 +0100 Subject: [PATCH 026/102] update readme --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 053cbcb..f1aa9f9 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,14 @@ # Changes in this fork +Most changes in the folder ./startup. +If you want to use the startup settings I suggest you fork this repo, make your changes, then run this command: +`cp ./startup/boot.cmd shell:startup` + ## Todo -- global powershell profile for productivity -- windows terminal settings sync - Zsh + autosuggestions in wsl - some kind of sync/deployment of files in this repo to my hosts? +- personal aliases for WSL Done: @@ -13,4 +16,8 @@ Done: Startup files (move to %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup): - start.ps1 - Startup at work -- WIP: keybinds.ahk - Global keybinds to stop bad habits, increase productivity \ No newline at end of file +- WIP: keybinds.ahk - Global keybinds to stop bad habits, increase productivity +- global powershell profile for productivity +- windows terminal settings sync +- ahk keybinds +- "autoupdates" via startup script \ No newline at end of file From c1a83e34d78fb91c96fcf04d4b612060c636512a Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Thu, 16 Jan 2020 19:46:21 +0100 Subject: [PATCH 027/102] bash-like aliases in powershell --- README.md | 8 ++--- configurations/alias.sh | 14 +-------- configurations/git/alias-git.sh | 12 +++----- startup/profile.ps1 | 52 +++++++++++++++++++++++++++++++-- startup/test.ps1 | 9 ++++++ 5 files changed, 67 insertions(+), 28 deletions(-) create mode 100644 startup/test.ps1 diff --git a/README.md b/README.md index f1aa9f9..1a4d194 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Most changes in the folder ./startup. If you want to use the startup settings I suggest you fork this repo, make your changes, then run this command: `cp ./startup/boot.cmd shell:startup` +This will make everything in the startup folder be used at startup. + ## Todo - Zsh + autosuggestions in wsl @@ -14,10 +16,8 @@ Done: - Personal settings and preferences -Startup files (move to %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup): -- start.ps1 - Startup at work - WIP: keybinds.ahk - Global keybinds to stop bad habits, increase productivity - global powershell profile for productivity - windows terminal settings sync -- ahk keybinds -- "autoupdates" via startup script \ No newline at end of file +- "autoupdates" via startup script +- bash-like aliases in powershell \ No newline at end of file diff --git a/configurations/alias.sh b/configurations/alias.sh index e125770..9b16a1d 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -14,12 +14,6 @@ alias l=\"ls -h --color --group-directories-first\" # same as above alias ll=\"ls -lv --group-directories-first\" # non-flat view alias lm=\"ll | more\" -# Folder alias -alias hdir=\"cd ${HOME}\" -alias homedir=\"cd ${HOME}\" -# shellcheck disable=SC2139 -alias wdir=\"cd ${defaultfolder}\" - # Quick parent-directory aliases alias ..=\"cd ..\" alias ...=\"cd ../..\" @@ -30,15 +24,9 @@ alias .7=\"cd ../../../../../..\" alias .8=\"cd ../../../../../../..\" alias .9=\"cd ../../../../../../../..\" -# File and Folder Permission -alias mx=\"chmod a+x\" -alias 000=\"chmod 000\" -alias 644=\"chmod 644\" -alias 755=\"chmod 755\" -alias 777=\"chmod 777\" - # Others alias editbash=\"nano ${HOME}/.bashrc\" +alias editzsh=\"nano ${HOME}/.zshrc\" alias editba=\"nano ${HOME}/.bash_aliases\" alias resource=\"source ${HOME}/.bashrc\" alias hosts=\"nano /mnt/c/Windows/System32/drivers/etc/hosts\" diff --git a/configurations/git/alias-git.sh b/configurations/git/alias-git.sh index 8001318..f04dd45 100644 --- a/configurations/git/alias-git.sh +++ b/configurations/git/alias-git.sh @@ -20,24 +20,20 @@ fi alias diff="git diff" alias branch="git branch" alias status="git status" - alias st="git status" alias fetch="git fetch" alias push="git push origin head" alias pull="git pull" - alias fp="fetch && pull" - alias gmm="git merge master" alias recent="git for-each-ref --sort=-committerdate refs/heads/" alias branch_new="git for-each-ref --sort=-committerdate refs/heads/ --format=%(refname:short)" - alias add="git add -A" - alias gac="git add -A && git commit" - alias gsur="git submodule update --remote" - alias glf="git ls-files" + alias gadd="git add -A" alias gl="git log --graph --pretty=oneline --abbrev-commit --decorate" ## Git branch switching alias master="git co master" + alias prod="git co prod" + alias dev="git co dev" alias ghp="git co gh-pages" # Others - alias editgit="nano ~/.gitconfig" + alias editgit="code ~/.gitconfig" } >>"${HOME}"/./bashrc diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 1a9b746..39a87bd 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -9,7 +9,7 @@ Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git.psd1' # Alias -set-alias grep select-string +Set-Alias grep select-string #Set-Alias doc docker.exe #Set-Alias dock docker-compose.exe Set-Alias k kubectl.exe @@ -22,7 +22,7 @@ function TouchFile ($name) New-Item -Path . -Name $name } -Set-alias -name touch -Value TouchFile +Set-Alias -name touch -Value TouchFile # Azure handy @@ -101,4 +101,50 @@ function KNs($name) function FSync() { fluxctl.exe sync --k8s-fwd-ns flux -} \ No newline at end of file +} + +# General bash-style aliases + +function New-BashStyleAlias([string]$name, [string]$command) +{ + $sb = [scriptblock]::Create($command) + New-Item "Function:\global:$name" -Value $sb | Out-Null +} + +# Quick Folder movement +New-BashStyleAlias .. 'cd ..' +New-BashStyleAlias ... "cd ../../" +New-BashStyleAlias .... "cd ../../../" +New-BashStyleAlias ..... "cd ../../../../" + +# CD to Specific folders +New-BashStyleAlias home 'cd ~' +New-BashStyleAlias appl 'cd c:/appl' +New-BashStyleAlias repos 'cd c:/appl/repos' +New-BashStyleAlias dotfiles 'cd c:/appl/dotfiles' +New-BashStyleAlias sdp-flux 'cd c:/appl/sdp-flux' +New-BashStyleAlias sdp-aks 'cd c:/appl/sdp-aks' + +# Git commands +New-BashStyleAlias log "git log --oneline" +New-BashStyleAlias gdiff "git diff" +New-BashStyleAlias branch "git branch" +New-BashStyleAlias status "git status" +New-BashStyleAlias fetch "git fetch" +New-BashStyleAlias push "git push origin head" +New-BashStyleAlias pull "git pull" +New-BashStyleAlias recent "git for-each-ref --sort -committerdate refs/heads/" +New-BashStyleAlias gadd "git add -A" +New-BashStyleAlias glog "git log --graph --pretty oneline --abbrev-commit --decorate" + +## Git branch switching +New-BashStyleAlias master "git checkout master" +New-BashStyleAlias prod "git checkout prod" +New-BashStyleAlias dev "git checkout dev" + +# Others +New-BashStyleAlias editgit "code %homepath%/.gitconfig" # ~ not working +New-BashStyleAlias editbash "code %homepath%/.bashrc" +New-BashStyleAlias editzsh "code %homepath%/.zshrc" +New-BashStyleAlias editba "code %homepath%/.bash_aliases" +New-BashStyleAlias np "cmd.exe /c notepad" \ No newline at end of file diff --git a/startup/test.ps1 b/startup/test.ps1 new file mode 100644 index 0000000..02b0793 --- /dev/null +++ b/startup/test.ps1 @@ -0,0 +1,9 @@ +$urls = @( + "https://youtube.com" + "https://portal.azure.com" + "https://google.com" + "https://github.com/equinor/sdp-aks" + "https://github.com/equinor/sdp-flux" + "https://git.equinor.com" + +) \ No newline at end of file From 35eca859ce2b8b362158e9a4473daf8f5605c30a Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Thu, 16 Jan 2020 20:02:00 +0100 Subject: [PATCH 028/102] add git commit function --- startup/boot.cmd | 5 +++-- startup/profile.ps1 | 12 +++++++++++- startup/test.ps1 | 9 --------- 3 files changed, 14 insertions(+), 12 deletions(-) delete mode 100644 startup/test.ps1 diff --git a/startup/boot.cmd b/startup/boot.cmd index 21c4dbe..ddb3efe 100644 --- a/startup/boot.cmd +++ b/startup/boot.cmd @@ -3,9 +3,10 @@ git pull copy ".\startup\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y -.\startup\keybinds.ahk -PowerShell -Command "Set-ExecutionPolicy RemoteSigned" +#PowerShell -Command "Set-ExecutionPolicy RemoteSigned" PowerShell -Command "& {c:\appl\repos\dotfiles\startup\start.ps1}" +.\startup\keybinds.ahk + exit \ No newline at end of file diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 39a87bd..40ca027 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -137,6 +137,14 @@ New-BashStyleAlias recent "git for-each-ref --sort -committerdate refs/heads/" New-BashStyleAlias gadd "git add -A" New-BashStyleAlias glog "git log --graph --pretty oneline --abbrev-commit --decorate" +function gcom(){ + [CmdletBinding()] + param ( + [string] $message + ) + git commit -m $message +} + ## Git branch switching New-BashStyleAlias master "git checkout master" New-BashStyleAlias prod "git checkout prod" @@ -147,4 +155,6 @@ New-BashStyleAlias editgit "code %homepath%/.gitconfig" # ~ not working New-BashStyleAlias editbash "code %homepath%/.bashrc" New-BashStyleAlias editzsh "code %homepath%/.zshrc" New-BashStyleAlias editba "code %homepath%/.bash_aliases" -New-BashStyleAlias np "cmd.exe /c notepad" \ No newline at end of file +New-BashStyleAlias np "cmd.exe /c notepad" + +#Testing \ No newline at end of file diff --git a/startup/test.ps1 b/startup/test.ps1 deleted file mode 100644 index 02b0793..0000000 --- a/startup/test.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -$urls = @( - "https://youtube.com" - "https://portal.azure.com" - "https://google.com" - "https://github.com/equinor/sdp-aks" - "https://github.com/equinor/sdp-flux" - "https://git.equinor.com" - -) \ No newline at end of file From 572d53bc94cea48310100a8322efdb56b6db8428 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Thu, 16 Jan 2020 20:13:57 +0100 Subject: [PATCH 029/102] separate startup script for home pc --- startup/homeboot.cmd | 9 +++++++++ startup/profile.ps1 | 8 +++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 startup/homeboot.cmd diff --git a/startup/homeboot.cmd b/startup/homeboot.cmd new file mode 100644 index 0000000..0122e13 --- /dev/null +++ b/startup/homeboot.cmd @@ -0,0 +1,9 @@ +cd C:\appl\repos\dotfiles +git pull + +copy ".\startup\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y +copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y + +.\startup\keybinds.ahk + +exit \ No newline at end of file diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 40ca027..31ba77f 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -121,9 +121,9 @@ New-BashStyleAlias ..... "cd ../../../../" New-BashStyleAlias home 'cd ~' New-BashStyleAlias appl 'cd c:/appl' New-BashStyleAlias repos 'cd c:/appl/repos' -New-BashStyleAlias dotfiles 'cd c:/appl/dotfiles' -New-BashStyleAlias sdp-flux 'cd c:/appl/sdp-flux' -New-BashStyleAlias sdp-aks 'cd c:/appl/sdp-aks' +New-BashStyleAlias dotfiles 'cd c:/appl/repos/dotfiles' +New-BashStyleAlias sdp-flux 'cd c:/appl/repos/sdp-flux' +New-BashStyleAlias sdp-aks 'cd c:/appl/repos/sdp-aks' # Git commands New-BashStyleAlias log "git log --oneline" @@ -145,6 +145,8 @@ function gcom(){ git commit -m $message } +set-alias gcmon gcom + ## Git branch switching New-BashStyleAlias master "git checkout master" New-BashStyleAlias prod "git checkout prod" From 3ab1335ff1cdc9169828e0db4e05542183ce7609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Fri, 17 Jan 2020 08:57:50 +0100 Subject: [PATCH 030/102] update readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1a4d194..4852069 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ This will make everything in the startup folder be used at startup. - Zsh + autosuggestions in wsl - some kind of sync/deployment of files in this repo to my hosts? - personal aliases for WSL +- Window/tile manager +- better sync, YADM? +- sync settings to remote servers Done: From 96c3df7d3ee086844c972f8afc348a2214a4fd9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Fri, 17 Jan 2020 11:20:55 +0100 Subject: [PATCH 031/102] sudo --- startup/keybinds.ahk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/startup/keybinds.ahk b/startup/keybinds.ahk index e62c856..e193d11 100644 --- a/startup/keybinds.ahk +++ b/startup/keybinds.ahk @@ -54,6 +54,13 @@ IfWinActive, Adminstrator: Windows Powershell return } +; Save time on ssh commands +IfWinActive, Adminstrator: Windows Powershell +{ + ::sudo::sudo su - + return +} + ; Cleanup for calculators #c:: if WinExist("Kalkulator") || if WinExist("Calculator") From efbd3af9874a4ee55c5ce6c11fba00488a3a1c04 Mon Sep 17 00:00:00 2001 From: solomson Date: Sun, 19 Jan 2020 11:01:29 +0100 Subject: [PATCH 032/102] force new keybind script --- startup/keybinds.ahk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/startup/keybinds.ahk b/startup/keybinds.ahk index e193d11..3e7f784 100644 --- a/startup/keybinds.ahk +++ b/startup/keybinds.ahk @@ -1,3 +1,5 @@ +#SingleInstance force + ; Default state of lock keys SetNumlockState, AlwaysOn SetCapsLockState, AlwaysOff From fd0ee0314be82c2fa76cd891f40ddcb6de49a176 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 19 Jan 2020 13:38:46 +0100 Subject: [PATCH 033/102] improve profile --- startup/profile.ps1 | 126 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 122 insertions(+), 4 deletions(-) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 31ba77f..3321a59 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -10,8 +10,8 @@ Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git.psd1' # Alias Set-Alias grep select-string -#Set-Alias doc docker.exe -#Set-Alias dock docker-compose.exe +Set-Alias d docker +Set-Alias doc docker-compose Set-Alias k kubectl.exe Set-Alias he helm.exe @@ -98,6 +98,61 @@ function KNs($name) } } +function doexec(){ + [CmdletBinding()] + param ( + [string] $name + ) + try { + docker exec -it $name bash + } + catch { + docker exec -it $name sh + } +} + + +function docup(){ + [CmdletBinding()] + param ( + [string] $name + ) + docker-compose up $name -d +} + +Set-Alias doup docup + +function dops(){ + [CmdletBinding()] + param ( + [string] $name + ) + docker ps +} + +function docdown(){ + [CmdletBinding()] + param ( + [string] $name + ) + docker-compose down $name +} + +Set-Alias dodown docdown + +function kexec(){ + [CmdletBinding()] + param ( + [string] $name + ) + try { + kubectl exec -it $name bash + } + catch { + kubectl exec -it $name sh + } +} + function FSync() { fluxctl.exe sync --k8s-fwd-ns flux @@ -121,31 +176,94 @@ New-BashStyleAlias ..... "cd ../../../../" New-BashStyleAlias home 'cd ~' New-BashStyleAlias appl 'cd c:/appl' New-BashStyleAlias repos 'cd c:/appl/repos' +New-BashStyleAlias progs 'cd c:/appl/progs' +New-BashStyleAlias certs 'cd c:/appl/certs' New-BashStyleAlias dotfiles 'cd c:/appl/repos/dotfiles' New-BashStyleAlias sdp-flux 'cd c:/appl/repos/sdp-flux' New-BashStyleAlias sdp-aks 'cd c:/appl/repos/sdp-aks' +Set-Alias flux sdp-flux +Set-Alias aks sdp-aks + # Git commands New-BashStyleAlias log "git log --oneline" New-BashStyleAlias gdiff "git diff" -New-BashStyleAlias branch "git branch" +New-BashStyleAlias branch "git branch -a" New-BashStyleAlias status "git status" +New-BashStyleAlias reset "git reset --soft" New-BashStyleAlias fetch "git fetch" New-BashStyleAlias push "git push origin head" New-BashStyleAlias pull "git pull" New-BashStyleAlias recent "git for-each-ref --sort -committerdate refs/heads/" -New-BashStyleAlias gadd "git add -A" New-BashStyleAlias glog "git log --graph --pretty oneline --abbrev-commit --decorate" + +function reset(){ + [CmdletBinding()] + param ( + [Parameter(ParameterSetName="Default", Position=0)] + $Mode = "soft" + ) + $branch = (git rev-parse --abbrev-ref HEAD) + git reset --$Mode origin/$branch + git restore --staged . + status +} + function gcom(){ [CmdletBinding()] param ( + [Parameter(Mandatory=$true, ParameterSetName="Default", Position=0)] [string] $message ) git commit -m $message } set-alias gcmon gcom +set-alias com gcom + +function gadd(){ + [CmdletBinding()] + param ( + [Parameter(Mandatory=$true, ParameterSetName="Default", Position=0)] + [string] $name + ) + git add $name + git status +} + +set-alias add gadd + +function gaddcom(){ + [CmdletBinding()] + param ( + [Parameter(Mandatory=$true, ParameterSetName="Default", Position=0)] + [string] $Name, + [Parameter(Mandatory=$true, ParameterSetName="Default", Position=1)] + [string] $Message + ) + git add $Name + git commit -m $Message + git --no-pager log --pretty=oneline -n3 --oneline +} + +set-alias acom gaddcom + +function reset(){ + [CmdletBinding()] + param ( + [Parameter(ParameterSetName="Mode", Position=0)] + $Mode = "soft" + ) + $branch = (git rev-parse --abbrev-ref HEAD) + git reset --$Mode origin/$branch + git restore --staged . + " `r`n " + git --no-pager log --pretty=oneline -n3 --oneline + " `r`n " + status +} + ## Git branch switching New-BashStyleAlias master "git checkout master" From d8dbfd31d77ea452181b50e57ca70fc2c6871288 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 19 Jan 2020 15:59:00 +0100 Subject: [PATCH 034/102] remove f keybinds --- startup/keybinds.ahk | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/startup/keybinds.ahk b/startup/keybinds.ahk index 3e7f784..d62aafb 100644 --- a/startup/keybinds.ahk +++ b/startup/keybinds.ahk @@ -94,33 +94,6 @@ else ; Unused F keys -; Open vscode -F3:: -{ - p = %programfiles%\Microsoft VS Code\Code.exe - a = C:\Appl\repos - Run, %comspec% /K ""%p%" -n %a%",, max - return -} -return -; Launch Slack -F7::Run "%programfiles%\slack\slack.exe" -return - -; Launch Outlook -;;F2:: -;Run "%programfiles(x86)%\Microsoft Office\root\Office16\OUTLOOK.EXE" -;return - -; Structured logging in vscode -F4:: -{ - p = %programfiles%\Microsoft VS Code\Code.exe - a = C:\Appl\notes - b = C:\Appl\notes\%A_DD%-%A_MM%-%A_YYYY%.md - Run, %comspec% /K ""%p%" -n %a%" " %b%", max - return -} ; Mouse click with useless key (right ctrl) RCtrl:: From 3fd70ca452e21b730c997e9818f081ecafac36a0 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 19 Jan 2020 18:14:05 +0100 Subject: [PATCH 035/102] allow numlock off --- startup/keybinds.ahk | 1 - 1 file changed, 1 deletion(-) diff --git a/startup/keybinds.ahk b/startup/keybinds.ahk index d62aafb..502276b 100644 --- a/startup/keybinds.ahk +++ b/startup/keybinds.ahk @@ -1,7 +1,6 @@ #SingleInstance force ; Default state of lock keys -SetNumlockState, AlwaysOn SetCapsLockState, AlwaysOff SetScrollLockState, AlwaysOff return From c86a2b273944bfc34847b509fc42d108fec3defa Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 19 Jan 2020 23:07:31 +0100 Subject: [PATCH 036/102] Check for annoying network drive --- startup/boot.cmd | 1 + startup/start.ps1 | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/startup/boot.cmd b/startup/boot.cmd index ddb3efe..e860c23 100644 --- a/startup/boot.cmd +++ b/startup/boot.cmd @@ -7,6 +7,7 @@ copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTermina #PowerShell -Command "Set-ExecutionPolicy RemoteSigned" PowerShell -Command "& {c:\appl\repos\dotfiles\startup\start.ps1}" + .\startup\keybinds.ahk exit \ No newline at end of file diff --git a/startup/start.ps1 b/startup/start.ps1 index 47fa638..9446604 100644 --- a/startup/start.ps1 +++ b/startup/start.ps1 @@ -27,5 +27,15 @@ Start-Process "wsl" -Verb RunAs Start-Process "code" -Verb RunAs Start-Process shell:appsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App -Verb RunAs # Windows Terminal +Test-path "f:\" +if($?) +{ + try { Remove-PSDrive -name "F" } + catch { + + } +} + + # Re-enable UAC prompts (use value "1" for max validation) Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 2 From 0c010db874bfe769319715859de66cc65bac42d3 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Sun, 19 Jan 2020 23:30:34 +0100 Subject: [PATCH 037/102] add global gitattributes file --- startup/.gitattributes | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 startup/.gitattributes diff --git a/startup/.gitattributes b/startup/.gitattributes new file mode 100644 index 0000000..383883b --- /dev/null +++ b/startup/.gitattributes @@ -0,0 +1,3 @@ +# Auto detect text files and perform LF normalization +*.sh text eol=lf +Dockerfile text eol=lf \ No newline at end of file From 4cb909b9fa401562a1bd6f6c4fd3d639c69a2098 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Tue, 21 Jan 2020 22:08:49 +0100 Subject: [PATCH 038/102] fix wsl aliases for .zshrc --- bootstrap/unix-settings.json | 6 +- configurations/alias.sh | 199 +++++++++++++++++++---------------- main.sh | 50 ++++++++- 3 files changed, 161 insertions(+), 94 deletions(-) diff --git a/bootstrap/unix-settings.json b/bootstrap/unix-settings.json index 9d603af..881f202 100644 --- a/bootstrap/unix-settings.json +++ b/bootstrap/unix-settings.json @@ -1,15 +1,15 @@ { "personal": { "name": "Audun L. Solemdal", - "email": "auls@equinor.com", + "email": "matheusrv@email.com", "githubuser": "solomson", - "defaultfolder": "/mnt/c/Users/audun.solemdal/Documents" + "defaultfolder": "/mnt/c/appl/Dev" }, "programs": [ { "program": "ssh", "name": "Secure Shell (SSH)", - "installation": "true", + "installation": "false", "default": false }, { diff --git a/configurations/alias.sh b/configurations/alias.sh index 9b16a1d..7c8e097 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -1,102 +1,123 @@ #!/bin/bash PREVIOUS_PWD="$1" -if [ "$(jq -r '.configurations.debug' "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" == true ]; then +if [ "$(jq -r ".configurations.debug" "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" == true ]; then set +e else set -e fi -defaultfolder="$(jq -r '.personal.defaultfolder' "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" +defaultfolder="$(jq -r ".personal.defaultfolder" "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" echo " -# ls aliases -alias la=\"ls -al\" -alias ls=\"ls -h --color --group-directories-first\" # flat view w/ directories first -alias l=\"ls -h --color --group-directories-first\" # same as above -alias ll=\"ls -lv --group-directories-first\" # non-flat view -alias lm=\"ll | more\" + # ls aliases + alias la="ls -al" + alias ls="ls -h --color --group-directories-first" # flat view w/ directories first + alias l="ls -h --color --group-directories-first" # same as above + alias ll="ls -lv --group-directories-first" # non-flat view + alias lm="ll | more" -# Quick parent-directory aliases -alias ..=\"cd ..\" -alias ...=\"cd ../..\" -alias .4=\"cd ../../..\" -alias .5=\"cd ../../../..\" -alias .6=\"cd ../../../../..\" -alias .7=\"cd ../../../../../..\" -alias .8=\"cd ../../../../../../..\" -alias .9=\"cd ../../../../../../../..\" + # Quick parent-directory aliases + alias ..="cd .." + alias ...="cd ../.." + alias ....="cd ../../.." + alias .....="cd ../../../.." -# Others -alias editbash=\"nano ${HOME}/.bashrc\" -alias editzsh=\"nano ${HOME}/.zshrc\" -alias editba=\"nano ${HOME}/.bash_aliases\" -alias resource=\"source ${HOME}/.bashrc\" -alias hosts=\"nano /mnt/c/Windows/System32/drivers/etc/hosts\" -alias code=\"code .\" -alias np=\"cmd.exe /c notepad\" + #CD to Specific folders -#NetWork -alias ip=\"curl ipinfo.io/ip\" -alias ips=\"ifconfig -a | perl -nle'/(\d+.\d+.\d+.\d+)/ && print \$1'\" -alias speedtest=\"wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test100.zip\" + alias home="cd ~" + alias appl="cd /mnt/c/appl" + alias repos="cd /mnt/c/appl/repos" + alias progs="cd /mnt/c/appl/progs" + alias certs="cd /mnt/c/appl/certs" + alias dotfiles="cd /mnt/c/appl/repos/dotfiles" + alias sdp-flux="cd /mnt/c/appl/repos/sdp-flux" + alias sdp-aks="cd /mnt/c/appl/repos/sdp-aks" + alias flux="cd /mnt/c/appl/repos/sdp-flux" + alias aks="cd /mnt/c/appl/repos/sdp-aks" -# Handy Extract Program -function extract() -{ - if [ -f \$1 ] ; then - case \$1 in - *.tar.bz2) tar xvjf \$1 ;; - *.tar.gz) tar xvzf \$1 ;; - *.bz2) bunzip2 \$1 ;; - *.rar) unrar x \$1 ;; - *.gz) gunzip \$1 ;; - *.tar) tar xvf \$1 ;; - *.tbz2) tar xvjf \$1 ;; - *.tgz) tar xvzf \$1 ;; - *.zip) unzip \$1 ;; - *.Z) uncompress \$1 ;; - *.7z) 7z x \$1 ;; - *) echo \"'\$1' cannot be extracted via >extract<\" ;; - esac - else - echo \"'\$1' is not a valid file!\" - fi -} - - -# Make Dir and CD to it -function mcd () -{ - mkdir -p \$1 - cd \$1 -} - -# Switch a File or Folder -function swap() -{ - if [ ! -z \"\$2\" ] && [ -e \"\$1\" ] && [ -e \"\$2\" ] && ! [ \"\$1\" -ef \"\$2\" ] && (([ -f \"\$1\" ] && [ -f \"\$2\" ]) || ([ -d \"\$1\" ] && [ -d \"\$2\" ])) ; then - tmp=$(mktemp -d $(dirname \"\$1\")/XXXXXX) - mv \"\$1\" \"\$tmp\" && mv \"\$2\" \"\$1\" && mv \"\$tmp\"/\"\$1\" \"\$2\" - rmdir \"\$tmp\" - else - echo \"Usage: swap file1 file2 or swap dir1 dir2\" - fi -} - -# Creates an archive (*.tar.gz) from given directory. -function maketar() { tar cvzf \"\${1%%/}.tar.gz\" \"\${1%%/}/\"; } - -# Create a ZIP archive of a file or folder. -function makezip() { zip -r \"\${1%%/}.zip\" \"\$1\" ; } - -# Make your directories and files access rights sane. -function sanitize() { chmod -R u=rwX,g=rX,o= \"\$@\" ;} + # Git commands + alias log="git log --oneline" + alias gdiff="git diff" + alias branch="git branch -a" + alias status="git status" + alias reset="git reset --soft" + alias fetch="git fetch" + alias push="git push origin head" + alias pull="git pull" + alias recent="git for-each-ref --sort -committerdate refs/heads/" + alias glog="git log --graph --pretty oneline --abbrev-commit --decorate" -cd ${defaultfolder} -" >>"${HOME}"/.bash_aliases + # Others + alias editbash="nano ${HOME}/.bashrc" + alias editzsh="nano ${HOME}/.zshrc" + alias editba="nano ${HOME}/.bash_aliases" + alias resource="source ${HOME}/.bashrc" + alias hosts="nano /mnt/c/Windows/System32/drivers/etc/hosts" + alias code="code ." + alias np="cmd.exe /c notepad" -if [[ ! "$(uname -r)" =~ "Microsoft$" ]]; then - { - # Alias to run Windows cmd.exe from WSL - alias cmd="/mnt/c/Windows/System32/cmd.exe" - alias cmdc="/mnt/c/Windows/System32/cmd.exe /c" - } >>"${HOME}"/.bash_aliases -fi + #NetWork + alias ip="curl ipinfo.io/ip" + alias ips="ifconfig -a | perl -nle'/(d+.d+.d+.d+)/ && print $1'" + alias speedtest="wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test100.zip" + + # Handy Extract Program + function extract() + { + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xvjf $1 ;; + *.tar.gz) tar xvzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xvf $1 ;; + *.tbz2) tar xvjf $1 ;; + *.tgz) tar xvzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via >extract<" ;; + esac + else + echo "'$1' is not a valid file!" + fi + } + + + # Make Dir and CD to it + function mcd () + { + mkdir -p $1 + cd $1 + } + + # Switch a File or Folder + function swap() + { + if [ ! -z "$2" ] && [ -e "$1" ] && [ -e "$2" ] && ! [ "$1" -ef "$2" ] && (([ -f "$1" ] && [ -f "$2" ]) || ([ -d "$1" ] && [ -d "$2" ])) ; then + tmp=$(mktemp -d $(dirname "$1")/XXXXXX) + mv "$1" "$tmp" && mv "$2" "$1" && mv "$tmp"/"$1" "$2" + rmdir "$tmp" + else + echo "Usage: swap file1 file2 or swap dir1 dir2" + fi + } + + # Creates an archive (*.tar.gz) from given directory. + function maketar() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; } + + # Create a ZIP archive of a file or folder. + function makezip() { zip -r "${1%%/}.zip" "$1" ; } + + # Make your directories and files access rights sane. + function sanitize() { chmod -R u=rwX,g=rX,o= "$@" ;} + + cd ${defaultfolder} + " >>"${HOME}"/.zshrc + + if [[ ! "$(uname -r)" =~ "Microsoft$" ]]; then + { + # Alias to run Windows cmd.exe from WSL + alias cmd="/mnt/c/Windows/System32/cmd.exe" + alias cmdc="/mnt/c/Windows/System32/cmd.exe /c" + } >>"${HOME}"/.zshrc + fi diff --git a/main.sh b/main.sh index d72e7bf..027c578 100644 --- a/main.sh +++ b/main.sh @@ -14,6 +14,7 @@ EOF if [ -d "${HOME}"/tmp ]; then sudo rm -f -R "${HOME}"/tmp fi + HOME=/mnt/c/appl mkdir -p "${HOME}"/tmp cd "${HOME}"/tmp || return sudo apt -qq update @@ -69,11 +70,56 @@ EOF unzip libssl-dev ca-certificates + zsh ) trap '' 2 sudo apt -y install "${apps[@]}" trap 2 unset apps + +git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions + + # zsh as default shell +cat << EOF >> ~/.bashrc + if [ -t 1 ]; then + exec zsh + fi + HOME=/mnt/c/appl +EOF + + curl -L git.io/antigen > ~/antigen.zsh + +cat << EOF >> ~/.zshrc + HOME=/mnt/c/appl + + antigen bundle zsh-users/zsh-autosuggestions + source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh + + source ~/antigen.zsh + + # Load the oh-my-zsh's library. + antigen use oh-my-zsh + + # Bundles from the default repo (robbyrussell's oh-my-zsh). + antigen bundle git + antigen bundle heroku + antigen bundle pip + antigen bundle lein + antigen bundle command-not-found + + # Syntax highlighting bundle. + antigen bundle zsh-users/zsh-syntax-highlighting + + # Load the theme. + antigen theme robbyrussell + + antigen bundle zsh-users/zsh-autosuggestions + + # Tell Antigen that you're done. + antigen apply +EOF + + endtime=$(date +%s) printf " [ DONE ] Common Requirements ... %s seconds\n" "$((endtime - starttime))" printf "\n [ START ] Configurating Command Alias" @@ -174,10 +220,10 @@ EOF read -r personalconfig if [ -z "${personalconfig}" ] || [ "${personalconfig}" == Y ] || [ "${personalconfig}" == y ]; then - printf "\n Your Name (Default: Matheus Rocha Vieira): " + printf "\n Your Name (Default: Audun L. Solemdal): " read -r username if [ -z "${username}" ]; then - username="Matheus Rocha Vieira" + username="Audun L. Solemdal" echo "$username" fi git config --global user.name "${username}" From 0ec0eb5d5efc89eb2cc85d7b514b121816e9af2c Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Tue, 21 Jan 2020 22:40:21 +0100 Subject: [PATCH 039/102] asd --- configurations/alias.sh | 48 +++++++++++++++++++++++++++++++++++++++++ startup/keybinds.ahk | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/configurations/alias.sh b/configurations/alias.sh index 7c8e097..302f174 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -7,6 +7,51 @@ else fi defaultfolder="$(jq -r ".personal.defaultfolder" "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" echo " + + # Custom functions + + function AzLogin() + { + az login + } + + function Set-AzSub() + { + az account set --subscription "SDP Tools" + } + + function kexec(){ + kubectl exec -it $1 bash + } + + function dexec(){ + docker exec -it $1 bash + } + function docup(){ + docker-compose up -d $1 + } + function docdown(){ + docker-compose down $1 + } + + # git functions + + function gcom(){ + git commit -m $1 + } + function gadd(){ + git add $1 + } + + + # ALIASES + # container aliases + alias d ="docker" + alias doc ="docker-compose" + alias k ="kubectl" + alias fsync = "fluxctl sync --k8s-fwd-ns flux" + + # ls aliases alias la="ls -al" alias ls="ls -h --color --group-directories-first" # flat view w/ directories first @@ -40,10 +85,13 @@ echo " alias status="git status" alias reset="git reset --soft" alias fetch="git fetch" + alias stash="git stash" alias push="git push origin head" alias pull="git pull" alias recent="git for-each-ref --sort -committerdate refs/heads/" alias glog="git log --graph --pretty oneline --abbrev-commit --decorate" + alias add="gadd" + alias com ="gcom" # Others alias editbash="nano ${HOME}/.bashrc" diff --git a/startup/keybinds.ahk b/startup/keybinds.ahk index 502276b..a911b65 100644 --- a/startup/keybinds.ahk +++ b/startup/keybinds.ahk @@ -58,7 +58,7 @@ IfWinActive, Adminstrator: Windows Powershell ; Save time on ssh commands IfWinActive, Adminstrator: Windows Powershell { - ::sudo::sudo su - + ::sudo s::sudo su - return } From 6f1e8ebfae00b45be9ccddc248b12163393e3855 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Tue, 21 Jan 2020 23:03:51 +0100 Subject: [PATCH 040/102] fix wsl aliases --- bootstrap/unix-settings.json | 14 +++++++------- configurations/alias.sh | 15 ++++++++++++--- startup/profile.ps1 | 2 ++ 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/bootstrap/unix-settings.json b/bootstrap/unix-settings.json index 881f202..a33d4b6 100644 --- a/bootstrap/unix-settings.json +++ b/bootstrap/unix-settings.json @@ -16,13 +16,13 @@ "program": "azurecli", "name": "Azure Comand-line Interface", "installation": "true", - "default": false + "default": true }, { "program": "powershell", "name": "PowerShell", "installation": "true", - "default": false + "default": true }, { "program": "dotnet", @@ -55,7 +55,7 @@ { "program": "nginx", "name": "Nginx", - "installation": "false", + "installation": "true", "default": false }, { @@ -153,26 +153,26 @@ "program": "docker", "name": "Docker", "installation": "true", - "default": false, + "default": true, "config": true }, { "program": "docker-compose", "name": "Docker Compose", - "installation": "false", + "installation": "true", "default": true }, { "program": "kubectl", "name": "Kubernetes", "installation": "true", - "default": false + "default": true }, { "program": "kubernetes-helm", "name": "Kubernetes Helm", "installation": "true", - "default": false, + "default": true, "dependencies": "kubectl" } ], diff --git a/configurations/alias.sh b/configurations/alias.sh index 302f174..3d1a7f7 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -8,6 +8,9 @@ fi defaultfolder="$(jq -r ".personal.defaultfolder" "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" echo " + # Extra to path + PATH=$PATH:~/path + # Custom functions function AzLogin() @@ -36,20 +39,26 @@ echo " # git functions - function gcom(){ + function com(){ git commit -m $1 } + function gadd(){ git add $1 } + function acom(){ + git add $1 + git commit -m $2 + } + # ALIASES # container aliases alias d ="docker" alias doc ="docker-compose" alias k ="kubectl" - alias fsync = "fluxctl sync --k8s-fwd-ns flux" + #alias fsync = "fluxctl sync --k8s-fwd-ns flux" # ls aliases @@ -91,7 +100,7 @@ echo " alias recent="git for-each-ref --sort -committerdate refs/heads/" alias glog="git log --graph --pretty oneline --abbrev-commit --decorate" alias add="gadd" - alias com ="gcom" + #alias com ="gcom" # Others alias editbash="nano ${HOME}/.bashrc" diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 3321a59..271d6d8 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -190,6 +190,8 @@ New-BashStyleAlias log "git log --oneline" New-BashStyleAlias gdiff "git diff" New-BashStyleAlias branch "git branch -a" New-BashStyleAlias status "git status" +New-BashStyleAlias stash "git stash" +New-BashStyleAlias pop "git pop" New-BashStyleAlias reset "git reset --soft" New-BashStyleAlias fetch "git fetch" New-BashStyleAlias push "git push origin head" From f4d691c192e3a1286fab0c9fe6341e57ed5adf6c Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Tue, 21 Jan 2020 23:05:05 +0100 Subject: [PATCH 041/102] update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4852069..d4aedba 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,7 @@ This will make everything in the startup folder be used at startup. ## Todo -- Zsh + autosuggestions in wsl - some kind of sync/deployment of files in this repo to my hosts? -- personal aliases for WSL - Window/tile manager - better sync, YADM? - sync settings to remote servers @@ -23,4 +21,6 @@ Done: - global powershell profile for productivity - windows terminal settings sync - "autoupdates" via startup script -- bash-like aliases in powershell \ No newline at end of file +- bash-like aliases in powershell +- personal aliases for WSL +- Zsh + autosuggestions in wsl (needs verification from scratch install) \ No newline at end of file From a51b3d4163ca3d2516135c0ab67d17f211623d38 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Tue, 21 Jan 2020 23:05:49 +0100 Subject: [PATCH 042/102] update raedme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d4aedba..5c2a4f5 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ This will make everything in the startup folder be used at startup. - Window/tile manager - better sync, YADM? - sync settings to remote servers +- gitconfig? Done: From 20d4483e555b41fe552434ee8e09c41f0677bb09 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Sat, 25 Jan 2020 21:35:16 +0100 Subject: [PATCH 043/102] function for aks creds --- startup/profile.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 271d6d8..ec949c8 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -1,6 +1,7 @@ # cp ./startup/profile.ps1 $PSHOME\Profile.ps1 (all users, allhosts) # Default folder +$env:HOME = "C:\Appl" cd "C:\Appl\repos" # Critical Modules @@ -46,6 +47,12 @@ function List-AzRg() Get-AzResourceGroup | select -Property ResourceGroupName } +function Get-AKSCredentials() +{ + az aks get-credentials -n sdpaks-prod-k8s -g sdpaks-prod + az aks get-credentials -n sdpaks-dev-k8s -g sdpaks-dev +} + # Containers function HelmDel($name) From a34c760f4d28162d53b93ebfcd55f389a544d24b Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 26 Jan 2020 12:10:13 +0100 Subject: [PATCH 044/102] Workaround for prompt not closing --- startup/boot.cmd | 4 ++-- startup/homeboot.cmd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/startup/boot.cmd b/startup/boot.cmd index e860c23..3ba9396 100644 --- a/startup/boot.cmd +++ b/startup/boot.cmd @@ -1,6 +1,8 @@ cd C:\appl\repos\dotfiles git pull +copy ".\startup\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y + copy ".\startup\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y @@ -8,6 +10,4 @@ copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTermina PowerShell -Command "& {c:\appl\repos\dotfiles\startup\start.ps1}" -.\startup\keybinds.ahk - exit \ No newline at end of file diff --git a/startup/homeboot.cmd b/startup/homeboot.cmd index 0122e13..9407233 100644 --- a/startup/homeboot.cmd +++ b/startup/homeboot.cmd @@ -1,9 +1,9 @@ cd C:\appl\repos\dotfiles git pull +copy ".\startup\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y + copy ".\startup\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y -.\startup\keybinds.ahk - exit \ No newline at end of file From 7f7e258ed4d76b1114609fa9e068b2a05931a295 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 26 Jan 2020 12:10:47 +0100 Subject: [PATCH 045/102] experimental. credit @devblackops @scrthq and @timsneath --- startup/profile.ps1 | 63 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index ec949c8..da7880a 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -286,4 +286,65 @@ New-BashStyleAlias editzsh "code %homepath%/.zshrc" New-BashStyleAlias editba "code %homepath%/.bash_aliases" New-BashStyleAlias np "cmd.exe /c notepad" -#Testing \ No newline at end of file +#Testing / remote inspiration +# "Some functions copied from github users @devblackops @scrthq and @timsneath + +# Find out if the current user identity is elevated (has admin rights) + +$identity = [Security.Principal.WindowsIdentity]::GetCurrent() +$principal = New-Object Security.Principal.WindowsPrincipal $identity +$isAdmin = $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) + + +$Host.UI.RawUI.WindowTitle = "PowerShell {0}" -f $PSVersionTable.PSVersion.ToString() +if ($isAdmin) +{ + $Host.UI.RawUI.WindowTitle += " [ADMIN]" +} + + +function prompt +{ + if ($isAdmin) + { + "[" + (Get-Location) + "] # " + } + else + { + "[" + (Get-Location) + "] $ " + } +} + + +function dirs +{ + if ($args.Count -gt 0) + { + Get-ChildItem -Recurse -Include "$args" | Foreach-Object FullName + } + else + { + Get-ChildItem -Recurse | Foreach-Object FullName + } +} + +Import-Module MSTerminalSettings +$msTermProfileName = 'PowerShell' # Replace with whatever Terminal profile name you're using +$msTermProfile = Get-MSTerminalProfile -Name $msTermProfileName +$script:bombThrown = $false +function prompt { + if ($? -eq $false) { + # RED ALERT!!! + # Only do this if we're using Microsoft Terminal + if ((Get-Process -Id $PID).Parent.Parent.ProcessName -eq 'WindowsTerminal') { + Set-MSTerminalProfile -Name $msTermProfile.name -BackgroundImage 'https://media.giphy.com/media/HhTXt43pk1I1W/giphy.gif' -UseAcrylic:$false + $script:bombThrown = $true + } + } else { + # Reset to previous settings + if ($script:bombThrown) { + Set-MSTerminalProfile -Name $msTermProfile.name -BackgroundImage $msTermProfile.backgroundImage -UseAcrylic:$msTermProfile.useAcrylic + $script:bombThrown = $false + } + } +} \ No newline at end of file From 3d130620c47bac1610d417c46a8cc86eb8e43545 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 26 Jan 2020 12:11:36 +0100 Subject: [PATCH 046/102] Remove warning prompt --- startup/profile.ps1 | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index da7880a..385eddd 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -326,25 +326,4 @@ function dirs { Get-ChildItem -Recurse | Foreach-Object FullName } -} - -Import-Module MSTerminalSettings -$msTermProfileName = 'PowerShell' # Replace with whatever Terminal profile name you're using -$msTermProfile = Get-MSTerminalProfile -Name $msTermProfileName -$script:bombThrown = $false -function prompt { - if ($? -eq $false) { - # RED ALERT!!! - # Only do this if we're using Microsoft Terminal - if ((Get-Process -Id $PID).Parent.Parent.ProcessName -eq 'WindowsTerminal') { - Set-MSTerminalProfile -Name $msTermProfile.name -BackgroundImage 'https://media.giphy.com/media/HhTXt43pk1I1W/giphy.gif' -UseAcrylic:$false - $script:bombThrown = $true - } - } else { - # Reset to previous settings - if ($script:bombThrown) { - Set-MSTerminalProfile -Name $msTermProfile.name -BackgroundImage $msTermProfile.backgroundImage -UseAcrylic:$msTermProfile.useAcrylic - $script:bombThrown = $false - } - } } \ No newline at end of file From d2ea9734d279c40d7eab0c18ad746a2a1f71a08c Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Sun, 26 Jan 2020 17:55:11 +0100 Subject: [PATCH 047/102] WIP: improve prompt --- bootstrap/w10-settings.json | 4 ++-- main.ps1 | 23 +++++++++++++++++------ startup/profile.ps1 | 20 +++++++------------- startup/profiles.json | 2 +- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/bootstrap/w10-settings.json b/bootstrap/w10-settings.json index bb8d5a1..fe862b3 100644 --- a/bootstrap/w10-settings.json +++ b/bootstrap/w10-settings.json @@ -3,7 +3,7 @@ { "program": "docker-desktop", "name": "Docker Desktop", - "installation": true, + "installation": false, "default": true }, { @@ -33,7 +33,7 @@ { "program": "ccleaner", "name": "CCleaner", - "installation": true, + "installation": false, "default": false }, { diff --git a/main.ps1 b/main.ps1 index 7dcd33d..2b54dd5 100644 --- a/main.ps1 +++ b/main.ps1 @@ -379,10 +379,10 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: "vagrant" "vscode" "greenshot" - "winrar" "GoogleChrome" # Work use "wsl" + "wsl-ubuntu-1804" "docker" "slack" "microsoft-windows-terminal" @@ -395,7 +395,6 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: "steam" #"leagueoflegends" "vlc" - "spotify" ) ForEach ($Program in $Programs) { @@ -423,13 +422,25 @@ if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:: Write-Output " [ DONE ] $ProgramName ... $StopWatchElapsed seconds`n" } } + + # Install PowerShell modules + $Modules = @( + "poshgit" + "Graphical" + "MSTerminalSettings" + "Terminal-Icons" + "Pansies" + "PowerLine" + "PSProfile" + ) + + Foreach ($module in Modules){ + Install-Module -Name $module -Force -AllowClobber + } + Enable-UAC RefreshEnv Start-Process -FilePath 'autoruns' -Wait - $OfficeInstall = Read-Host -Prompt "`n Do you wish to install Office? (Y/n)" - if ([string]::IsNullOrWhiteSpace($OfficeInstall) -Or $OfficeInstall -eq 'Y' -Or $OfficeInstall -eq 'y') { - Start-Process -FilePath 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' -ArgumentList 'https://old.reddit.com/r/sjain_guides/comments/9m4m0k/microsoft_office_201319_simple_method_to_download' - } $AdobeInstall = Read-Host -Prompt "`n Do you wish to install Adobe Products? (Y/n)" if ([string]::IsNullOrWhiteSpace($AdobeInstall) -Or $AdobeInstall -eq 'Y' -Or $AdobeInstall -eq 'y') { Start-Process -FilePath 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' -ArgumentList 'https://old.reddit.com/r/sjain_guides/wiki/downloads' diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 385eddd..ed2965e 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -6,7 +6,13 @@ cd "C:\Appl\repos" # Critical Modules -Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git.psd1' +Import-Module 'posh-git' +Import-Module "Terminal-icons" +Import-Module "PowerLine" + +# Powerline +$Prompt[6] = { "auls@local " } +Add-PowerLineBlock { Write-VcsStatus } -AutoRemove # Alias @@ -303,18 +309,6 @@ if ($isAdmin) } -function prompt -{ - if ($isAdmin) - { - "[" + (Get-Location) + "] # " - } - else - { - "[" + (Get-Location) + "] $ " - } -} - function dirs { diff --git a/startup/profiles.json b/startup/profiles.json index c97c814..9a183fa 100644 --- a/startup/profiles.json +++ b/startup/profiles.json @@ -25,7 +25,7 @@ "backgroundImageStechMode": "uniformToFill", "colorScheme": "Campbell", "cursorHeight": 25, - "fontFace": "Fira Code", + "fontFace": "LiberationMono NF", "fontSize": 16, "icon": "ms-appdata:///roaming/pwsh-32.png", "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", From 6ba9d32f6aea1a565ca01273181cf3f24be5a850 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Sun, 26 Jan 2020 17:58:32 +0100 Subject: [PATCH 048/102] Cleaner naming in tabs --- startup/profile.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index ed2965e..9e5719b 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -302,14 +302,12 @@ $principal = New-Object Security.Principal.WindowsPrincipal $identity $isAdmin = $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) -$Host.UI.RawUI.WindowTitle = "PowerShell {0}" -f $PSVersionTable.PSVersion.ToString() +$Host.UI.RawUI.WindowTitle = "PowerShell {0}" -f $PSVersionTable.PSVersion.Major.ToString() if ($isAdmin) { $Host.UI.RawUI.WindowTitle += " [ADMIN]" } - - function dirs { if ($args.Count -gt 0) From a7280a0a0dff6d6fc22a19a166a95dae5f682449 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Sun, 26 Jan 2020 18:48:41 +0100 Subject: [PATCH 049/102] credit @Chris Dent --- startup/profile.ps1 | 174 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 168 insertions(+), 6 deletions(-) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 9e5719b..c449a30 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -6,13 +6,7 @@ cd "C:\Appl\repos" # Critical Modules -Import-Module 'posh-git' Import-Module "Terminal-icons" -Import-Module "PowerLine" - -# Powerline -$Prompt[6] = { "auls@local " } -Add-PowerLineBlock { Write-VcsStatus } -AutoRemove # Alias @@ -318,4 +312,172 @@ function dirs { Get-ChildItem -Recurse | Foreach-Object FullName } +} + +#prompt: credit @Chris Dent - indented-automation + +function Global:prompt { + $colours = @{ + Cyan = 0, 255, 255 + Green = 128, 255, 0 + Blue = 51, 153, 255 + Red = 255, 0, 0 + White = 255, 255, 255 + Grey = 224, 224, 224 + Purple = 178, 102, 204 + } + + function Write-ColourfulString { + param ( + [String]$Colour = 'None', + + [String]$String, + + [Boolean]$If = $true, + + [Ref]$Length = (Get-Variable LengthRef -Scope 1 -ValueOnly -ErrorAction SilentlyContinue) + ) + + if ($String -and $If) { + $Length.Value += $String.Length + + if ($Colour -eq 'None') { + $String + } else { + $rgb = $colours[$Colour] + + "{0}[38;2;{1};{2};{3}`m{4}{0}[0m" -f @( + ([Char]27) + $rgb[0] + $rgb[1] + $rgb[2] + $String + ) + } + } else { + '' + } + } + + function Get-VcsRootName { + $path = $executionContext.SessionState.Path.CurrentLocation + if ($path.Provider.Name -ne 'FileSystem') { + return + } + $path = Get-Item $path.Path + while (-not [String]::IsNullOrWhiteSpace($path)) { + if (Test-Path (Join-Path $path.FullName '.git') -PathType Container) { + return $path.Name + } else { + $path = $path.Parent + } + } + } + + function Get-VcsStatus { + $gitStatusOutput = (git status -s -b 2>$null) -split '\r?\n' + if ($gitStatusOutput[0] -match '^## (?[^.]+)(\.{3}(?\S+))?(?: \[)?(?:ahead (?\d+))?(?:, )?(?:behind (?\d+))?' -or + $gitStatusOutput[0] -match '^## HEAD \(no branch\)') { + + if (-not $matches['local']) { + $matches['local'] = git rev-parse --short HEAD + } + + $status = [PSCustomObject]@{ + RootName = Get-VcsRootName + BranchName = $matches['local'] + AheadBy = [Int]$matches['ahead'] + BehindBy = [Int]$matches['behind'] + + StagedCount = 0 + Staged = [PSCustomObject]@{ + Added = 0 + Deleted = 0 + Modified = 0 + } + UnstagedCount = 0 + Unstaged = [PSCustomObject]@{ + Added = 0 + Deleted = 0 + Modified = 0 + } + UnmergedCount = 0 + } + + foreach ($entry in $gitStatusOutput) { + switch -Regex ($entry) { + '^[ADM]' { $status.StagedCount++ } + '^A' { $status.Staged.Added++; break } + '^D ' { $status.Staged.Deleted++; break } + '^M ' { $status.Staged.Modified++; break } + '^( [DM]|\?\?)' { $status.UnstagedCount++ } + '^\?\?' { $status.Unstaged.Added++; break } + '^ D' { $status.Unstaged.Deleted++; break } + '^ M' { $status.Unstaged.Modified++; break } + '^UU' { $status.UnmergedCount++; break } + } + } + + $status + } + } + + $Path = $executionContext.SessionState.Path.CurrentLocation.Path + + $status = Get-VcsStatus + $length = 0 + $lengthRef = [Ref]$length + $prompt = '' + if ($status) { + $length += 6 + $prompt = "<{0} [{1} {2}]> " -f @( + Write-ColourfulString -Colour Green -String $status.RootName + Write-ColourfulString -Colour Cyan -String $status.BranchName + -join @( + Write-ColourfulString -Colour Cyan -String ([Char]8801) -If ($status.BehindBy -eq 0 -and $status.AheadBy -eq 0) + Write-ColourfulString -Colour Red -String ('{0}{1}' -f ([Char]8595), $status.BehindBy) -If ($status.BehindBy -gt 0) + Write-ColourfulString -Colour None -String ' ' -If ($status.BehindBy -gt 0 -and $status.AheadBy -gt 0) + Write-ColourfulString -Colour Green -String ('{0}{1}' -f ([Char]8593), $status.AheadBy) -If ($status.AheadBy -gt 0) + Write-ColourfulString -Colour Green -String (' +{0} ~{1} -{2}' -f @( + $status.Staged.Added + $status.Staged.Modified + $status.Staged.Deleted + )) -If ($status.StagedCount -gt 0) + Write-ColourfulString -Colour White -String ' |' -If ($status.StagedCount -gt 0 -and ($status.UnstagedCount -gt 0 -or $status.UnmergedCount -gt 0)) + Write-ColourfulString -Colour Red -String (' +{0} ~{1} -{2}' -f @( + $status.Unstaged.Added + $status.Unstaged.Modified + $status.Unstaged.Deleted + )) -If ($status.UnstagedCount -gt 0 -or $status.UnmergedCount -gt 0) + Write-ColourfulString -Colour Red -String (' !{0}' -f $status.UnmergedCount) -If ($status.UnmergedCount -gt 0) + Write-ColourfulString -Colour Red -String ' !' -If ($status.UnstagedCount -gt 0 -or $status.UnmergedCount -gt 0) + ) + ) + } + + $maximumPathLength = $host.UI.RawUI.WindowSize.Width - $length - 22 + if ($Path.Length -gt $maximumPathLength) { + $Path = '...{0}' -f $Path.Substring($Path.Length - $maximumPathLength, $maximumPathLength) + } + $prompt = "{0}[{1}] " -f @( + $prompt + Write-ColourfulString -Colour Blue -String $Path + ) + + if ($lastCommand = Get-History -Count 1) { + $timeTaken = '{0:N2}' -f ($lastCommand.EndExecutionTime - $lastCommand.StartExecutionTime).TotalMilliseconds + $offset = $host.UI.RawUI.WindowSize.Width - $timeTaken.Length - 4 + + $prompt = "{0}{1}[{2}G[{3} ms]" -f @( + $prompt + ([Char]27) + $offset + Write-ColourfulString -Colour Purple -String $timeTaken + ) + + "`n{0}`n{1}|auls@local> " -f $prompt, ($lastCommand.Id + 1) + } else { + "`n{0}`n1|auls@local> " -f $prompt + } + } \ No newline at end of file From 1b7004fef3ef711a2153a63d2d3dc1fca1546eb0 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Sun, 26 Jan 2020 19:00:55 +0100 Subject: [PATCH 050/102] add timestamp to commands --- startup/profile.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index c449a30..163d988 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -466,13 +466,15 @@ function Global:prompt { if ($lastCommand = Get-History -Count 1) { $timeTaken = '{0:N2}' -f ($lastCommand.EndExecutionTime - $lastCommand.StartExecutionTime).TotalMilliseconds - $offset = $host.UI.RawUI.WindowSize.Width - $timeTaken.Length - 4 + $dt = get-date -Format "HH:mm:ss" + $offset = $host.UI.RawUI.WindowSize.Width - $timeTaken.Length - $dt.Length - 8 - $prompt = "{0}{1}[{2}G[{3} ms]" -f @( + $prompt = "{0}{1}[{2}G[{3} ms] - {4}" -f @( $prompt ([Char]27) $offset - Write-ColourfulString -Colour Purple -String $timeTaken + Write-ColourfulString -Colour Purple -String "$timeTaken" + Write-ColourfulString -Colour Cyan -String "$dt" ) "`n{0}`n{1}|auls@local> " -f $prompt, ($lastCommand.Id + 1) From 84054fee9465df6a45af3f77b9e0d6ab944d593c Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Sun, 26 Jan 2020 19:39:39 +0100 Subject: [PATCH 051/102] beautify terminal backgrounds --- startup/linux.jpg | Bin 0 -> 10314 bytes startup/profiles.json | 110 +++++++++++++++++++++++------------------- startup/pwsh.jpg | Bin 0 -> 30156 bytes 3 files changed, 61 insertions(+), 49 deletions(-) create mode 100644 startup/linux.jpg create mode 100644 startup/pwsh.jpg diff --git a/startup/linux.jpg b/startup/linux.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1b79672c33f8d72690d8d94db3f74b4aaaeaecb0 GIT binary patch literal 10314 zcmeHscUY6@wr?EAGJ-M;UD_5El%^PpQtuu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)>|nd*TZU+ z9S178{m3-0p$TIjyOfMEGHtn}RHY>sDAc~_!>URTh?BXS3kRYeBAxD`sPV0R*rZDr zR$fr*&Q`k|=H1+%K1pmUbJ$d5#YJCMaNviL8RE7bXpX4rHd((0Ry5Z09cKEjE+x(D5#6@u#X4YV{JeJy9QN zd8Cp=WmVLCM(n$jqlT5OEnky^g^zld6!5T;vbq)~f_AorOkc|tb>WX0UHK(eq@CQ^ zcf07uoTNhyDLqMHRr{O>N4p;mCmtIQ5Vjq6vBZ&{PswRW$jH;&%MqxTMr1VQ&e7SF zW`|+e%u38qMnpKIRE5P#OyH29pK_!!K6Ki8GElnBa*a%q*RfGjc99iHLg^!nl$KZ! zQv1=;?KLbqwI9qmN%v%7DRweXV}~J9-JCch-9~de*u0Fgenm~OQWZ30T?s1`r^hP-lia+wHQZ5bRE`rPL{t#yq(+o>9!21&<0YV>CMpwTqT=kxJF7BL%E}I#R(;20 zouW@abcoKXRx;I=jgJVIc?yLny;;Pi1!LMGuN!D8iZX2?Rp%vZj;%(l#aY&T{f)kg2vRLZ*y}%8Pogv-F@Yl0RP$BI^)m) literal 0 HcmV?d00001 From 7c5c33dc04edf1a642aa3b2212483e1a6f40801b Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Sun, 26 Jan 2020 20:43:31 +0100 Subject: [PATCH 052/102] fix font for wsl --- startup/profiles.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup/profiles.json b/startup/profiles.json index 34b831d..c7faa33 100644 --- a/startup/profiles.json +++ b/startup/profiles.json @@ -26,7 +26,7 @@ "backgroundImageStechMode": "uniformToFill", "colorScheme": "Campbell", "cursorHeight": 25, - "fontFace": "LiberationMono NF", + "fontFace": "LiterationMono NF", "fontSize": 16, "icon": "ms-appdata:///roaming/pwsh-32.png", "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", From ba70929439e05db3fe92e3cdad58d21481565d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Mon, 27 Jan 2020 07:53:42 +0100 Subject: [PATCH 053/102] add prev --- startup/profile.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 163d988..5f15249 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -206,6 +206,10 @@ New-BashStyleAlias pull "git pull" New-BashStyleAlias recent "git for-each-ref --sort -committerdate refs/heads/" New-BashStyleAlias glog "git log --graph --pretty oneline --abbrev-commit --decorate" +# Speical commands + +New-BashStyleAlias prev "Get-Content (Get-PSReadlineOption).HistorySavePath" + function reset(){ [CmdletBinding()] From 171bd488f0d2e74a863e9c5a63ebd87962dc36f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Mon, 27 Jan 2020 11:57:44 +0100 Subject: [PATCH 054/102] Add restart command for kube deployments --- startup/profile.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 5f15249..bf913bb 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -79,6 +79,15 @@ function KDown($name) kubectl scale deployments -n $n --replicas=0 --all } +function KRe($name) +{ + $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String | %{$_.split(" ")[0]} + $n = $m.Substring(2) + + kubectl scale deployments -n $n --replicas=0 --all + kubectl scale deployments -n $n --replicas=1 --all +} + function KCon($con) { $o = "sdpaks-$con-k8s" From 46a5483572bb6cac141bccc8b7ff30d8fc94320d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Mon, 27 Jan 2020 13:09:03 +0100 Subject: [PATCH 055/102] Fix alias typos --- configurations/alias.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configurations/alias.sh b/configurations/alias.sh index 3d1a7f7..4faee08 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -55,10 +55,10 @@ echo " # ALIASES # container aliases - alias d ="docker" - alias doc ="docker-compose" - alias k ="kubectl" - #alias fsync = "fluxctl sync --k8s-fwd-ns flux" + alias d="docker" + alias doc="docker-compose" + alias k="kubectl" + #alias fsync ="fluxctl sync --k8s-fwd-ns flux" # ls aliases @@ -100,7 +100,7 @@ echo " alias recent="git for-each-ref --sort -committerdate refs/heads/" alias glog="git log --graph --pretty oneline --abbrev-commit --decorate" alias add="gadd" - #alias com ="gcom" + alias com="gcom" # Others alias editbash="nano ${HOME}/.bashrc" From 2507949d0180dce54bb72b9278fa03e114a8dc95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Wed, 29 Jan 2020 09:51:11 +0100 Subject: [PATCH 056/102] improve tab experience in terminal --- startup/profiles.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/startup/profiles.json b/startup/profiles.json index c7faa33..ba5bfe4 100644 --- a/startup/profiles.json +++ b/startup/profiles.json @@ -103,6 +103,12 @@ }, { "command": "prevTab", + "keys": [ + "ctrl+shift+tab" + ] + }, + { + "command": "nextTab", "keys": [ "ctrl+tab" ] @@ -149,6 +155,30 @@ "ctrl+4" ] }, + { + "command": "switchToTab4", + "keys": [ + "ctrl+5" + ] + }, + { + "command": "switchToTab5", + "keys": [ + "ctrl+6" + ] + }, + { + "command": "switchToTab6", + "keys": [ + "ctrl+7" + ] + }, + { + "command": "switchToTab7", + "keys": [ + "ctrl+8" + ] + }, { "command": "moveFocusUp", "keys": [ "ctrl+alt+up" ] From a0188772220236b75ddab0c1e5b7c011346e307f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Audun=20L=C3=B8nset=20Solemdal?= Date: Fri, 31 Jan 2020 14:00:41 +0100 Subject: [PATCH 057/102] remove slow module --- startup/profile.ps1 | 165 -------------------------------------------- 1 file changed, 165 deletions(-) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index bf913bb..d2cf206 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -329,170 +329,5 @@ function dirs #prompt: credit @Chris Dent - indented-automation -function Global:prompt { - $colours = @{ - Cyan = 0, 255, 255 - Green = 128, 255, 0 - Blue = 51, 153, 255 - Red = 255, 0, 0 - White = 255, 255, 255 - Grey = 224, 224, 224 - Purple = 178, 102, 204 - } - - function Write-ColourfulString { - param ( - [String]$Colour = 'None', - - [String]$String, - - [Boolean]$If = $true, - - [Ref]$Length = (Get-Variable LengthRef -Scope 1 -ValueOnly -ErrorAction SilentlyContinue) - ) - - if ($String -and $If) { - $Length.Value += $String.Length - - if ($Colour -eq 'None') { - $String - } else { - $rgb = $colours[$Colour] - - "{0}[38;2;{1};{2};{3}`m{4}{0}[0m" -f @( - ([Char]27) - $rgb[0] - $rgb[1] - $rgb[2] - $String - ) - } - } else { - '' - } - } - - function Get-VcsRootName { - $path = $executionContext.SessionState.Path.CurrentLocation - if ($path.Provider.Name -ne 'FileSystem') { - return - } - $path = Get-Item $path.Path - while (-not [String]::IsNullOrWhiteSpace($path)) { - if (Test-Path (Join-Path $path.FullName '.git') -PathType Container) { - return $path.Name - } else { - $path = $path.Parent - } - } - } - - function Get-VcsStatus { - $gitStatusOutput = (git status -s -b 2>$null) -split '\r?\n' - if ($gitStatusOutput[0] -match '^## (?[^.]+)(\.{3}(?\S+))?(?: \[)?(?:ahead (?\d+))?(?:, )?(?:behind (?\d+))?' -or - $gitStatusOutput[0] -match '^## HEAD \(no branch\)') { - - if (-not $matches['local']) { - $matches['local'] = git rev-parse --short HEAD - } - - $status = [PSCustomObject]@{ - RootName = Get-VcsRootName - BranchName = $matches['local'] - AheadBy = [Int]$matches['ahead'] - BehindBy = [Int]$matches['behind'] - - StagedCount = 0 - Staged = [PSCustomObject]@{ - Added = 0 - Deleted = 0 - Modified = 0 - } - UnstagedCount = 0 - Unstaged = [PSCustomObject]@{ - Added = 0 - Deleted = 0 - Modified = 0 - } - UnmergedCount = 0 - } - - foreach ($entry in $gitStatusOutput) { - switch -Regex ($entry) { - '^[ADM]' { $status.StagedCount++ } - '^A' { $status.Staged.Added++; break } - '^D ' { $status.Staged.Deleted++; break } - '^M ' { $status.Staged.Modified++; break } - '^( [DM]|\?\?)' { $status.UnstagedCount++ } - '^\?\?' { $status.Unstaged.Added++; break } - '^ D' { $status.Unstaged.Deleted++; break } - '^ M' { $status.Unstaged.Modified++; break } - '^UU' { $status.UnmergedCount++; break } - } - } - - $status - } - } - - $Path = $executionContext.SessionState.Path.CurrentLocation.Path - - $status = Get-VcsStatus - $length = 0 - $lengthRef = [Ref]$length - $prompt = '' - if ($status) { - $length += 6 - $prompt = "<{0} [{1} {2}]> " -f @( - Write-ColourfulString -Colour Green -String $status.RootName - Write-ColourfulString -Colour Cyan -String $status.BranchName - -join @( - Write-ColourfulString -Colour Cyan -String ([Char]8801) -If ($status.BehindBy -eq 0 -and $status.AheadBy -eq 0) - Write-ColourfulString -Colour Red -String ('{0}{1}' -f ([Char]8595), $status.BehindBy) -If ($status.BehindBy -gt 0) - Write-ColourfulString -Colour None -String ' ' -If ($status.BehindBy -gt 0 -and $status.AheadBy -gt 0) - Write-ColourfulString -Colour Green -String ('{0}{1}' -f ([Char]8593), $status.AheadBy) -If ($status.AheadBy -gt 0) - Write-ColourfulString -Colour Green -String (' +{0} ~{1} -{2}' -f @( - $status.Staged.Added - $status.Staged.Modified - $status.Staged.Deleted - )) -If ($status.StagedCount -gt 0) - Write-ColourfulString -Colour White -String ' |' -If ($status.StagedCount -gt 0 -and ($status.UnstagedCount -gt 0 -or $status.UnmergedCount -gt 0)) - Write-ColourfulString -Colour Red -String (' +{0} ~{1} -{2}' -f @( - $status.Unstaged.Added - $status.Unstaged.Modified - $status.Unstaged.Deleted - )) -If ($status.UnstagedCount -gt 0 -or $status.UnmergedCount -gt 0) - Write-ColourfulString -Colour Red -String (' !{0}' -f $status.UnmergedCount) -If ($status.UnmergedCount -gt 0) - Write-ColourfulString -Colour Red -String ' !' -If ($status.UnstagedCount -gt 0 -or $status.UnmergedCount -gt 0) - ) - ) - } - - $maximumPathLength = $host.UI.RawUI.WindowSize.Width - $length - 22 - if ($Path.Length -gt $maximumPathLength) { - $Path = '...{0}' -f $Path.Substring($Path.Length - $maximumPathLength, $maximumPathLength) - } - $prompt = "{0}[{1}] " -f @( - $prompt - Write-ColourfulString -Colour Blue -String $Path - ) - - if ($lastCommand = Get-History -Count 1) { - $timeTaken = '{0:N2}' -f ($lastCommand.EndExecutionTime - $lastCommand.StartExecutionTime).TotalMilliseconds - $dt = get-date -Format "HH:mm:ss" - $offset = $host.UI.RawUI.WindowSize.Width - $timeTaken.Length - $dt.Length - 8 - - $prompt = "{0}{1}[{2}G[{3} ms] - {4}" -f @( - $prompt - ([Char]27) - $offset - Write-ColourfulString -Colour Purple -String "$timeTaken" - Write-ColourfulString -Colour Cyan -String "$dt" - ) - - "`n{0}`n{1}|auls@local> " -f $prompt, ($lastCommand.Id + 1) - } else { - "`n{0}`n1|auls@local> " -f $prompt - } } \ No newline at end of file From 7a782d6bd2fd2881bab9e436b87c8962a61f9ece Mon Sep 17 00:00:00 2001 From: solomson Date: Sat, 8 Feb 2020 16:30:44 +0100 Subject: [PATCH 058/102] set profile theme --- startup/profile.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/startup/profile.ps1 b/startup/profile.ps1 index d2cf206..0d35a3e 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -6,7 +6,8 @@ cd "C:\Appl\repos" # Critical Modules -Import-Module "Terminal-icons" +#Import-Module "Terminal-icons" +Set-Theme Paradox # Alias From 0f2cdc87536cdcfd6006422af1deac0ac08cc4b2 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Mon, 10 Feb 2020 09:38:47 +0100 Subject: [PATCH 059/102] asd --- configurations/alias.sh | 23 +++++++++++++++++++++++ startup/profile.ps1 | 5 ----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/configurations/alias.sh b/configurations/alias.sh index 4faee08..7138cab 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -52,6 +52,29 @@ echo " git commit -m $2 } + function KCon() + { + O="sdpaks-$1-k8s" + kubectl config use-context $O + + if [ $? -eq 0 ]; then + echo "Currently in $1 cluster" + fi + } + + function KNs() + { + # always returns true.. need workaround + kubectl config set-context --current --namespace=$1 + + if [ $? -eq 0 ]; then + CON=$(kubectl config current-context) + echo "Currently at $1 namespace in $CON cluster" + fi + } + + alias kns="KNs" + alias kcon="KCon" # ALIASES # container aliases diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 0d35a3e..6f468ef 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -326,9 +326,4 @@ function dirs { Get-ChildItem -Recurse | Foreach-Object FullName } -} - -#prompt: credit @Chris Dent - indented-automation - - } \ No newline at end of file From 40204711c6da18fdbf31cdf7cb8ddf94e4814378 Mon Sep 17 00:00:00 2001 From: solomson Date: Sat, 15 Feb 2020 12:34:51 +0100 Subject: [PATCH 060/102] add window manager --- startup/boot.cmd | 1 + startup/profiles.json | 2 +- startup/windowmanager.ahk | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 startup/windowmanager.ahk diff --git a/startup/boot.cmd b/startup/boot.cmd index 3ba9396..ed7a2c0 100644 --- a/startup/boot.cmd +++ b/startup/boot.cmd @@ -2,6 +2,7 @@ cd C:\appl\repos\dotfiles git pull copy ".\startup\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y +copy ".\startup\windowmanager.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y copy ".\startup\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y diff --git a/startup/profiles.json b/startup/profiles.json index ba5bfe4..c29895a 100644 --- a/startup/profiles.json +++ b/startup/profiles.json @@ -40,7 +40,7 @@ // Make changes here to the wsl.exe profile "acrylicOpacity": 1, //"useAcrylic": true, - "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\pwsh.jpg", + "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\linux.jpg", "backgroundImageOpacity": 0.17, "backgroundImageStechMode": "uniformToFill", "guid": "{6f9994f0-4403-5e85-9cce-98e5da3839bb}", diff --git a/startup/windowmanager.ahk b/startup/windowmanager.ahk new file mode 100644 index 0000000..0c4b5ef --- /dev/null +++ b/startup/windowmanager.ahk @@ -0,0 +1,33 @@ +;Startup script for starting up two virtual desktops and placing Windows + +; Open apps in work desktop +Run code +WinMaximize +Run chrome.exe google.com portal.azure.com https://github.com/equinor/sdp-flux/tree/dev git.equinor.com https://stackoverflow.com/search?q= youtube.com +Run powershell.exe +Sleep 2000 + +Process, Wait, powershell.exe +WinMaximize +Process, Wait, code.exe +WinMaximize + + +;switch to next virtual desktop +Send ^#{Right} + +; Opening apps on communication desktop + +Run slack:// +run lync.exe +run outlook.exe +Process, Wait, outlook.exe +WinMaximize + +Sleep 1000 + +;switch to default virtual desktop +Send ^#{Left} + +Send ^#{Left} +Process, Close, cmd.exe \ No newline at end of file From 8a763a1d0c7da17dc7654bb72cf886104bf3b073 Mon Sep 17 00:00:00 2001 From: solomson Date: Sat, 15 Feb 2020 16:46:37 +0100 Subject: [PATCH 061/102] new start --- startup/boot.cmd | 1 - startup/profile.ps1 | 1 - startup/profiles.json | 3 --- startup/start.ps1 | 41 --------------------------------------- startup/windowmanager.ahk | 11 +++++++---- 5 files changed, 7 insertions(+), 50 deletions(-) delete mode 100644 startup/start.ps1 diff --git a/startup/boot.cmd b/startup/boot.cmd index ed7a2c0..24338e9 100644 --- a/startup/boot.cmd +++ b/startup/boot.cmd @@ -10,5 +10,4 @@ copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTermina #PowerShell -Command "Set-ExecutionPolicy RemoteSigned" PowerShell -Command "& {c:\appl\repos\dotfiles\startup\start.ps1}" - exit \ No newline at end of file diff --git a/startup/profile.ps1 b/startup/profile.ps1 index 6f468ef..254ba57 100644 --- a/startup/profile.ps1 +++ b/startup/profile.ps1 @@ -2,7 +2,6 @@ # Default folder $env:HOME = "C:\Appl" -cd "C:\Appl\repos" # Critical Modules diff --git a/startup/profiles.json b/startup/profiles.json index c29895a..bb67883 100644 --- a/startup/profiles.json +++ b/startup/profiles.json @@ -11,9 +11,6 @@ "initialCols": 158, "initialRows": 38, "windowRestoreMode": "lastPositionAndSize", - "initialPosition": "-3845, 0", - - "profiles": [ { diff --git a/startup/start.ps1 b/startup/start.ps1 deleted file mode 100644 index 9446604..0000000 --- a/startup/start.ps1 +++ /dev/null @@ -1,41 +0,0 @@ -#Declare URLs, then open URLs in chrome - -$urls = @( - "https://youtube.com" - "https://portal.azure.com" - "https://google.com" - "https://github.com/equinor/sdp-aks" - "https://github.com/equinor/sdp-flux" - "https://git.equinor.com" - -) - -Test-Path "C:\Program Files\Mozilla Firefox" -if($?) -{ - Start-Process "firefox.exe" $urls -} -else { - Start-Process "chrome.exe" $urls -} - -# Bypass UAC admin prompts for the scripts duration -Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 0 - -# Open Termnials + vscode -Start-Process "wsl" -Verb RunAs -Start-Process "code" -Verb RunAs -Start-Process shell:appsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App -Verb RunAs # Windows Terminal - -Test-path "f:\" -if($?) -{ - try { Remove-PSDrive -name "F" } - catch { - - } -} - - -# Re-enable UAC prompts (use value "1" for max validation) -Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 2 diff --git a/startup/windowmanager.ahk b/startup/windowmanager.ahk index 0c4b5ef..ffc9066 100644 --- a/startup/windowmanager.ahk +++ b/startup/windowmanager.ahk @@ -1,14 +1,17 @@ ;Startup script for starting up two virtual desktops and placing Windows +#SingleInstance force ; Open apps in work desktop Run code WinMaximize +WinMove, 1920, 0 ; Code on left monitor Run chrome.exe google.com portal.azure.com https://github.com/equinor/sdp-flux/tree/dev git.equinor.com https://stackoverflow.com/search?q= youtube.com -Run powershell.exe +WinMove, 3840, 0 ; Chrome on right monitor + +Run wt `; new-tab -p "powershell" -d C:\appl; new-tab -p "powershell" -d C:\appl; new-tab -p "wsl" -d /mnt/c/appl/repos/sdp-flux; new-tab -p "wsl"; new-tab -p "wsl"; focus-tab -t 0 +WinMove, 0, 0 ; Terminal on laptop screen (left) Sleep 2000 -Process, Wait, powershell.exe -WinMaximize Process, Wait, code.exe WinMaximize @@ -19,7 +22,7 @@ Send ^#{Right} ; Opening apps on communication desktop Run slack:// -run lync.exe +run lync.exe ; Skype for Business run outlook.exe Process, Wait, outlook.exe WinMaximize From a46dcf7672405f51acf24c537c90be3f25cac45d Mon Sep 17 00:00:00 2001 From: solomson Date: Sat, 15 Feb 2020 17:01:23 +0100 Subject: [PATCH 062/102] Update boot.cmd --- startup/boot.cmd | 3 --- 1 file changed, 3 deletions(-) diff --git a/startup/boot.cmd b/startup/boot.cmd index 24338e9..09292f4 100644 --- a/startup/boot.cmd +++ b/startup/boot.cmd @@ -7,7 +7,4 @@ copy ".\startup\windowmanager.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" / copy ".\startup\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y -#PowerShell -Command "Set-ExecutionPolicy RemoteSigned" -PowerShell -Command "& {c:\appl\repos\dotfiles\startup\start.ps1}" - exit \ No newline at end of file From 22eacb26b9d456a0e7e39ba33e34c1d99c46f2d3 Mon Sep 17 00:00:00 2001 From: solomson Date: Sat, 15 Feb 2020 17:21:55 +0100 Subject: [PATCH 063/102] Update startup --- startup/windowmanager.ahk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/startup/windowmanager.ahk b/startup/windowmanager.ahk index ffc9066..8f41ca6 100644 --- a/startup/windowmanager.ahk +++ b/startup/windowmanager.ahk @@ -10,12 +10,11 @@ WinMove, 3840, 0 ; Chrome on right monitor Run wt `; new-tab -p "powershell" -d C:\appl; new-tab -p "powershell" -d C:\appl; new-tab -p "wsl" -d /mnt/c/appl/repos/sdp-flux; new-tab -p "wsl"; new-tab -p "wsl"; focus-tab -t 0 WinMove, 0, 0 ; Terminal on laptop screen (left) -Sleep 2000 +Sleep 5000 Process, Wait, code.exe WinMaximize - ;switch to next virtual desktop Send ^#{Right} @@ -27,10 +26,11 @@ run outlook.exe Process, Wait, outlook.exe WinMaximize -Sleep 1000 +Sleep 5000 ;switch to default virtual desktop Send ^#{Left} Send ^#{Left} -Process, Close, cmd.exe \ No newline at end of file +Process, Close, cmd.exe +Process, Close, conhost.exe \ No newline at end of file From e5d168de76794ab350926a0b3ca987ab67002dbd Mon Sep 17 00:00:00 2001 From: solomson Date: Sat, 15 Feb 2020 17:36:26 +0100 Subject: [PATCH 064/102] Restructure startup folder --- startup/.gitattributes | 3 --- startup/{ => img}/linux.jpg | Bin startup/{ => img}/pwsh.jpg | Bin startup/{ => img}/terminal_wallpaper_022.jpg | Bin startup/{ => raw}/keybinds.ahk | 0 startup/{ => raw}/profile.ps1 | 0 startup/{ => raw}/profiles.json | 4 ++-- startup/{ => raw}/windowmanager.ahk | 0 startup/{ => script}/boot.cmd | 0 startup/{ => script}/homeboot.cmd | 0 10 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 startup/.gitattributes rename startup/{ => img}/linux.jpg (100%) rename startup/{ => img}/pwsh.jpg (100%) rename startup/{ => img}/terminal_wallpaper_022.jpg (100%) rename startup/{ => raw}/keybinds.ahk (100%) rename startup/{ => raw}/profile.ps1 (100%) rename startup/{ => raw}/profiles.json (96%) rename startup/{ => raw}/windowmanager.ahk (100%) rename startup/{ => script}/boot.cmd (100%) rename startup/{ => script}/homeboot.cmd (100%) diff --git a/startup/.gitattributes b/startup/.gitattributes deleted file mode 100644 index 383883b..0000000 --- a/startup/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -# Auto detect text files and perform LF normalization -*.sh text eol=lf -Dockerfile text eol=lf \ No newline at end of file diff --git a/startup/linux.jpg b/startup/img/linux.jpg similarity index 100% rename from startup/linux.jpg rename to startup/img/linux.jpg diff --git a/startup/pwsh.jpg b/startup/img/pwsh.jpg similarity index 100% rename from startup/pwsh.jpg rename to startup/img/pwsh.jpg diff --git a/startup/terminal_wallpaper_022.jpg b/startup/img/terminal_wallpaper_022.jpg similarity index 100% rename from startup/terminal_wallpaper_022.jpg rename to startup/img/terminal_wallpaper_022.jpg diff --git a/startup/keybinds.ahk b/startup/raw/keybinds.ahk similarity index 100% rename from startup/keybinds.ahk rename to startup/raw/keybinds.ahk diff --git a/startup/profile.ps1 b/startup/raw/profile.ps1 similarity index 100% rename from startup/profile.ps1 rename to startup/raw/profile.ps1 diff --git a/startup/profiles.json b/startup/raw/profiles.json similarity index 96% rename from startup/profiles.json rename to startup/raw/profiles.json index bb67883..72d725c 100644 --- a/startup/profiles.json +++ b/startup/raw/profiles.json @@ -18,7 +18,7 @@ "acrylicOpacity": 1, //"useAcrylic": true, "background": "#000000", - "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\pwsh.jpg", + "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\img\\pwsh.jpg", "backgroundImageOpacity": 0.17, "backgroundImageStechMode": "uniformToFill", "colorScheme": "Campbell", @@ -37,7 +37,7 @@ // Make changes here to the wsl.exe profile "acrylicOpacity": 1, //"useAcrylic": true, - "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\linux.jpg", + "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\img\\linux.jpg", "backgroundImageOpacity": 0.17, "backgroundImageStechMode": "uniformToFill", "guid": "{6f9994f0-4403-5e85-9cce-98e5da3839bb}", diff --git a/startup/windowmanager.ahk b/startup/raw/windowmanager.ahk similarity index 100% rename from startup/windowmanager.ahk rename to startup/raw/windowmanager.ahk diff --git a/startup/boot.cmd b/startup/script/boot.cmd similarity index 100% rename from startup/boot.cmd rename to startup/script/boot.cmd diff --git a/startup/homeboot.cmd b/startup/script/homeboot.cmd similarity index 100% rename from startup/homeboot.cmd rename to startup/script/homeboot.cmd From 529bc6905441a44b1b04b383cf546b5e39db59ba Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Wed, 19 Feb 2020 08:04:48 +0100 Subject: [PATCH 065/102] Increse sleep on startup --- startup/raw/windowmanager.ahk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/startup/raw/windowmanager.ahk b/startup/raw/windowmanager.ahk index 8f41ca6..013cdc1 100644 --- a/startup/raw/windowmanager.ahk +++ b/startup/raw/windowmanager.ahk @@ -10,7 +10,7 @@ WinMove, 3840, 0 ; Chrome on right monitor Run wt `; new-tab -p "powershell" -d C:\appl; new-tab -p "powershell" -d C:\appl; new-tab -p "wsl" -d /mnt/c/appl/repos/sdp-flux; new-tab -p "wsl"; new-tab -p "wsl"; focus-tab -t 0 WinMove, 0, 0 ; Terminal on laptop screen (left) -Sleep 5000 +Sleep 10000 Process, Wait, code.exe WinMaximize @@ -26,7 +26,7 @@ run outlook.exe Process, Wait, outlook.exe WinMaximize -Sleep 5000 +Sleep 9000 ;switch to default virtual desktop Send ^#{Left} From 8c6ac8925a89e73c312e692cc11e8d2f64ec32f8 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Wed, 19 Feb 2020 08:10:42 +0100 Subject: [PATCH 066/102] Fix startup --- startup/raw/profiles.json | 2 +- startup/raw/windowmanager.ahk | 2 +- startup/script/boot.cmd | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/startup/raw/profiles.json b/startup/raw/profiles.json index 72d725c..6948f76 100644 --- a/startup/raw/profiles.json +++ b/startup/raw/profiles.json @@ -8,7 +8,7 @@ "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", - "initialCols": 158, + "initialCols": 128, "initialRows": 38, "windowRestoreMode": "lastPositionAndSize", diff --git a/startup/raw/windowmanager.ahk b/startup/raw/windowmanager.ahk index 013cdc1..417fa1e 100644 --- a/startup/raw/windowmanager.ahk +++ b/startup/raw/windowmanager.ahk @@ -8,7 +8,7 @@ WinMove, 1920, 0 ; Code on left monitor Run chrome.exe google.com portal.azure.com https://github.com/equinor/sdp-flux/tree/dev git.equinor.com https://stackoverflow.com/search?q= youtube.com WinMove, 3840, 0 ; Chrome on right monitor -Run wt `; new-tab -p "powershell" -d C:\appl; new-tab -p "powershell" -d C:\appl; new-tab -p "wsl" -d /mnt/c/appl/repos/sdp-flux; new-tab -p "wsl"; new-tab -p "wsl"; focus-tab -t 0 +Run wt `; new-tab -p "powershell" -d C:\appl; new-tab -p "powershell" -d C:\appl; new-tab -p "Bash"; new-tab -p "Bash"; new-tab -p "Bash"; focus-tab -t 0 WinMove, 0, 0 ; Terminal on laptop screen (left) Sleep 10000 diff --git a/startup/script/boot.cmd b/startup/script/boot.cmd index 09292f4..975d395 100644 --- a/startup/script/boot.cmd +++ b/startup/script/boot.cmd @@ -1,10 +1,10 @@ cd C:\appl\repos\dotfiles git pull -copy ".\startup\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y -copy ".\startup\windowmanager.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y +copy ".\startup\raw\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y +copy ".\startup\raw\windowmanager.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y -copy ".\startup\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y -copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y +copy ".\startup\raw\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y +copy ".\startup\raw\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y exit \ No newline at end of file From 96748d7cd47317d5aaa2211c12627f75095eca30 Mon Sep 17 00:00:00 2001 From: solomson Date: Sat, 7 Mar 2020 11:05:22 +0100 Subject: [PATCH 067/102] Use pwsh 7 and name changes --- CODE_OF_CONDUCT.md | 46 ------------------ auls-paradox | 0 bootstrap/unix-settings.json | 4 +- bootstrap/version.json | 2 +- configurations/alias.sh | 26 ++++++++++ main.sh | 8 +-- .../tools-and-services/localtunnel-service.sh | 2 +- programs/vscode.ps1 | 35 ------------- programs/wsl.ps1 | 2 +- programs/yarn-localtunnel.sh | 2 +- startup/img/terminal_wallpaper_022.jpg | Bin 12507 -> 0 bytes startup/raw/profile.ps1 | 31 +++++++++++- startup/raw/profiles.json | 4 +- startup/raw/windowmanager.ahk | 2 +- startup/script/boot.cmd | 2 +- startup/script/homeboot.cmd | 2 +- 16 files changed, 71 insertions(+), 97 deletions(-) delete mode 100644 CODE_OF_CONDUCT.md create mode 100644 auls-paradox delete mode 100644 programs/vscode.ps1 delete mode 100644 startup/img/terminal_wallpaper_022.jpg diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 08353e0..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at github@gatti.pl. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/auls-paradox b/auls-paradox new file mode 100644 index 0000000..e69de29 diff --git a/bootstrap/unix-settings.json b/bootstrap/unix-settings.json index a33d4b6..0955fae 100644 --- a/bootstrap/unix-settings.json +++ b/bootstrap/unix-settings.json @@ -1,7 +1,7 @@ { "personal": { "name": "Audun L. Solemdal", - "email": "matheusrv@email.com", + "email": "solomson@email.com", "githubuser": "solomson", "defaultfolder": "/mnt/c/appl/Dev" }, @@ -177,7 +177,7 @@ } ], "configurations": { - "debug": "false", + "debug": "true", "purge": "false" } } diff --git a/bootstrap/version.json b/bootstrap/version.json index 9266bd6..9900628 100644 --- a/bootstrap/version.json +++ b/bootstrap/version.json @@ -1,7 +1,7 @@ { "PROTOC_VERSION": "3.5.1", "DOTNET_VERSION": "2.1.4", - "POWERSHELL_VERSION": "6.2.0", + "POWERSHELL_VERSION": "7.0.0", "APACHE_VERSION": "2", "MYSQL_SRV_VERSION": "5.7", "POSTGIS_VERSION": "2.4.4", diff --git a/configurations/alias.sh b/configurations/alias.sh index 7138cab..115c875 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -52,6 +52,17 @@ echo " git commit -m $2 } + function remote(){ + + rawurl = git remote get-url --all origin + url = cut -d '.' -f 2 $rawurl + + branch = git rev-parse --abbrev-ref HEAD + head = git rev-parse --short HEAD + + '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe' $url/tree/$branch, $url/commits/$branch, $url/commit/$head + } + function KCon() { O="sdpaks-$1-k8s" @@ -124,6 +135,8 @@ echo " alias glog="git log --graph --pretty oneline --abbrev-commit --decorate" alias add="gadd" alias com="gcom" + alias clone="git clone" + alias merge="git merge" # Others alias editbash="nano ${HOME}/.bashrc" @@ -201,3 +214,16 @@ echo " alias cmdc="/mnt/c/Windows/System32/cmd.exe /c" } >>"${HOME}"/.zshrc fi + + prompt_k8s(){ + k8s_current_context=$(kubectl config current-context 2> /dev/null) + if [[ $? -eq 0 ]] ; then echo -e "(${k8s_current_context}) "; fi + + IFS='-' read -ra ADDR <<< "$IN" + for i in "${ADDR[@]}"; do + # process "$i" + done + } + + + PS1+='$(prompt_k8s)' \ No newline at end of file diff --git a/main.sh b/main.sh index 027c578..4f31dcc 100644 --- a/main.sh +++ b/main.sh @@ -229,10 +229,10 @@ EOF git config --global user.name "${username}" jq '.personal.name = "'"${username}"'"' "${PREVIOUS_PWD}"/bootstrap/unix-settings.json | sponge "${PREVIOUS_PWD}"/bootstrap/unix-settings.json unset username - printf "\n Your E-Mail (Default: matheusrv@email.com): " + printf "\n Your E-Mail (Default: solomson@email.com): " read -r email if [ -z "${email}" ]; then - email="matheusrv@email.com" + email="solomson@email.com" echo "$email" fi git config --global user.email "${email}" @@ -241,10 +241,10 @@ EOF fi jq '.personal.email = "'"${email}"'"' "${PREVIOUS_PWD}"/bootstrap/unix-settings.json | sponge "${PREVIOUS_PWD}"/bootstrap/unix-settings.json unset email - printf "\n Your GitHub Username (Default: MatheusRV): " + printf "\n Your GitHub Username (Default: solomson): " read -r githubuser if [ -z "${githubuser}" ]; then - githubuser="MatheusRV" + githubuser="solomson" echo "$githubuser" fi jq '.personal.githubuser = "'"${githubuser}"'"' "${PREVIOUS_PWD}"/bootstrap/unix-settings.json | sponge "${PREVIOUS_PWD}"/bootstrap/unix-settings.json diff --git a/programs/tools-and-services/localtunnel-service.sh b/programs/tools-and-services/localtunnel-service.sh index dc1beff..af56571 100644 --- a/programs/tools-and-services/localtunnel-service.sh +++ b/programs/tools-and-services/localtunnel-service.sh @@ -16,7 +16,7 @@ loopFunction(bool) { if [ \"${bool}\" == false ]; then break fi - lt --port 2200 -s matheusrv; + lt --port 2200 -s solomson; sleep 10; done } diff --git a/programs/vscode.ps1 b/programs/vscode.ps1 deleted file mode 100644 index e8f4411..0000000 --- a/programs/vscode.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -cinst -y vscode - -$Extensions = @( - "aaron-bond.better-comments" - "coenraads.bracket-pair-colorizer" - "kamikillerto.vscode-colorize" - "dbaeumer.vscode-eslint" - "davidanson.vscode-markdownlint" - "hookyqr.minify" - "esbenp.prettier-vscode" - "wallabyjs.quokka-vscode" - "ms-vscode-remote.remote-containers" - "ms-vscode-remote.remote-ssh" - "ms-vscode-remote.remote-ssh-edit" - "ms-vscode-remote.remote-ssh-explorer" - "ms-vscode-remote.remote-wsl" - "ms-vscode-remote.vscode-remote-extensionpack" - "ms-vscode-remote.vscode-remote-extensionpack" - "redhat.vscode-yaml" -) - -ForEach ($Extension in $Extensions) { - Write-Output "Instaling $Extension" - code --install-extension $Extension -} - -#code --install-extension EditorConfig.EditorConfig -#code --install-extension vscodevim.vim -#code --install-extension eamodio.gitlens -#code --install-extension gerane.Theme-Paraisodark -#code --install-extension PeterJausovec.vscode-docker -#code --install-extension ms-vscode.PowerShell -#code --install-extension christian-kohler.path-intellisense -#code --install-extension robertohuertasm.vscode-icons -#code --install-extension streetsidesoftware.code-spell-checker \ No newline at end of file diff --git a/programs/wsl.ps1 b/programs/wsl.ps1 index c5a35c9..1dcc895 100644 --- a/programs/wsl.ps1 +++ b/programs/wsl.ps1 @@ -42,7 +42,7 @@ Ubuntu1804 run apt upgrade -y #Ubuntu1804 run usermod -aG sudo $ComputerName #Ubuntu1804 run config --default-user $ComputerName -Ubuntu1804 run 'git clone https://github.com/MatheusRV/dotfiles && chmod 777 -R dotfiles && cd dotfiles && ./install.sh' +Ubuntu1804 run 'git clone https://github.com/solomson/dotfiles && chmod 777 -R dotfiles && cd dotfiles && ./install.sh' $Programs = @( "vcxsrv" diff --git a/programs/yarn-localtunnel.sh b/programs/yarn-localtunnel.sh index 1dc1018..1a0ba65 100644 --- a/programs/yarn-localtunnel.sh +++ b/programs/yarn-localtunnel.sh @@ -10,6 +10,6 @@ hostname="$(jq -r '.programs[] | select(.program=="yarn-localtunnel").hostname' yarn global add localtunnel sudo chmod a+x "${PREVIOUS_PWD}"/programs/tools-and-services/localtunnel-service.sh sudo cp "${PREVIOUS_PWD}"/programs/tools-and-services/localtunnel-service.sh /etc/init.d/localtunnel -sudo sed -i "/lt --port 2200 -s matheusrv;/c\lt --port ${port} -s ${hostname};" /etc/init.d/localtunnel +sudo sed -i "/lt --port 2200 -s solomson;/c\lt --port ${port} -s ${hostname};" /etc/init.d/localtunnel update-rc.d localtunnel defaults diff --git a/startup/img/terminal_wallpaper_022.jpg b/startup/img/terminal_wallpaper_022.jpg deleted file mode 100644 index b98b31ff1e2bf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KKI7L$75*qY%cyNm{6an;NDxfXN?91RWa!Y207GEo-e}5 z1jo|o@V#ILa}XF4Q5E1G5QWJNr20seM{D%LQ-}&LPBt4CD9xq2w1x!s^EQ@k+_O>t z#R3`Xl{?5M_sKX2@*jk3G7?P=d1WD(fHsFsRm#ylWF-QD-k!^l#rtPZC~CkRQ$@|e zY%pK)EH&u1-+f^X@TAWB*rL@X^)vWCTwn^9l*{PgsEE@dz+my>R3PDZF#pr?n5nKs ztEHSupQj%)&G>o@J{ox&Jyhl6C7}qF;Lk(amHb9L8`KbjJdX?J3yE~WMoe~qJ#LTgTRqR+oWZl#8XvO^J50h9|2s_o{iat2 z%37JNiFP?uAADXpG3Vd&&(_a_N3Ji++Gy{L@%>x|E5nr8l-ZX9ZyUllkM> F{{}$fB|88B diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 254ba57..65c8b63 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -1,4 +1,4 @@ -# cp ./startup/profile.ps1 $PSHOME\Profile.ps1 (all users, allhosts) +# cp ./startup/profile.ps1 $PSHOME\Microsoft.PowerShell_profile.ps1 (all users, allhosts) # Default folder $env:HOME = "C:\Appl" @@ -286,6 +286,35 @@ function reset(){ status } +function merge(){ + [CmdletBinding()] + param ( + [Parameter(Mandatory=$true, ParameterSetName="Default", Position=0)] + [string] $Name + ) + git merge $Name +} + +function clone(){ + [CmdletBinding()] + param ( + [Parameter(Mandatory=$true, ParameterSetName="Default", Position=0)] + [string] $Name + ) + git clone $Name +} + +# Open current repo and branch on Github +function remote(){ + + $rawurl = git remote get-url --all origin + $url = $rawurl.Substring(0, $rawurl.lastIndexOf('.')) + + $branch = git rev-parse --abbrev-ref HEAD + $head = git rev-parse --short HEAD + + Start-Process chrome.exe $url/tree/$branch, $url/commits/$branch, $url/commit/$head +} ## Git branch switching New-BashStyleAlias master "git checkout master" diff --git a/startup/raw/profiles.json b/startup/raw/profiles.json index 6948f76..c87adfd 100644 --- a/startup/raw/profiles.json +++ b/startup/raw/profiles.json @@ -14,7 +14,7 @@ "profiles": [ { - // Make changes here to the powershell.exe profile + // Make changes here to the pwsh.exe profile "acrylicOpacity": 1, //"useAcrylic": true, "background": "#000000", @@ -28,7 +28,7 @@ "icon": "ms-appdata:///roaming/pwsh-32.png", "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "PowerShell", - "commandline": "powershell.exe", + "commandline": "pwsh.exe", "padding": "10, 10, 0, 10", "hidden": false, "startingDirectory": "c:/appl/repos" diff --git a/startup/raw/windowmanager.ahk b/startup/raw/windowmanager.ahk index 417fa1e..92564e6 100644 --- a/startup/raw/windowmanager.ahk +++ b/startup/raw/windowmanager.ahk @@ -8,7 +8,7 @@ WinMove, 1920, 0 ; Code on left monitor Run chrome.exe google.com portal.azure.com https://github.com/equinor/sdp-flux/tree/dev git.equinor.com https://stackoverflow.com/search?q= youtube.com WinMove, 3840, 0 ; Chrome on right monitor -Run wt `; new-tab -p "powershell" -d C:\appl; new-tab -p "powershell" -d C:\appl; new-tab -p "Bash"; new-tab -p "Bash"; new-tab -p "Bash"; focus-tab -t 0 +Run wt `; new-tab -p "pwsh" -d C:\appl; new-tab -p "pwsh" -d C:\appl; new-tab -p "Bash"; new-tab -p "Bash"; new-tab -p "Bash"; focus-tab -t 0 WinMove, 0, 0 ; Terminal on laptop screen (left) Sleep 10000 diff --git a/startup/script/boot.cmd b/startup/script/boot.cmd index 975d395..8e6fc1a 100644 --- a/startup/script/boot.cmd +++ b/startup/script/boot.cmd @@ -4,7 +4,7 @@ git pull copy ".\startup\raw\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y copy ".\startup\raw\windowmanager.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y -copy ".\startup\raw\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y +copy ".\startup\raw\profile.ps1" "C:\Program Files\PowerShell\7\Profile.ps1" /Y copy ".\startup\raw\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y exit \ No newline at end of file diff --git a/startup/script/homeboot.cmd b/startup/script/homeboot.cmd index 9407233..edaa809 100644 --- a/startup/script/homeboot.cmd +++ b/startup/script/homeboot.cmd @@ -3,7 +3,7 @@ git pull copy ".\startup\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y -copy ".\startup\profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0\Profile.ps1" /Y +copy ".\startup\raw\profile.ps1" "C:\Program Files\PowerShell\7\Profile.ps1" /Y copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y exit \ No newline at end of file From aa04023b14442d4a45896db1a3739788a77f92d0 Mon Sep 17 00:00:00 2001 From: solomson Date: Sat, 7 Mar 2020 12:48:24 +0100 Subject: [PATCH 068/102] Further improvements and fixes --- auls-paradox | 0 configurations/alias.sh | 1 + startup/raw/profile.ps1 | 17 +++++++++++++++-- startup/raw/windowmanager.ahk | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) delete mode 100644 auls-paradox diff --git a/auls-paradox b/auls-paradox deleted file mode 100644 index e69de29..0000000 diff --git a/configurations/alias.sh b/configurations/alias.sh index 115c875..f677057 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -107,6 +107,7 @@ echo " alias ...="cd ../.." alias ....="cd ../../.." alias .....="cd ../../../.." + alias cl="cd $_" # cd to last argument in previous command #CD to Specific folders diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 65c8b63..b9102ad 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -179,7 +179,7 @@ function FSync() function New-BashStyleAlias([string]$name, [string]$command) { $sb = [scriptblock]::Create($command) - New-Item "Function:\global:$name" -Value $sb | Out-Null + New-Item "Function:\global:$name" -Value $sb -Force | Out-Null } # Quick Folder movement @@ -187,6 +187,7 @@ New-BashStyleAlias .. 'cd ..' New-BashStyleAlias ... "cd ../../" New-BashStyleAlias .... "cd ../../../" New-BashStyleAlias ..... "cd ../../../../" +New-BashStyleAlias cl "cd $$" # cd to last argument of previous folder # CD to Specific folders New-BashStyleAlias home 'cd ~' @@ -307,13 +308,25 @@ function clone(){ # Open current repo and branch on Github function remote(){ + [CmdletBinding()] + param ( + [Parameter(Mandatory=$false, ParameterSetName="Default", Position=0)] + [switch] $Repo, + [Parameter(Mandatory=$false, ParameterSetName="Default", Position=1)] + [switch] $LastCommit + ) + $rawurl = git remote get-url --all origin $url = $rawurl.Substring(0, $rawurl.lastIndexOf('.')) $branch = git rev-parse --abbrev-ref HEAD $head = git rev-parse --short HEAD - Start-Process chrome.exe $url/tree/$branch, $url/commits/$branch, $url/commit/$head + if ($Repo) {$1 = "$url/tree/$branch"} + $2 = "$url/commits/$branch" + if ($LastCommit) {$3 = "$url/commit/$head"} + + Start-Process chrome.exe $1, $2, $3 } ## Git branch switching diff --git a/startup/raw/windowmanager.ahk b/startup/raw/windowmanager.ahk index 92564e6..4253d0c 100644 --- a/startup/raw/windowmanager.ahk +++ b/startup/raw/windowmanager.ahk @@ -20,9 +20,9 @@ Send ^#{Right} ; Opening apps on communication desktop +run outlook.exe Run slack:// run lync.exe ; Skype for Business -run outlook.exe Process, Wait, outlook.exe WinMaximize From 6caf41ec9d651d16c8e6a1c772ce908e7d58a10c Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 12 Mar 2020 15:17:34 +0100 Subject: [PATCH 069/102] Hold ctrl to skip modules import --- startup/raw/profile.ps1 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index b9102ad..67c96ac 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -3,10 +3,17 @@ # Default folder $env:HOME = "C:\Appl" -# Critical Modules -#Import-Module "Terminal-icons" -Set-Theme Paradox +# Hold control to skip import of modules, credit @VladimirReshetnikov +Add-Type -AssemblyName WindowsBase +Add-Type -AssemblyName PresentationCore +if (-not [Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::LeftCtrl)) +{ + # Critical Modules + #Import-Module "Terminal-icons" + Set-Theme Paradox +} + # Alias From c8070250e5fbe99f762b3678e8a97157a7b08888 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Wed, 15 Apr 2020 13:31:49 +0200 Subject: [PATCH 070/102] Test publicity of piepline [skip ci] --- azure-pipelines.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..4cc27ba --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,19 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +trigger: +- master + +pool: + vmImage: 'ubuntu-latest' + +steps: +- script: echo Hello, world! + displayName: 'Run a one-line script' + +- script: | + echo If I am not mistaken, even though this repo is public its contents will not be visible to anyone outside of Equinor. + echo See https://aka.ms/yaml + displayName: 'Run a multi-line script' From 97af70f336bcd9b474381ca84d78713cbb97c30b Mon Sep 17 00:00:00 2001 From: solomson Date: Fri, 24 Apr 2020 19:51:55 +0200 Subject: [PATCH 071/102] remove ssh keybinds --- startup/raw/profile.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 67c96ac..db804c3 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -86,6 +86,10 @@ function KDown($name) kubectl scale deployments -n $n --replicas=0 --all } +$packs = clist -l +$packs | % {$_.split(" ")[0]} | % { choco upgrade $_ -y } + + function KRe($name) { $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String | %{$_.split(" ")[0]} From ef7bcbc37b893f0c3bf9a88d47a3e964bd8fda16 Mon Sep 17 00:00:00 2001 From: solomson Date: Fri, 24 Apr 2020 19:52:26 +0200 Subject: [PATCH 072/102] remove unnecessary azure-pipelines --- azure-pipelines.yml | 19 ------------------- startup/raw/keybinds.ahk | 15 --------------- 2 files changed, 34 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 4cc27ba..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml - -trigger: -- master - -pool: - vmImage: 'ubuntu-latest' - -steps: -- script: echo Hello, world! - displayName: 'Run a one-line script' - -- script: | - echo If I am not mistaken, even though this repo is public its contents will not be visible to anyone outside of Equinor. - echo See https://aka.ms/yaml - displayName: 'Run a multi-line script' diff --git a/startup/raw/keybinds.ahk b/startup/raw/keybinds.ahk index a911b65..9bb117b 100644 --- a/startup/raw/keybinds.ahk +++ b/startup/raw/keybinds.ahk @@ -47,21 +47,6 @@ CapsLock & WheelUp:: return } - -; Save time on ssh commands -IfWinActive, Adminstrator: Windows Powershell -{ - ::ssh::ssh -l auls - return -} - -; Save time on ssh commands -IfWinActive, Adminstrator: Windows Powershell -{ - ::sudo s::sudo su - - return -} - ; Cleanup for calculators #c:: if WinExist("Kalkulator") || if WinExist("Calculator") From f271b53d867ed4e088931742384e75404fbd29b8 Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 21:27:02 +0200 Subject: [PATCH 073/102] profiles: update guids for bouvet machine --- startup/raw/profiles.json | 245 +++++++++++++------------------------- 1 file changed, 82 insertions(+), 163 deletions(-) diff --git a/startup/raw/profiles.json b/startup/raw/profiles.json index c87adfd..4b8de63 100644 --- a/startup/raw/profiles.json +++ b/startup/raw/profiles.json @@ -7,13 +7,20 @@ { "$schema": "https://aka.ms/terminal-profiles-schema", - "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "initialCols": 128, "initialRows": 38, "windowRestoreMode": "lastPositionAndSize", + // Selection + "copyOnSelect": false, + "copyFormatting": true, + "wordDelimiters": " /\\()\"'-.,:;<>~!@#$%^&*|+=[]{}~?\u2502", + "profiles": [ + { + "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", // Make changes here to the pwsh.exe profile "acrylicOpacity": 1, //"useAcrylic": true, @@ -26,43 +33,47 @@ "fontFace": "LiterationMono NF", "fontSize": 16, "icon": "ms-appdata:///roaming/pwsh-32.png", - "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", - "name": "PowerShell", - "commandline": "pwsh.exe", + "name": "PowerShell 7.x", "padding": "10, 10, 0, 10", "hidden": false, - "startingDirectory": "c:/appl/repos" + "startingDirectory": "c:/appl/repos", + "source": "Windows.Terminal.PowershellCore" + }, + { + "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", + "hidden": true // hide bugged ubuntu 18.04 }, { + "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", + "hidden": true // hide CMD + }, + { + "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", + "hidden": true // hide azure cloud shell + }, + + { + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "hidden": true // hide windows powershell + }, + { + "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", + "hidden": false, + "name": "Ubuntu", + "source": "Windows.Terminal.Wsl", // Make changes here to the wsl.exe profile "acrylicOpacity": 1, //"useAcrylic": true, "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\img\\linux.jpg", "backgroundImageOpacity": 0.17, "backgroundImageStechMode": "uniformToFill", - "guid": "{6f9994f0-4403-5e85-9cce-98e5da3839bb}", - "hidden": false, - "name": "Bash", - "source": "Windows.Terminal.Wsl", "padding": "10, 10, 0, 10", "startingDirectory": "/mnt/c/Appl/repos", "colorScheme": "Campbell", "cursorHeight": 25, "fontFace": "Fira Code", "fontSize": 16 - }, - { - "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", - "hidden": false, - "name": "Azure Cloud Shell", - "source": "Windows.Terminal.Azure" - }, - { - "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", - "hidden": false, - "name": "Ubuntu-18.04", - "source": "Windows.Terminal.Wsl" - } + } ], // Add custom color schemes to this array @@ -71,147 +82,55 @@ // Add any keybinding overrides to this array. // To unbind a default keybinding, set the command to "unbound" "keybindings": [ - - { - "command": "splitHorizontal", - "keys": [ "ctrl+shift+up" ] - }, - { - "command": "splitVertical", - "keys": [ "ctrl+shift+right" ] - }, - { - "command": "newTab", - "keys": [ - "ctrl+t" - ] - }, - { - "command": "newTabProfile0", - "keys": [ - "ctrl+shift+1" - ] - }, - { - "command": "newTabProfile1", - "keys": [ - "ctrl+shift+2" - ] - }, - { - "command": "prevTab", - "keys": [ - "ctrl+shift+tab" - ] - }, - { - "command": "nextTab", - "keys": [ - "ctrl+tab" - ] - }, - { - "command": "openSettings", - "keys": [ - "ctrl+," - ] - }, - { - "command": "scrollUp", - "keys": [ - "shift+up" - ] - }, - { - "command": "scrollUpPage", - "keys": [ - "pgup" - ] - }, - { - "command": "switchToTab0", - "keys": [ - "ctrl+1" - ] - }, - { - "command": "switchToTab1", - "keys": [ - "ctrl+2" - ] - }, - { - "command": "switchToTab2", - "keys": [ - "ctrl+3" - ] - }, - { - "command": "switchToTab3", - "keys": [ - "ctrl+4" - ] - }, - { - "command": "switchToTab4", - "keys": [ - "ctrl+5" - ] - }, - { - "command": "switchToTab5", - "keys": [ - "ctrl+6" - ] - }, - { - "command": "switchToTab6", - "keys": [ - "ctrl+7" - ] - }, - { - "command": "switchToTab7", - "keys": [ - "ctrl+8" - ] - }, - { - "command": "moveFocusUp", - "keys": [ "ctrl+alt+up" ] - }, - { - "command": "moveFocusDown", - "keys": [ "ctrl+alt+down" ] - }, - { - "command": "moveFocusLeft", - "keys": [ "ctrl+alt+left" ] - }, - { - "command": "moveFocusRight", - "keys": [ "ctrl+alt+right" ] - }, - { - "command": "resizePaneUp", - "keys": [ "shift+alt+up" ] - }, - { - "command": "resizePaneDown", - "keys": [ "shift+alt+down" ] - }, - { - "command": "resizePaneLeft", - "keys": [ "shift+alt+left" ] - }, - { - "command": "resizePaneRight", - "keys": [ "shift+alt+right" ] - }, - { - "command": "closePane", - "keys": [ "ctrl+w" ] - } + + // Settings + { "command": "openSettings", "keys": "ctrl+," }, + + // Tabs general + { "command": "newTab", "keys": "ctrl+t" }, + { "command": "closePane", "keys": "ctrl+w" }, + { "command": "nextTab", "keys": "ctrl+tab" }, + { "command": "prevTab", "keys": "ctrl+shift+tab" }, + + // Tab switches + { "command": { "action": "switchToTab", "index": 0 }, "keys": "ctrl+1" }, + { "command": { "action": "switchToTab", "index": 1 }, "keys": "ctrl+2" }, + { "command": { "action": "switchToTab", "index": 2 }, "keys": "ctrl+3" }, + { "command": { "action": "switchToTab", "index": 3 }, "keys": "ctrl+4" }, + { "command": { "action": "switchToTab", "index": 4 }, "keys": "ctrl+5" }, + { "command": { "action": "switchToTab", "index": 5 }, "keys": "ctrl+6" }, + { "command": { "action": "switchToTab", "index": 6 }, "keys": "ctrl+7" }, + { "command": { "action": "switchToTab", "index": 7 }, "keys": "ctrl+8" }, + { "command": { "action": "switchToTab", "index": 8 }, "keys": "ctrl+9" }, + + // Clipboard Integration + { "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+shift+c" }, + { "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+insert" }, + { "command": "paste", "keys": "ctrl+shift+v" }, + { "command": "paste", "keys": "shift+insert" }, + + // Split + { "command": { "action": "splitPane", "split": "horizontal" }, "keys": "alt+shift+up" }, + { "command": { "action": "splitPane", "split": "vertical" }, "keys": "alt+shift+right" }, + + // Scrollback + { "command": "scrollDown", "keys": "shift+down" }, + { "command": "scrollDownPage", "keys": "pgdn" }, + { "command": "scrollUp", "keys": "shift+up" }, + { "command": "scrollUpPage", "keys": "pgup" }, + + // Focus + { "command": { "action": "moveFocus", "direction": "down" }, "keys": "alt+down" }, + { "command": { "action": "moveFocus", "direction": "left" }, "keys": "alt+left" }, + { "command": { "action": "moveFocus", "direction": "right" }, "keys": "alt+right" }, + { "command": { "action": "moveFocus", "direction": "up" }, "keys": "alt+up" }, + + // Resize pane + { "command": { "action": "resizePane", "direction": "down" }, "keys": "alt+shift+down" }, + { "command": { "action": "resizePane", "direction": "left" }, "keys": "alt+shift+left" }, + { "command": { "action": "resizePane", "direction": "right" }, "keys": "alt+shift+right" }, + { "command": { "action": "resizePane", "direction": "up" }, "keys": "alt+shift+up" } + ] } \ No newline at end of file From e4a866f5f0eef3b41fa066269c6f7259f2c5af43 Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 21:27:21 +0200 Subject: [PATCH 074/102] rename profiles.json to settings.json --- startup/raw/{profiles.json => settings.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename startup/raw/{profiles.json => settings.json} (100%) diff --git a/startup/raw/profiles.json b/startup/raw/settings.json similarity index 100% rename from startup/raw/profiles.json rename to startup/raw/settings.json From 0a41fc46448c20240feb777274f72ac361a1539d Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 21:32:19 +0200 Subject: [PATCH 075/102] startup: update references --- startup/raw/profile.ps1 | 5 +---- startup/script/boot.cmd | 2 +- startup/script/homeboot.cmd | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index db804c3..928b1b0 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -1,4 +1,4 @@ -# cp ./startup/profile.ps1 $PSHOME\Microsoft.PowerShell_profile.ps1 (all users, allhosts) +# cp ./startup/raw/profile.ps1 $PROFILE.AllUsersAllHosts # Default folder $env:HOME = "C:\Appl" @@ -86,9 +86,6 @@ function KDown($name) kubectl scale deployments -n $n --replicas=0 --all } -$packs = clist -l -$packs | % {$_.split(" ")[0]} | % { choco upgrade $_ -y } - function KRe($name) { diff --git a/startup/script/boot.cmd b/startup/script/boot.cmd index 8e6fc1a..10484ed 100644 --- a/startup/script/boot.cmd +++ b/startup/script/boot.cmd @@ -5,6 +5,6 @@ copy ".\startup\raw\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y copy ".\startup\raw\windowmanager.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y copy ".\startup\raw\profile.ps1" "C:\Program Files\PowerShell\7\Profile.ps1" /Y -copy ".\startup\raw\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y +copy ".\startup\raw\settings.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" /Y exit \ No newline at end of file diff --git a/startup/script/homeboot.cmd b/startup/script/homeboot.cmd index edaa809..5268689 100644 --- a/startup/script/homeboot.cmd +++ b/startup/script/homeboot.cmd @@ -4,6 +4,6 @@ git pull copy ".\startup\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y copy ".\startup\raw\profile.ps1" "C:\Program Files\PowerShell\7\Profile.ps1" /Y -copy ".\startup\profiles.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json" /Y +copy ".\startup\raw\settings.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" /Y exit \ No newline at end of file From 8355989b70f168d452e74c44767017a6c32e0e14 Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 21:34:17 +0200 Subject: [PATCH 076/102] settings.json: reorder --- startup/raw/settings.json | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/startup/raw/settings.json b/startup/raw/settings.json index 4b8de63..034b257 100644 --- a/startup/raw/settings.json +++ b/startup/raw/settings.json @@ -39,23 +39,6 @@ "startingDirectory": "c:/appl/repos", "source": "Windows.Terminal.PowershellCore" }, - { - "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", - "hidden": true // hide bugged ubuntu 18.04 - }, - { - "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", - "hidden": true // hide CMD - }, - { - "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", - "hidden": true // hide azure cloud shell - }, - - { - "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", - "hidden": true // hide windows powershell - }, { "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", "hidden": false, @@ -73,6 +56,22 @@ "cursorHeight": 25, "fontFace": "Fira Code", "fontSize": 16 + }, + { + "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", + "hidden": true // hide bugged ubuntu 18.04 + }, + { + "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", + "hidden": true // hide CMD + }, + { + "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", + "hidden": true // hide azure cloud shell + }, + { + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "hidden": true // hide windows powershell } ], From 2c62eb06202f7824ff3e8d830f40212c0ef5f4d6 Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 21:43:22 +0200 Subject: [PATCH 077/102] profile: Add -NoEmphasis to grep for pwsh 7 Since pwsh 7.0 grep highlights found keywords, which is nice, but when passing as argument the rich text output does not get interpretated correctly. --- startup/raw/profile.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 928b1b0..0967223 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -64,7 +64,7 @@ function Get-AKSCredentials() function HelmDel($name) { - $m = helm ls | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String + $m = helm ls | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String # $n = $m -replace '(^\s+|\s+$)','' -replace '\s+',' ' | %{$_.split(" ")[10]} helm del --purge $name @@ -72,7 +72,7 @@ function HelmDel($name) function KUp($name) { - $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String | %{$_.split(" ")[0]} + $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String | %{$_.split(" ")[0]} $n = $m.Substring(2) kubectl scale deployments -n $n --replicas=1 --all @@ -80,7 +80,7 @@ function KUp($name) function KDown($name) { - $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String | %{$_.split(" ")[0]} + $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String | %{$_.split(" ")[0]} $n = $m.Substring(2) kubectl scale deployments -n $n --replicas=0 --all @@ -89,7 +89,7 @@ function KDown($name) function KRe($name) { - $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -CaseSensitive | Out-String | %{$_.split(" ")[0]} + $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String | %{$_.split(" ")[0]} $n = $m.Substring(2) kubectl scale deployments -n $n --replicas=0 --all From 4bff873fc5ae81e66866f8f89f786cdc7b3a636d Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 21:50:26 +0200 Subject: [PATCH 078/102] profile: fix remote function Some repos have an upstream ending with .git, while some don't. We need to validate before doing string manipulation. --- startup/raw/profile.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 0967223..e081ae6 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -325,8 +325,17 @@ function remote(){ ) $rawurl = git remote get-url --all origin + + if ($rawurl -like "*.git") + + { $url = $rawurl.Substring(0, $rawurl.lastIndexOf('.')) + } + else { + $url = $rawurl + } + $branch = git rev-parse --abbrev-ref HEAD $head = git rev-parse --short HEAD From 0491841ebcfc191691377211aeaf5198f2748925 Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 21:52:28 +0200 Subject: [PATCH 079/102] profile: add extra aliases --- startup/raw/profile.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index e081ae6..a41bbf7 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -206,6 +206,7 @@ New-BashStyleAlias certs 'cd c:/appl/certs' New-BashStyleAlias dotfiles 'cd c:/appl/repos/dotfiles' New-BashStyleAlias sdp-flux 'cd c:/appl/repos/sdp-flux' New-BashStyleAlias sdp-aks 'cd c:/appl/repos/sdp-aks' +New-BashStyleAlias environments 'cd c:/appl/repos/environments' Set-Alias flux sdp-flux Set-Alias aks sdp-aks @@ -350,6 +351,8 @@ function remote(){ New-BashStyleAlias master "git checkout master" New-BashStyleAlias prod "git checkout prod" New-BashStyleAlias dev "git checkout dev" +New-BashStyleAlias production "git checkout production" +New-BashStyleAlias development "git checkout development" # Others New-BashStyleAlias editgit "code %homepath%/.gitconfig" # ~ not working From c41f7c8c3d358d4d67e39e75f6bdef236cbe4bf8 Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 21:59:09 +0200 Subject: [PATCH 080/102] profile: fix git stash pop --- startup/raw/profile.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index a41bbf7..fdb64e4 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -217,7 +217,7 @@ New-BashStyleAlias gdiff "git diff" New-BashStyleAlias branch "git branch -a" New-BashStyleAlias status "git status" New-BashStyleAlias stash "git stash" -New-BashStyleAlias pop "git pop" +New-BashStyleAlias pop "git stash pop" New-BashStyleAlias reset "git reset --soft" New-BashStyleAlias fetch "git fetch" New-BashStyleAlias push "git push origin head" From 1d41a97952d7de2644d964ad0a562be969c33733 Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 21:59:50 +0200 Subject: [PATCH 081/102] profile: fix glog alias --- startup/raw/profile.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index fdb64e4..f51ec77 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -223,7 +223,7 @@ New-BashStyleAlias fetch "git fetch" New-BashStyleAlias push "git push origin head" New-BashStyleAlias pull "git pull" New-BashStyleAlias recent "git for-each-ref --sort -committerdate refs/heads/" -New-BashStyleAlias glog "git log --graph --pretty oneline --abbrev-commit --decorate" +New-BashStyleAlias glog "git log --graph --pretty --oneline --abbrev-commit --decorate" # Speical commands From 2d6e4c0e3d3c8e050cd049eb01e18671561327d1 Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 22:00:54 +0200 Subject: [PATCH 082/102] profile: remove unused function --- startup/raw/profile.ps1 | 8 -------- 1 file changed, 8 deletions(-) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index f51ec77..de6602f 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -146,14 +146,6 @@ function docup(){ Set-Alias doup docup -function dops(){ - [CmdletBinding()] - param ( - [string] $name - ) - docker ps -} - function docdown(){ [CmdletBinding()] param ( From b9f8223560b607232828ec16ae7a72b8cf07d7a5 Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 22:07:26 +0200 Subject: [PATCH 083/102] settings.json: avoid binding conflicts --- startup/raw/settings.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/startup/raw/settings.json b/startup/raw/settings.json index 034b257..6e8b211 100644 --- a/startup/raw/settings.json +++ b/startup/raw/settings.json @@ -111,6 +111,8 @@ // Split { "command": { "action": "splitPane", "split": "horizontal" }, "keys": "alt+shift+up" }, { "command": { "action": "splitPane", "split": "vertical" }, "keys": "alt+shift+right" }, + { "command": { "action": "splitPane", "split": "horizontal" }, "keys": "alt+shift+down" }, + { "command": { "action": "splitPane", "split": "vertical" }, "keys": "alt+shift+left" }, // Scrollback { "command": "scrollDown", "keys": "shift+down" }, @@ -125,10 +127,10 @@ { "command": { "action": "moveFocus", "direction": "up" }, "keys": "alt+up" }, // Resize pane - { "command": { "action": "resizePane", "direction": "down" }, "keys": "alt+shift+down" }, - { "command": { "action": "resizePane", "direction": "left" }, "keys": "alt+shift+left" }, - { "command": { "action": "resizePane", "direction": "right" }, "keys": "alt+shift+right" }, - { "command": { "action": "resizePane", "direction": "up" }, "keys": "alt+shift+up" } + { "command": { "action": "resizePane", "direction": "down" }, "keys": "ctrl+shift+down" }, + { "command": { "action": "resizePane", "direction": "left" }, "keys": "ctrl+shift+left" }, + { "command": { "action": "resizePane", "direction": "right" }, "keys": "ctrl+shift+right" }, + { "command": { "action": "resizePane", "direction": "up" }, "keys": "ctrl+shift+up" } ] } From 81e2b146a3d4665bf6655d84fed92cd414c053e0 Mon Sep 17 00:00:00 2001 From: solomson Date: Thu, 7 May 2020 22:37:59 +0200 Subject: [PATCH 084/102] profile: add clip last command --- startup/raw/profile.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index de6602f..5018d52 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -379,4 +379,10 @@ function dirs { Get-ChildItem -Recurse | Foreach-Object FullName } +} + +function cc { + + Invoke-History | Set-Clipboard + } \ No newline at end of file From 341ced60d9b33135b863aa405f914082a6714c51 Mon Sep 17 00:00:00 2001 From: solomson Date: Mon, 11 May 2020 10:30:39 +0200 Subject: [PATCH 085/102] profiles: new sub --- configurations/alias.sh | 2 +- startup/raw/profile.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configurations/alias.sh b/configurations/alias.sh index f677057..aa12c6c 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -20,7 +20,7 @@ echo " function Set-AzSub() { - az account set --subscription "SDP Tools" + az account set --subscription "S942-SDP-Tools" } function kexec(){ diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 5018d52..3d14c3d 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -41,7 +41,7 @@ function AzLogin() function Set-AzSub() { - az account set --subscription "SDP Tools" + az account set --subscription "S942-SDP-Tools" } function Get-AzRgContent($rgname) From e3cb3993d84f9ff4bfbf4e2a5de2da0ef2180893 Mon Sep 17 00:00:00 2001 From: "Audun L. Solemdal" Date: Tue, 9 Jun 2020 13:39:38 +0200 Subject: [PATCH 086/102] set psreadline option --- startup/raw/profile.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 3d14c3d..e0a63f6 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -14,6 +14,7 @@ if (-not [Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::LeftCtr Set-Theme Paradox } +Set-PSReadLineOption -PredictionSource History # Alias From 930cafa55992925da93be0cb718bace2219cf775 Mon Sep 17 00:00:00 2001 From: solomson Date: Fri, 12 Jun 2020 11:07:38 +0200 Subject: [PATCH 087/102] profile: set which alias for get-command --- startup/raw/profile.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 3d14c3d..66d4050 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -22,6 +22,7 @@ Set-Alias d docker Set-Alias doc docker-compose Set-Alias k kubectl.exe Set-Alias he helm.exe +New-Alias which get-command # Bash functionality From 7d268bb2760e399e16da29c8bfbd66e58e86daf7 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Wed, 15 Jul 2020 12:46:34 +0200 Subject: [PATCH 088/102] Create merge-schedule.yml --- .github/workflows/merge-schedule.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/merge-schedule.yml diff --git a/.github/workflows/merge-schedule.yml b/.github/workflows/merge-schedule.yml new file mode 100644 index 0000000..3bca1da --- /dev/null +++ b/.github/workflows/merge-schedule.yml @@ -0,0 +1,17 @@ +name: Merge Schedule +on: + pull_request: + types: + - opened + - edited + schedule: + # To activate, add "/schedule YYYY-MM-DD" in the bottom of your PR's description + - cron: 30 1 * * * + +jobs: + merge_schedule: + runs-on: ubuntu-latest + steps: + - uses: gr2m/merge-schedule-action@v1.x + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0487c29005adcc92b16e599ed2b87d7719175a03 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Wed, 15 Jul 2020 12:50:59 +0200 Subject: [PATCH 089/102] Update merge-schedule.yml --- .github/workflows/merge-schedule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-schedule.yml b/.github/workflows/merge-schedule.yml index 3bca1da..46ed6bf 100644 --- a/.github/workflows/merge-schedule.yml +++ b/.github/workflows/merge-schedule.yml @@ -6,7 +6,7 @@ on: - edited schedule: # To activate, add "/schedule YYYY-MM-DD" in the bottom of your PR's description - - cron: 30 1 * * * + - cron: 55 * * * * jobs: merge_schedule: From b7e9ee53fec5acd9c82a27a81158b99e84059fd4 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Tue, 4 Aug 2020 14:00:46 +0200 Subject: [PATCH 090/102] Delete merge-schedule.yml --- .github/workflows/merge-schedule.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .github/workflows/merge-schedule.yml diff --git a/.github/workflows/merge-schedule.yml b/.github/workflows/merge-schedule.yml deleted file mode 100644 index 46ed6bf..0000000 --- a/.github/workflows/merge-schedule.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Merge Schedule -on: - pull_request: - types: - - opened - - edited - schedule: - # To activate, add "/schedule YYYY-MM-DD" in the bottom of your PR's description - - cron: 55 * * * * - -jobs: - merge_schedule: - runs-on: ubuntu-latest - steps: - - uses: gr2m/merge-schedule-action@v1.x - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 27b55dfdf65df4038076acc8502eef74766d95df Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Fri, 28 Aug 2020 16:02:47 +0200 Subject: [PATCH 091/102] terminal/settings: enable new features --- startup/raw/settings.json | 43 ++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/startup/raw/settings.json b/startup/raw/settings.json index 6e8b211..0e3c309 100644 --- a/startup/raw/settings.json +++ b/startup/raw/settings.json @@ -11,6 +11,7 @@ "initialCols": 128, "initialRows": 38, "windowRestoreMode": "lastPositionAndSize", + "useTabSwitcher": true, // Selection "copyOnSelect": false, @@ -31,7 +32,7 @@ "colorScheme": "Campbell", "cursorHeight": 25, "fontFace": "LiterationMono NF", - "fontSize": 16, + "fontSize": 15, "icon": "ms-appdata:///roaming/pwsh-32.png", "name": "PowerShell 7.x", "padding": "10, 10, 0, 10", @@ -39,24 +40,6 @@ "startingDirectory": "c:/appl/repos", "source": "Windows.Terminal.PowershellCore" }, - { - "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", - "hidden": false, - "name": "Ubuntu", - "source": "Windows.Terminal.Wsl", - // Make changes here to the wsl.exe profile - "acrylicOpacity": 1, - //"useAcrylic": true, - "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\img\\linux.jpg", - "backgroundImageOpacity": 0.17, - "backgroundImageStechMode": "uniformToFill", - "padding": "10, 10, 0, 10", - "startingDirectory": "/mnt/c/Appl/repos", - "colorScheme": "Campbell", - "cursorHeight": 25, - "fontFace": "Fira Code", - "fontSize": 16 - }, { "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", "hidden": true // hide bugged ubuntu 18.04 @@ -72,6 +55,24 @@ { "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "hidden": true // hide windows powershell + }, + { + "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", + "hidden": false, + "name": "Ubuntu-20.04", + "source": "Windows.Terminal.Wsl", + // Make changes here to the wsl.exe profile + "acrylicOpacity": 1, + //"useAcrylic": true, + "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\img\\linux.jpg", + "backgroundImageOpacity": 0.17, + "backgroundImageStechMode": "uniformToFill", + "padding": "10, 10, 0, 10", + "startingDirectory": "/mnt/c/Appl/repos", + "colorScheme": "Campbell", + "cursorHeight": 25, + "fontFace": "mesloLGS NF", + "fontSize": 15 } ], @@ -84,6 +85,10 @@ // Settings { "command": "openSettings", "keys": "ctrl+," }, + { "command": "commandPalette", "keys": "ctrl+shift+p" }, + { "command": "toggleFocusMode", "keys": "alt+f" }, + { "command": { "action": "setTabColor", "color": "#ffffff" }, "keys": "ctrl+a" }, + { "command": "toggleRetroEffect", "keys": "ctrl+d" }, // Tabs general { "command": "newTab", "keys": "ctrl+t" }, From 76b3dbddd87c51fb6a2233a722588e2ad3b41d7f Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Fri, 30 Oct 2020 16:12:55 +0100 Subject: [PATCH 092/102] add winget --- startup/raw/{ => terminal}/settings.json | 0 startup/raw/winget/settings.json | 10 ++++++++++ 2 files changed, 10 insertions(+) rename startup/raw/{ => terminal}/settings.json (100%) create mode 100644 startup/raw/winget/settings.json diff --git a/startup/raw/settings.json b/startup/raw/terminal/settings.json similarity index 100% rename from startup/raw/settings.json rename to startup/raw/terminal/settings.json diff --git a/startup/raw/winget/settings.json b/startup/raw/winget/settings.json new file mode 100644 index 0000000..2ebb9e2 --- /dev/null +++ b/startup/raw/winget/settings.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://aka.ms/winget-settings.schema.json", + + "experimentalFeatures": { + "experimentalCmd": true, + "experimentalArg": true, + "list": true, + "upgrade": true + }, +} \ No newline at end of file From 95125031d440bac6868bf1cbd7e788be0f6f0228 Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Mon, 16 Nov 2020 07:41:31 +0100 Subject: [PATCH 093/102] Update PSReadLine option --- startup/raw/profile.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index ca58739..1aec411 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -14,7 +14,7 @@ if (-not [Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::LeftCtr Set-Theme Paradox } -Set-PSReadLineOption -PredictionSource History +Set-PSReadLineOption -PredictionSource HistoryAndPlugin # Alias From 97adf0b5da2e05561f801952c2a2c87f8b7529bc Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Thu, 19 Nov 2020 14:01:40 +0100 Subject: [PATCH 094/102] ps1: re-enable temrinal-icons --- startup/raw/profile.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 1aec411..69cf32b 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -10,7 +10,7 @@ Add-Type -AssemblyName PresentationCore if (-not [Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::LeftCtrl)) { # Critical Modules - #Import-Module "Terminal-icons" + Import-Module "Terminal-icons" Set-Theme Paradox } From 210ff4a0e738d0f3f317aaebdc27450dbbc96b04 Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Thu, 14 Jan 2021 23:30:58 +0100 Subject: [PATCH 095/102] keybinds: replace win+c --- startup/raw/keybinds.ahk | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/startup/raw/keybinds.ahk b/startup/raw/keybinds.ahk index 9bb117b..6daddfb 100644 --- a/startup/raw/keybinds.ahk +++ b/startup/raw/keybinds.ahk @@ -47,21 +47,6 @@ CapsLock & WheelUp:: return } -; Cleanup for calculators -#c:: -if WinExist("Kalkulator") || if WinExist("Calculator") -{ - WinActivate ; Automatically uses the window found above. - Send, {Escape} - Send, {Enter} - return -} -else -{ - ; Run, calc.exe - return -} - #n:: if WinExist("Untitled - Notepad") || if WinExist("*Untitled - Notepad") { @@ -84,4 +69,10 @@ RCtrl:: { Click Return -} \ No newline at end of file +} + +#c:: + Send ^c + ClipWait + Clipboard:=Clipboard "" +Return \ No newline at end of file From b9239f6f184ff6af7af77bbbb81e0d51fd0060bf Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Fri, 29 Jan 2021 00:05:21 +0100 Subject: [PATCH 096/102] remove always on top keybind --- startup/raw/keybinds.ahk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/startup/raw/keybinds.ahk b/startup/raw/keybinds.ahk index 6daddfb..058ca71 100644 --- a/startup/raw/keybinds.ahk +++ b/startup/raw/keybinds.ahk @@ -9,10 +9,6 @@ return CapsLock & p::Suspend ; return -; Always on Top -^SPACE:: Winset, Alwaysontop, , A ; ctrl + space -Return - ; Google Search highlighted text CapsLock & Space:: { From 6e46313525f50d9068b629f8f2a1e9adc2467aae Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Thu, 2 Sep 2021 20:20:54 +0200 Subject: [PATCH 097/102] garbage collection --- configurations/alias.sh | 279 +++++++++-------------------- configurations/git/alias-git.sh | 45 ++--- startup/raw/profile.ps1 | 2 +- startup/raw/terminal/settings.json | 19 +- startup/script/homeboot.cmd | 5 +- 5 files changed, 124 insertions(+), 226 deletions(-) diff --git a/configurations/alias.sh b/configurations/alias.sh index aa12c6c..3e8c12f 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -8,205 +8,86 @@ fi defaultfolder="$(jq -r ".personal.defaultfolder" "${PREVIOUS_PWD}"/bootstrap/unix-settings.json)" echo " - # Extra to path - PATH=$PATH:~/path - - # Custom functions - - function AzLogin() - { - az login - } - - function Set-AzSub() - { - az account set --subscription "S942-SDP-Tools" - } - - function kexec(){ - kubectl exec -it $1 bash - } - - function dexec(){ - docker exec -it $1 bash - } - function docup(){ - docker-compose up -d $1 - } - function docdown(){ - docker-compose down $1 - } - - # git functions - - function com(){ - git commit -m $1 - } - - function gadd(){ - git add $1 - } - - function acom(){ - git add $1 - git commit -m $2 - } - - function remote(){ - - rawurl = git remote get-url --all origin - url = cut -d '.' -f 2 $rawurl - - branch = git rev-parse --abbrev-ref HEAD - head = git rev-parse --short HEAD - - '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe' $url/tree/$branch, $url/commits/$branch, $url/commit/$head - } - - function KCon() - { - O="sdpaks-$1-k8s" - kubectl config use-context $O - - if [ $? -eq 0 ]; then - echo "Currently in $1 cluster" - fi - } - - function KNs() - { - # always returns true.. need workaround - kubectl config set-context --current --namespace=$1 - - if [ $? -eq 0 ]; then - CON=$(kubectl config current-context) - echo "Currently at $1 namespace in $CON cluster" - fi - } - - alias kns="KNs" - alias kcon="KCon" - - # ALIASES - # container aliases - alias d="docker" - alias doc="docker-compose" - alias k="kubectl" - #alias fsync ="fluxctl sync --k8s-fwd-ns flux" - - - # ls aliases - alias la="ls -al" - alias ls="ls -h --color --group-directories-first" # flat view w/ directories first - alias l="ls -h --color --group-directories-first" # same as above - alias ll="ls -lv --group-directories-first" # non-flat view - alias lm="ll | more" - - # Quick parent-directory aliases - alias ..="cd .." - alias ...="cd ../.." - alias ....="cd ../../.." - alias .....="cd ../../../.." - alias cl="cd $_" # cd to last argument in previous command - - #CD to Specific folders - - alias home="cd ~" - alias appl="cd /mnt/c/appl" - alias repos="cd /mnt/c/appl/repos" - alias progs="cd /mnt/c/appl/progs" - alias certs="cd /mnt/c/appl/certs" - alias dotfiles="cd /mnt/c/appl/repos/dotfiles" - alias sdp-flux="cd /mnt/c/appl/repos/sdp-flux" - alias sdp-aks="cd /mnt/c/appl/repos/sdp-aks" - alias flux="cd /mnt/c/appl/repos/sdp-flux" - alias aks="cd /mnt/c/appl/repos/sdp-aks" - - # Git commands - alias log="git log --oneline" - alias gdiff="git diff" - alias branch="git branch -a" - alias status="git status" - alias reset="git reset --soft" - alias fetch="git fetch" - alias stash="git stash" - alias push="git push origin head" - alias pull="git pull" - alias recent="git for-each-ref --sort -committerdate refs/heads/" - alias glog="git log --graph --pretty oneline --abbrev-commit --decorate" - alias add="gadd" - alias com="gcom" - alias clone="git clone" - alias merge="git merge" - - # Others - alias editbash="nano ${HOME}/.bashrc" - alias editzsh="nano ${HOME}/.zshrc" - alias editba="nano ${HOME}/.bash_aliases" - alias resource="source ${HOME}/.bashrc" - alias hosts="nano /mnt/c/Windows/System32/drivers/etc/hosts" - alias code="code ." - alias np="cmd.exe /c notepad" - - #NetWork - alias ip="curl ipinfo.io/ip" - alias ips="ifconfig -a | perl -nle'/(d+.d+.d+.d+)/ && print $1'" - alias speedtest="wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test100.zip" - - # Handy Extract Program - function extract() - { - if [ -f $1 ] ; then - case $1 in - *.tar.bz2) tar xvjf $1 ;; - *.tar.gz) tar xvzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar x $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xvf $1 ;; - *.tbz2) tar xvjf $1 ;; - *.tgz) tar xvzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1 ;; - *.7z) 7z x $1 ;; - *) echo "'$1' cannot be extracted via >extract<" ;; - esac - else - echo "'$1' is not a valid file!" - fi - } - - - # Make Dir and CD to it - function mcd () - { - mkdir -p $1 - cd $1 - } - - # Switch a File or Folder - function swap() - { - if [ ! -z "$2" ] && [ -e "$1" ] && [ -e "$2" ] && ! [ "$1" -ef "$2" ] && (([ -f "$1" ] && [ -f "$2" ]) || ([ -d "$1" ] && [ -d "$2" ])) ; then - tmp=$(mktemp -d $(dirname "$1")/XXXXXX) - mv "$1" "$tmp" && mv "$2" "$1" && mv "$tmp"/"$1" "$2" - rmdir "$tmp" - else - echo "Usage: swap file1 file2 or swap dir1 dir2" - fi - } - - # Creates an archive (*.tar.gz) from given directory. - function maketar() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; } - - # Create a ZIP archive of a file or folder. - function makezip() { zip -r "${1%%/}.zip" "$1" ; } - - # Make your directories and files access rights sane. - function sanitize() { chmod -R u=rwX,g=rX,o= "$@" ;} - - cd ${defaultfolder} - " >>"${HOME}"/.zshrc +# Extra to path +PATH=$PATH:~/path + +# Custom functions + +# git functions + +function com(){ + git commit -m $1 +} + +function gadd(){ + git add $1 +} + +function acom(){ + git add $1 + git commit -m $2 +} + +# ALIASES +# container aliases +alias d="docker" +alias doc="docker-compose" +alias k="kubectl" +#alias fsync ="fluxctl sync --k8s-fwd-ns flux" + + +# ls aliases +alias la="ls -al" +alias ls="ls -h --color --group-directories-first" # flat view w/ directories first +alias l="ls -h --color --group-directories-first" # same as above +alias ll="ls -lv --group-directories-first" # non-flat view +alias lm="ll | more" + +# Quick parent-directory aliases +alias ..="cd .." +alias ...="cd ../.." +alias ....="cd ../../.." +alias .....="cd ../../../.." +alias cl="cd $_" # cd to last argument in previous command + +#CD to Specific folders + +alias home="cd ~" +alias appl="cd /mnt/c/appl" +alias repos="cd /mnt/c/appl/repos" +alias progs="cd /mnt/c/appl/progs" +alias certs="cd /mnt/c/appl/certs" +alias dotfiles="cd /mnt/c/appl/repos/dotfiles" +alias kne="cd /mnt/c/appl/repos/Dhhr.Kneik" +alias kneik="cd /mnt/c/appl/repos/Dhhr.Kneik" + +# Git commands +alias log="git log --oneline" +alias gdiff="git diff" +alias branch="git branch -a" +alias status="git status" +alias reset="git reset --soft" +alias fetch="git fetch" +alias stash="git stash" +alias push="git push origin head" +alias pull="git pull" +alias recent="git for-each-ref --sort -committerdate refs/heads/" +alias glog="git log --graph --pretty oneline --abbrev-commit --decorate" +alias add="gadd" +alias com="gcom" +alias clone="git clone" +alias merge="git merge" + +# Others +alias editbash="nano ${HOME}/.bashrc" +alias editzsh="nano ${HOME}/.zshrc" +alias editba="nano ${HOME}/.bash_aliases" +alias resource="source ${HOME}/.bashrc" +alias hosts="nano /mnt/c/Windows/System32/drivers/etc/hosts" +alias code="code ." +alias np="cmd.exe /c notepad" + +" >>"${HOME}"/.zshrc if [[ ! "$(uname -r)" =~ "Microsoft$" ]]; then { diff --git a/configurations/git/alias-git.sh b/configurations/git/alias-git.sh index f04dd45..23942f0 100644 --- a/configurations/git/alias-git.sh +++ b/configurations/git/alias-git.sh @@ -11,29 +11,30 @@ fi git branch 2>/dev/null | sed -e "/^[^*]/d" -e "s/* \(.*\)/ (\1)/" } - # Make Git branch a variable - branch="$(git branch | sed -n -e "s/^\* \(.*\)/\1/p")" +# Make Git branch a variable +branch="$(git branch | sed -n -e "s/^\* \(.*\)/\1/p")" - # Git commands - alias log="git log" - alias wut='git log master...${branch} --oneline' - alias diff="git diff" - alias branch="git branch" - alias status="git status" - alias fetch="git fetch" - alias push="git push origin head" - alias pull="git pull" - alias recent="git for-each-ref --sort=-committerdate refs/heads/" - alias branch_new="git for-each-ref --sort=-committerdate refs/heads/ --format=%(refname:short)" - alias gadd="git add -A" - alias gl="git log --graph --pretty=oneline --abbrev-commit --decorate" +# Git commands +alias log="git log" +alias wut='git log master...${branch} --oneline' +alias diff="git diff" +alias branch="git branch" +alias status="git status" +alias fetch="git fetch" +alias push="git push origin head" +alias pull="git pull" +alias recent="git for-each-ref --sort=-committerdate refs/heads/" +alias branch_new="git for-each-ref --sort=-committerdate refs/heads/ --format=%(refname:short)" +alias gadd="git add -A" +alias gl="git log --graph --pretty=oneline --abbrev-commit --decorate" - ## Git branch switching - alias master="git co master" - alias prod="git co prod" - alias dev="git co dev" - alias ghp="git co gh-pages" +## Git branch switching +alias master="git co master" +alias master="git co main" +alias prod="git co prod" +alias dev="git co dev" +alias ghp="git co gh-pages" - # Others - alias editgit="code ~/.gitconfig" +# Others +alias editgit="code ~/.gitconfig" } >>"${HOME}"/./bashrc diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 69cf32b..5e0be48 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -11,7 +11,7 @@ if (-not [Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::LeftCtr { # Critical Modules Import-Module "Terminal-icons" - Set-Theme Paradox + Set-PoshPrompt Paradox } Set-PSReadLineOption -PredictionSource HistoryAndPlugin diff --git a/startup/raw/terminal/settings.json b/startup/raw/terminal/settings.json index 0e3c309..c52b722 100644 --- a/startup/raw/terminal/settings.json +++ b/startup/raw/terminal/settings.json @@ -7,7 +7,7 @@ { "$schema": "https://aka.ms/terminal-profiles-schema", - "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", + "defaultProfile": "{b091671b-cbd8-4bf4-86e8-55f57173be34}", "initialCols": 128, "initialRows": 38, "windowRestoreMode": "lastPositionAndSize", @@ -73,6 +73,23 @@ "cursorHeight": 25, "fontFace": "mesloLGS NF", "fontSize": 15 + }, + + { + "guid": "{b091671b-cbd8-4bf4-86e8-55f57173be34}", + "background": "#000000", + "backgroundImage": "C:\\Appl\\Repos\\dotfiles\\startup\\img\\pwsh.jpg", + "backgroundImageOpacity": 0.17, + "commandline": "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe", + "icon": "ms-appx:///ProfileIcons/pwsh-preview.png", + "name": "PowerShell 7 Preview", + "padding": "10, 10, 0, 10", + "hidden": false, + "startingDirectory": "c:/appl/repos", + "colorScheme": "Campbell", + "cursorHeight": 25, + "fontFace": "LiterationMono NF", + "fontSize": 15, } ], diff --git a/startup/script/homeboot.cmd b/startup/script/homeboot.cmd index 5268689..7977d6d 100644 --- a/startup/script/homeboot.cmd +++ b/startup/script/homeboot.cmd @@ -1,9 +1,8 @@ cd C:\appl\repos\dotfiles git pull -copy ".\startup\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y +copy ".\startup\raw\keybinds.ahk" "%USERPROFILE%\Start Menu\Programs\Startup" /Y copy ".\startup\raw\profile.ps1" "C:\Program Files\PowerShell\7\Profile.ps1" /Y -copy ".\startup\raw\settings.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" /Y +copy ".\startup\raw\terminal\settings.json" "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" /Y -exit \ No newline at end of file From 92f5a77ee8af66e8e3628f7b05c9d369ad42e065 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 21 Nov 2021 17:02:26 +0100 Subject: [PATCH 098/102] Formatting --- main.sh | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/main.sh b/main.sh index 4f31dcc..ff1d688 100644 --- a/main.sh +++ b/main.sh @@ -90,33 +90,28 @@ EOF curl -L git.io/antigen > ~/antigen.zsh cat << EOF >> ~/.zshrc - HOME=/mnt/c/appl - - antigen bundle zsh-users/zsh-autosuggestions - source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh - - source ~/antigen.zsh +source ~/antigen.zsh +antigen bundle zsh-users/zsh-autosuggestions +source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh - # Load the oh-my-zsh's library. - antigen use oh-my-zsh +# Load the oh-my-zsh's library. +antigen use oh-my-zsh - # Bundles from the default repo (robbyrussell's oh-my-zsh). - antigen bundle git - antigen bundle heroku - antigen bundle pip - antigen bundle lein - antigen bundle command-not-found +# Bundles from the default repo (robbyrussell's oh-my-zsh). +antigen bundle git +antigen bundle heroku +antigen bundle pip +antigen bundle lein +antigen bundle command-not-found - # Syntax highlighting bundle. - antigen bundle zsh-users/zsh-syntax-highlighting +# Syntax highlighting bundle. +antigen bundle zsh-users/zsh-syntax-highlighting - # Load the theme. - antigen theme robbyrussell - antigen bundle zsh-users/zsh-autosuggestions +antigen bundle zsh-users/zsh-autosuggestions - # Tell Antigen that you're done. - antigen apply +# Tell Antigen that you're done. +antigen apply EOF From e153ee687971cab38b987192fb8e7196eb89fd03 Mon Sep 17 00:00:00 2001 From: Audun Solemdal Date: Sun, 21 Nov 2021 17:21:24 +0100 Subject: [PATCH 099/102] Update posh prompt --- startup/oh-my-posh/agnoster-customized.json | 70 ++++++ startup/raw/profile.ps1 | 235 +++++++------------- 2 files changed, 153 insertions(+), 152 deletions(-) create mode 100644 startup/oh-my-posh/agnoster-customized.json diff --git a/startup/oh-my-posh/agnoster-customized.json b/startup/oh-my-posh/agnoster-customized.json new file mode 100644 index 0000000..9c21edd --- /dev/null +++ b/startup/oh-my-posh/agnoster-customized.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", + "blocks": [ + { + "alignment": "right", + "segments": [ + { + "foreground": "#007ACC", + "properties": { + "time_format": "15:04:05" + }, + "style": "plain", + "type": "time" + } + ], + "type": "prompt", + "vertical_offset": -1 + }, + { + "alignment": "left", + "newline": true, + "segments": [ + { + "background": "#ffffff", + "foreground": "#100e23", + "powerline_symbol": "", + "style": "powerline", + "type": "session" + }, + { + "background": "#91ddff", + "foreground": "#100e23", + "powerline_symbol": "", + "properties": { + "folder_icon": "", + "folder_separator_icon": "  ", + "home_icon": "", + "style": "agnoster" + }, + "style": "powerline", + "type": "path" + }, + { + "background": "#95ffa4", + "background_templates": [ + "{{ if or (.Working.Changed) (.Staging.Changed) }}#C19C00{{ end }}", + "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}", + "{{ if gt .Ahead 0 }}#B388FF{{ end }}", + "{{ if gt .Behind 0 }}#B388FF{{ end }}" + ], + "foreground": "#193549", + "leading_diamond": "", + "powerline_symbol": "", + "properties": { + "branch_max_length": 25, + "fetch_stash_count": false, + "fetch_status": true, + "fetch_upstream_icon": false, + "template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}" + }, + "style": "powerline", + "trailing_diamond": "", + "type": "git" + } + ], + "type": "prompt" + } + ], + "final_space": true +} diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 5e0be48..adad76a 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -3,15 +3,13 @@ # Default folder $env:HOME = "C:\Appl" - # Hold control to skip import of modules, credit @VladimirReshetnikov Add-Type -AssemblyName WindowsBase Add-Type -AssemblyName PresentationCore -if (-not [Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::LeftCtrl)) -{ +if (-not [Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::LeftCtrl)) { # Critical Modules Import-Module "Terminal-icons" - Set-PoshPrompt Paradox + Set-PoshPrompt -Theme C:\appl\repos\dotfiles\startup\oh-my-posh\agnoster-customized.json } Set-PSReadLineOption -PredictionSource HistoryAndPlugin @@ -27,8 +25,7 @@ New-Alias which get-command # Bash functionality -function TouchFile ($name) -{ +function TouchFile ($name) { New-Item -Path . -Name $name } @@ -36,150 +33,93 @@ Set-Alias -name touch -Value TouchFile # Azure handy -function AzLogin() -{ - az login -} - -function Set-AzSub() -{ - az account set --subscription "S942-SDP-Tools" -} - -function Get-AzRgContent($rgname) -{ - Get-AzResource -ResourceGroupName $rgname -} - -function List-AzRg() -{ - Get-AzResourceGroup | select -Property ResourceGroupName -} - -function Get-AKSCredentials() -{ - az aks get-credentials -n sdpaks-prod-k8s -g sdpaks-prod - az aks get-credentials -n sdpaks-dev-k8s -g sdpaks-dev -} - # Containers -function HelmDel($name) -{ - $m = helm ls | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String - # $n = $m -replace '(^\s+|\s+$)','' -replace '\s+',' ' | %{$_.split(" ")[10]} - - helm del --purge $name -} - -function KUp($name) -{ - $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String | %{$_.split(" ")[0]} +function KUp($name) { + $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String | % { $_.split(" ")[0] } $n = $m.Substring(2) kubectl scale deployments -n $n --replicas=1 --all } -function KDown($name) -{ - $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String | %{$_.split(" ")[0]} +function KDown($name) { + $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String | % { $_.split(" ")[0] } $n = $m.Substring(2) kubectl scale deployments -n $n --replicas=0 --all } - -function KRe($name) -{ - $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String | %{$_.split(" ")[0]} +function KRe($name) { + $m = kubectl get deployments --all-namespaces | Select-String -Pattern $name -SimpleMatch -NoEmphasis | Out-String | % { $_.split(" ")[0] } $n = $m.Substring(2) kubectl scale deployments -n $n --replicas=0 --all kubectl scale deployments -n $n --replicas=1 --all } -function KCon($con) -{ +function KCon($con) { $o = "sdpaks-$con-k8s" kubectl config use-context $o - if ($?){ - Write-host "Currently in " -NoNewline - Write-Host $con -ForegroundColor Green -NoNewline - Write-Host " cluster" -ForegroundColor Yellow + if ($?) { + Write-host "Currently in " -NoNewline + Write-Host $con -ForegroundColor Green -NoNewline + Write-Host " cluster" -ForegroundColor Yellow } } -function KNs($name) -{ +function KNs($name) { # always returns true.. nneed workaround kubectl config set-context --current --namespace=$name - if($?) { - $con = kubectl config current-context - Write-host "Currently at " -NoNewline -ForegroundColor Yellow - Write-Host $name -ForegroundColor Cyan -NoNewline - Write-Host " namespace in " -ForegroundColor Yellow -NoNewline - Write-Host $con -ForegroundColor Green -NoNewline - Write-Host " cluster" -ForegroundColor Yellow + if ($?) { + $con = kubectl config current-context + Write-host "Currently at " -NoNewline -ForegroundColor Yellow + Write-Host $name -ForegroundColor Cyan -NoNewline + Write-Host " namespace in " -ForegroundColor Yellow -NoNewline + Write-Host $con -ForegroundColor Green -NoNewline + Write-Host " cluster" -ForegroundColor Yellow } } -function doexec(){ - [CmdletBinding()] - param ( - [string] $name - ) - try { - docker exec -it $name bash - } - catch { - docker exec -it $name sh - } -} - -function docup(){ +function dup() { [CmdletBinding()] param ( - [string] $name + [string] $name ) - docker-compose up $name -d + docker-compose up $name -d } Set-Alias doup docup -function docdown(){ +function ddown() { [CmdletBinding()] param ( - [string] $name + [string] $name ) - docker-compose down $name + docker-compose down $name } -Set-Alias dodown docdown - -function kexec(){ +function kexec() { [CmdletBinding()] param ( - [string] $name + [string] $name ) - try { - kubectl exec -it $name bash - } - catch { - kubectl exec -it $name sh - } + try { + kubectl exec -it $name bash + } + catch { + kubectl exec -it $name sh + } } -function FSync() -{ +function FSync() { fluxctl.exe sync --k8s-fwd-ns flux } # General bash-style aliases -function New-BashStyleAlias([string]$name, [string]$command) -{ +function New-BashStyleAlias([string]$name, [string]$command) { $sb = [scriptblock]::Create($command) New-Item "Function:\global:$name" -Value $sb -Force | Out-Null } @@ -198,12 +138,8 @@ New-BashStyleAlias repos 'cd c:/appl/repos' New-BashStyleAlias progs 'cd c:/appl/progs' New-BashStyleAlias certs 'cd c:/appl/certs' New-BashStyleAlias dotfiles 'cd c:/appl/repos/dotfiles' -New-BashStyleAlias sdp-flux 'cd c:/appl/repos/sdp-flux' -New-BashStyleAlias sdp-aks 'cd c:/appl/repos/sdp-aks' -New-BashStyleAlias environments 'cd c:/appl/repos/environments' - -Set-Alias flux sdp-flux -Set-Alias aks sdp-aks +New-BashStyleAlias operations 'cd c:/appl/repos/operations' +New-BashStyleAlias kneik 'cd c:/appl/repos/Dhhr.Kneik' # Git commands New-BashStyleAlias log "git log --oneline" @@ -224,10 +160,10 @@ New-BashStyleAlias glog "git log --graph --pretty --oneline --abbrev-commit --de New-BashStyleAlias prev "Get-Content (Get-PSReadlineOption).HistorySavePath" -function reset(){ +function reset() { [CmdletBinding()] param ( - [Parameter(ParameterSetName="Default", Position=0)] + [Parameter(ParameterSetName = "Default", Position = 0)] $Mode = "soft" ) $branch = (git rev-parse --abbrev-ref HEAD) @@ -236,49 +172,49 @@ function reset(){ status } -function gcom(){ +function gcom() { [CmdletBinding()] param ( - [Parameter(Mandatory=$true, ParameterSetName="Default", Position=0)] - [string] $message + [Parameter(Mandatory = $true, ParameterSetName = "Default", Position = 0)] + [string] $message ) - git commit -m $message + git commit -m $message } set-alias gcmon gcom set-alias com gcom -function gadd(){ +function gadd() { [CmdletBinding()] param ( - [Parameter(Mandatory=$true, ParameterSetName="Default", Position=0)] - [string] $name + [Parameter(Mandatory = $true, ParameterSetName = "Default", Position = 0)] + [string] $name ) - git add $name - git status + git add $name + git status } set-alias add gadd -function gaddcom(){ +function gaddcom() { [CmdletBinding()] param ( - [Parameter(Mandatory=$true, ParameterSetName="Default", Position=0)] - [string] $Name, - [Parameter(Mandatory=$true, ParameterSetName="Default", Position=1)] - [string] $Message + [Parameter(Mandatory = $true, ParameterSetName = "Default", Position = 0)] + [string] $Name, + [Parameter(Mandatory = $true, ParameterSetName = "Default", Position = 1)] + [string] $Message ) - git add $Name - git commit -m $Message - git --no-pager log --pretty=oneline -n3 --oneline + git add $Name + git commit -m $Message + git --no-pager log --pretty=oneline -n3 --oneline } set-alias acom gaddcom -function reset(){ +function reset() { [CmdletBinding()] param ( - [Parameter(ParameterSetName="Mode", Position=0)] + [Parameter(ParameterSetName = "Mode", Position = 0)] $Mode = "soft" ) $branch = (git rev-parse --abbrev-ref HEAD) @@ -290,41 +226,39 @@ function reset(){ status } -function merge(){ +function merge() { [CmdletBinding()] param ( - [Parameter(Mandatory=$true, ParameterSetName="Default", Position=0)] - [string] $Name + [Parameter(Mandatory = $true, ParameterSetName = "Default", Position = 0)] + [string] $Name ) - git merge $Name + git merge $Name } -function clone(){ +function clone() { [CmdletBinding()] param ( - [Parameter(Mandatory=$true, ParameterSetName="Default", Position=0)] - [string] $Name + [Parameter(Mandatory = $true, ParameterSetName = "Default", Position = 0)] + [string] $Name ) - git clone $Name + git clone $Name } # Open current repo and branch on Github -function remote(){ +function remote() { [CmdletBinding()] param ( - [Parameter(Mandatory=$false, ParameterSetName="Default", Position=0)] - [switch] $Repo, - [Parameter(Mandatory=$false, ParameterSetName="Default", Position=1)] - [switch] $LastCommit + [Parameter(Mandatory = $false, ParameterSetName = "Default", Position = 0)] + [switch] $Repo, + [Parameter(Mandatory = $false, ParameterSetName = "Default", Position = 1)] + [switch] $LastCommit ) $rawurl = git remote get-url --all origin - if ($rawurl -like "*.git") - - { - $url = $rawurl.Substring(0, $rawurl.lastIndexOf('.')) + if ($rawurl -like "*.git") { + $url = $rawurl.Substring(0, $rawurl.lastIndexOf('.')) } else { @@ -334,15 +268,16 @@ function remote(){ $branch = git rev-parse --abbrev-ref HEAD $head = git rev-parse --short HEAD - if ($Repo) {$1 = "$url/tree/$branch"} + if ($Repo) { $1 = "$url/tree/$branch" } $2 = "$url/commits/$branch" - if ($LastCommit) {$3 = "$url/commit/$head"} + if ($LastCommit) { $3 = "$url/commit/$head" } Start-Process chrome.exe $1, $2, $3 } ## Git branch switching New-BashStyleAlias master "git checkout master" +New-BashStyleAlias main "git checkout main" New-BashStyleAlias prod "git checkout prod" New-BashStyleAlias dev "git checkout dev" New-BashStyleAlias production "git checkout production" @@ -366,19 +301,15 @@ $isAdmin = $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administ $Host.UI.RawUI.WindowTitle = "PowerShell {0}" -f $PSVersionTable.PSVersion.Major.ToString() -if ($isAdmin) -{ +if ($isAdmin) { $Host.UI.RawUI.WindowTitle += " [ADMIN]" } -function dirs -{ - if ($args.Count -gt 0) - { +function dirs { + if ($args.Count -gt 0) { Get-ChildItem -Recurse -Include "$args" | Foreach-Object FullName } - else - { + else { Get-ChildItem -Recurse | Foreach-Object FullName } } From 428a00ba0612f811b1bb748f92461d2b0beb2ccc Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Mon, 10 Jan 2022 08:48:01 +0100 Subject: [PATCH 100/102] Add files for docker in wsl2 (no docker desktop) --- startup/raw/profile.ps1 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index adad76a..2b3f3f8 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -318,4 +318,20 @@ function cc { Invoke-History | Set-Clipboard -} \ No newline at end of file +} + +# Forward docker and docker-compose from WSL to Windows. Which exact index needs to be split may vary based on your distro and even local machine. +$ifconfig = wsl ifconfig eth0 +$env:DOCKER_HOST = $ifconfig[1].Split(" ")[9] + +function dockerd { + wsl sudo dockerd -H $env:DOCKER_HOST +} + +function pkill { wsl sudo pkill $args } + +function docker-compose { wsl docker-compose -H $env:DOCKER_HOST $args } +function docker { wsl docker -H $env:DOCKER_HOST $args } + +Set-Alias d docker +Set-Alias doc docker-compose \ No newline at end of file From b69aceac179ae0b5be49f4e5661f3af7507de8ae Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Sun, 23 Apr 2023 20:47:55 +0200 Subject: [PATCH 101/102] Push last changes --- configurations/alias.sh | 1 + startup/raw/profile.ps1 | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/configurations/alias.sh b/configurations/alias.sh index 3e8c12f..c33c2e3 100644 --- a/configurations/alias.sh +++ b/configurations/alias.sh @@ -10,6 +10,7 @@ echo " # Extra to path PATH=$PATH:~/path +PATH=$PATH:~/.local/bin # Custom functions diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index 2b3f3f8..dd77f6f 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -131,16 +131,6 @@ New-BashStyleAlias .... "cd ../../../" New-BashStyleAlias ..... "cd ../../../../" New-BashStyleAlias cl "cd $$" # cd to last argument of previous folder -# CD to Specific folders -New-BashStyleAlias home 'cd ~' -New-BashStyleAlias appl 'cd c:/appl' -New-BashStyleAlias repos 'cd c:/appl/repos' -New-BashStyleAlias progs 'cd c:/appl/progs' -New-BashStyleAlias certs 'cd c:/appl/certs' -New-BashStyleAlias dotfiles 'cd c:/appl/repos/dotfiles' -New-BashStyleAlias operations 'cd c:/appl/repos/operations' -New-BashStyleAlias kneik 'cd c:/appl/repos/Dhhr.Kneik' - # Git commands New-BashStyleAlias log "git log --oneline" New-BashStyleAlias gdiff "git diff" @@ -155,10 +145,23 @@ New-BashStyleAlias pull "git pull" New-BashStyleAlias recent "git for-each-ref --sort -committerdate refs/heads/" New-BashStyleAlias glog "git log --graph --pretty --oneline --abbrev-commit --decorate" +# CD to Specific folders +New-BashStyleAlias home 'cd ~' +New-BashStyleAlias appl 'cd c:/appl' +New-BashStyleAlias repos 'cd c:/appl/repos' +New-BashStyleAlias path 'cd c:/appl/path' +New-BashStyleAlias certs 'cd c:/appl/certs' +New-BashStyleAlias dotfiles 'cd c:/appl/repos/dotfiles' + # Speical commands New-BashStyleAlias prev "Get-Content (Get-PSReadlineOption).HistorySavePath" +function Authenticate-Databricks { + $env:DATABRICKS_AAD_TOKEN = (az account get-access-token --resource 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d) | convertfrom-json | Select-Object accessToken -ExpandProperty accessToken + databricks configure --host https://xxx.azuredatabricks.net --aad-token --jobs-api-version 2.1 +} + function reset() { [CmdletBinding()] @@ -278,7 +281,9 @@ function remote() { ## Git branch switching New-BashStyleAlias master "git checkout master" New-BashStyleAlias main "git checkout main" -New-BashStyleAlias prod "git checkout prod" +New-BashStyleAlias mainp "git checkout main && pull" +New-BashStyleAlias prod "git checkout production" +New-BashStyleAlias prodp "git checkout production && pull" New-BashStyleAlias dev "git checkout dev" New-BashStyleAlias production "git checkout production" New-BashStyleAlias development "git checkout development" From e07c927107518a333fdbd4e1aa109aabb41001f0 Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Thu, 13 Feb 2025 09:23:21 +0100 Subject: [PATCH 102/102] Update script --- startup/raw/profile.ps1 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/startup/raw/profile.ps1 b/startup/raw/profile.ps1 index dd77f6f..5a62752 100644 --- a/startup/raw/profile.ps1 +++ b/startup/raw/profile.ps1 @@ -9,9 +9,10 @@ Add-Type -AssemblyName PresentationCore if (-not [Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::LeftCtrl)) { # Critical Modules Import-Module "Terminal-icons" - Set-PoshPrompt -Theme C:\appl\repos\dotfiles\startup\oh-my-posh\agnoster-customized.json + oh-my-posh init pwsh --config C:\appl\repos\dotfiles\startup\oh-my-posh\agnoster-customized.json | Invoke-Expression } +$PSDefaultParameterValues["Out-Default:OutVariable"] = "__" # $__ = last output Set-PSReadLineOption -PredictionSource HistoryAndPlugin # Alias @@ -25,10 +26,18 @@ New-Alias which get-command # Bash functionality -function TouchFile ($name) { +function touch ($name) { New-Item -Path . -Name $name } +function WingetRun { + param ( + [string]$packageName + ) + + Start-Process microsoft-edge:https://winget.run/search?query=$packageName +} + Set-Alias -name touch -Value TouchFile # Azure handy