From: Edward Delaporte Date: Fri, 20 May 2022 03:02:33 +0000 (+0100) Subject: Merge branch 'main' of github.com:edthedev/dotfiles into main X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/commitdiff_plain/bd9f3d19bc86ce9be64c505edca894a2dab92f06?hp=4115944e9e15f7c75b9f7986513474b8af7ebbc6 Merge branch 'main' of github.com:edthedev/dotfiles into main --- diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index b0c9ae9..4df4971 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -36,9 +36,10 @@ else { $ENV:PATH+=":$HOME/x16/x16-emulator" # x16 Emulator $ENV:PATH+=":$HOME/src/x16-demo/tools" # x16 python tools } + # alias renumber $HOME/src/x16-demo/ -$env:Journal = "~\Journal\2021" # allows cd $env:journal +$env:Journal = "~\Journal\2022" # allows cd $env:journal $env:minion = "$env:src\minion" # Import some home grown PowerShell modules, if they are installed. @@ -115,15 +116,20 @@ function Get-GitStatus() { # Tell my scripts which GitHub repositories to look in. $env:GITHUB_USERNAME = 'edthedev' -$env:GITHUB_ORG = 'techservicesillinois' -$env:GITHUB_ORGS = @('techservicesillinois', 'uillinois-community') $env:GITHUB_REPOS = @( 'techservicesillinois/SecOps-Tools', 'techservicesillinois/secdev-job-aids', 'techservicesillinois/awscli-login', 'techservicesillinois/farmit', - 'uillinois-community/uillinois-community.github.io' -) + 'uillinois-community/uillinois-community.github.io', + 'techservicesillinois/SecOps-Powershell-CSOC' +) -join ' ' +$ENV:TS_REPOS = $ENV:GITHUB_REPOS.split(' ') | Where { $_ -like 'techser*' } + +# Todo List +$ENV:PATH+=";$env:src\todolist" # todo list utility edthedev\todolist +$env:todolist = "C:\Users\delaport\Journal\2022" +# New-Alias todo todolist # Nice for git New-Alias ol Get-GitLog @@ -132,3 +138,7 @@ New-Alias st Get-GitStatus # Dashboard New-Alias dash Show-MyDashboard # from dash.psm1 New-Alias agenda Get-JournalAgenda # from minion_go.psm1 + +function Invoke-FixWslVPN { + Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64"} | Set-NetIPInterface -InterfaceMetric 6000 +} \ No newline at end of file diff --git a/MySnippets.code-snippets.jsonc b/MySnippets.code-snippets.jsonc new file mode 100644 index 0000000..840669d --- /dev/null +++ b/MySnippets.code-snippets.jsonc @@ -0,0 +1,69 @@ +{ + "ERROR": { + "scope": "markdown", + "prefix": "ascii_error", + "body": [ + " ___ _ __ _ __ ___ _ __ ", + " / _ \\ '__| '__/ _ \\| '__|", + "| __/ | | | | (_) | | ", + " \\___|_| |_| \\___/|_| " + ], + "description": "Insert ASCII Error" + }, + "GitHub Inbox": { + "scope": "markdown", + "prefix": "github", + "body": [ + "https://github.com/notifications?query=is%3Aunread" + ], + "description": "Insert Link to GitHub inbox" + }, + "SWOT": { + "scope": "markdown", + "prefix": "ascii_swot", + "body": [ + "## SWOT", + "", + "### Internal", + "", + "**Strengths**", + "", + "**Weaknesses**", + "", + "### External", + "", + "**Opportunities**", + "", + "**Threats**"], + "description": "Insert SWOT" + }, + "Service Pyriamid": { + "scope": "markdown", + "prefix": "ascii_pyriamid", + "body": [ +"```", +" /\\ PEAK SERVICE", +" / ", +" /", +" / ENHANCED SERVICE", +" / ", +" / ", +" /", +" / BASIC SERVICE", +" / ", +"/ ", +"```", + ], + "description": "Insert Service Level Pyriamid" + }, + "Shrug Emojii": { + "scope": "markdown", + "prefix": "ascii_shrug", + "body": [ + "¯\\_(ツ)_/¯" + ], + "description": "ASCII Shrug" + } + + +} \ No newline at end of file diff --git a/oh-my-posh.omp.json b/oh-my-posh.omp.json new file mode 100644 index 0000000..cd63323 --- /dev/null +++ b/oh-my-posh.omp.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", + "blocks": [ + { + "type": "prompt", + "alignment": "left", + "segments": [ + { + "type": "session", + "style": "plain", + "foreground": "#ffffff", + "properties": { + "prefix": "<#CB4B16>┏[", + "postfix": "<#CB4B16>]", + "template": "{{ .UserName }}" + } + }, + { + "type": "python", + "style": "plain", + "foreground": "#ffffff", + "properties": { + "prefix": "<#CB4B16>[", + "postfix": "<#CB4B16>]", + "template": " Py {{ .Full }} " + } + }, + { + "type": "git", + "style": "plain", + "foreground": "#ffffff", + "properties": { + "prefix": "<#CB4B16>[", + "postfix": "<#CB4B16>]", + "template": "{{ .HEAD }}" + } + }, + { + "type": "root", + "style": "plain", + "foreground": "#ffffff", + "properties": { + "prefix": "<#CB4B16>[", + "postfix": "<#CB4B16>]" + } + }, + { + "type": "exit", + "style": "plain", + "foreground": "#ffffff", + "properties": { + "template": "{{ .Text }}", + "prefix": "<#CB4B16>[x", + "postfix": "<#CB4B16>]" + } + } + ] + }, + { + "type": "prompt", + "alignment": "left", + "newline": true, + "segments": [ + { + "type": "path", + "style": "plain", + "foreground": "#ffffff", + "properties": { + "style": "full", + "prefix": "<#CB4B16>┖[", + "postfix": "<#CB4B16>]>" + } + } + ] + } + ], + "final_space": true +} diff --git a/psmodules/dash.psm1 b/psmodules/dash.psm1 index f6bccfe..ed24a35 100644 --- a/psmodules/dash.psm1 +++ b/psmodules/dash.psm1 @@ -1,15 +1,26 @@ function Show-MyDashBoard() { + Write-Host "" Write-Host "## Todo items for today:" Measure-JournalTodos chart Get-JournalTodayTodos + Write-Host "" Write-Host "## Agenda for today:" Get-JournalAgenda + Write-Host "" Write-Host "## GitHub Issues Assigned (Show-AgileMine)" - Show-AgileMine -DaysAgo 6 - Write-Host "## GitHub Issues with no milestone. (Show-AgileNoMilestone)" - Get-AgileNoMilestone -repository SecOps-Tools | Measure-Object -Property updated_at -Min -Max + Show-AgileMine + # Show-AgileMine -DaysAgo 6 + Write-Host "" + Write-Host "## GitHub Issues with no milestone. (Select-AgileNoMilestone)" + Write-Host "(Get-AgileQuery -state 'Open' | Invoke-AgileQuery | Select-AgileNoMilestone | Show-MarkdownFromGitHub)" + $milestone_repos = $env:github_repos.split(' ') | Where-Object { $_ -Match 'techservicesillinois' } + $queries = Get-AgileQuery -state 'Open' -repos $milestone_repos + Invoke-AgileQuery -queries $queries | Select-AgileNoMilestone | Show-MarkdownFromGitHub + # $orphans_count = ($orphans | Measure-Object -Property updated_at -Min -Max).Count + # $orphans | Measure-Object -Property updated_at -Min -Max + Write-Host "" Write-Host "Use command 'todo' to list more tasks." Write-Host "Use command 'chart' to show todo item progress." Write-Host "Use command 'agenda' to list the plan for today." diff --git a/screenrc b/screenrc index 1cf8ea6..b5b748e 100644 --- a/screenrc +++ b/screenrc @@ -20,6 +20,10 @@ hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}* %t%?(%u)%? # Pick ye olde shell. # shell /bin/zsh -if [ -d /opt/powershell ]; then - shell /opt/powershell/pwsh -fi +# if [ -d /opt/powershell ]; then +# shell /opt/powershell/pwsh +#else +# shell /bin/bash +#fi + +shell -$SHELL diff --git a/setup/ReadMe.md b/setup/ReadMe.md index ae371d0..4caafe2 100644 --- a/setup/ReadMe.md +++ b/setup/ReadMe.md @@ -4,3 +4,7 @@ These scripts are to set up or configure a favorite software tool. See `/install` for scripts to install a favorite software tool. You typically want to run these scripts without elevation - **as your preferred login user**. + +## Windows Tips + +You want a font installed and configured for Windows Terminal ending in PL to make nice powerline features work. diff --git a/setup/shell.ps1 b/setup/shell.ps1 new file mode 100644 index 0000000..484c64f --- /dev/null +++ b/setup/shell.ps1 @@ -0,0 +1,2 @@ +Install-Module oh-my-posh -Scope CurrentUser +Update-Module oh-my-posh \ No newline at end of file diff --git a/setup/wsl.sh b/setup/wsl.sh new file mode 100644 index 0000000..7804d39 --- /dev/null +++ b/setup/wsl.sh @@ -0,0 +1 @@ +sudo ln -s wsl.conf /etc/wsl.conf diff --git a/vimrc b/vimrc index 601a676..09fa0d2 100644 --- a/vimrc +++ b/vimrc @@ -55,7 +55,7 @@ Plug 'pprovost/vim-ps1' " Plug NLKNguyen/papercolor-theme " " -Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } +" Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } call plug#end() diff --git a/wsl.conf b/wsl.conf new file mode 100644 index 0000000..62648ba --- /dev/null +++ b/wsl.conf @@ -0,0 +1,2 @@ +[interop] +appendWindowsPath = false