diff --git a/.bash_profile.backup b/.bash_profile.backup deleted file mode 100644 index 6adebd8..0000000 --- a/.bash_profile.backup +++ /dev/null @@ -1,3 +0,0 @@ -export AQSISHOME=/Applications/Aqsis.app # Entry managed by Aqsis Renderer -export PATH=$AQSISHOME/Contents/MacOS:$PATH # Entry managed by Aqsis Renderer -source ~/.bashrc diff --git a/.bash_rc.d/00.wsl.sh b/.bash_rc.d/00.wsl.sh new file mode 100644 index 0000000..a951159 --- /dev/null +++ b/.bash_rc.d/00.wsl.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# AUTHOR: Jeremy Wall (jw), jeremy@marzhillstudios.com +if [[ -n "$(uname -a | grep Microsoft)" ]]; then + export INWSL="true" +fi diff --git a/.bash_rc.d/01.profile.sh b/.bash_rc.d/01.profile.sh index 2f7f886..856df1d 100644 --- a/.bash_rc.d/01.profile.sh +++ b/.bash_rc.d/01.profile.sh @@ -6,7 +6,7 @@ insert_path_element_before /opt/brew/bin insert_path_element $GOPATH/bin insert_path_element $HOME/.cabal/bin insert_path_element /usr/texbin -insert_path_element $HOME/.cargo/bin +insert_path_element_before $HOME/.cargo/bin export ALTERNATE_EDITOR="" export EDITOR="vim" diff --git a/.bash_rc.d/99.gcloud.sh.backup b/.bash_rc.d/99.gcloud.sh.backup deleted file mode 100644 index 8b13789..0000000 --- a/.bash_rc.d/99.gcloud.sh.backup +++ /dev/null @@ -1 +0,0 @@ - diff --git a/.emacs.d/site-lisp/hoon-mode.el b/.emacs.d/site-lisp/hoon-mode.el index a792506..788d935 120000 --- a/.emacs.d/site-lisp/hoon-mode.el +++ b/.emacs.d/site-lisp/hoon-mode.el @@ -1 +1 @@ -/Users/jwall/sandbox/apps/urbit/extras/hoon-mode.el/hoon-mode.el \ No newline at end of file +C:/Users/jwall/sandbox/apps/urbit/extras/hoon-mode.el/hoon-mode.el \ No newline at end of file diff --git a/.hammerspoon/.mjolnir b/.hammerspoon/.mjolnir index 78acff1..adc6a6f 120000 --- a/.hammerspoon/.mjolnir +++ b/.hammerspoon/.mjolnir @@ -1 +1 @@ -/Users/jwall/.mjolnir \ No newline at end of file +C:/Users/jwall/.mjolnir \ No newline at end of file diff --git a/.hgignore b/.hgignore deleted file mode 100644 index ae65b69..0000000 --- a/.hgignore +++ /dev/null @@ -1,17 +0,0 @@ -.bash_rc.d/99.local.sh -.cabal/bin -.cabal/config.platform -.cabal/lib -.cabal/logs -.cabal/packages -.cabal/share -.cabal/world -.emacs.d/ac-comphist.dat -.emacs.d/auto-save-list -.emacs.d/elpa -.emacs.d/srecode-map.el -.emacs.d/tramp -.emacs.d/url -.emacs.d/semantic -.emacs.d/session - diff --git a/.hgtags b/.hgtags deleted file mode 100644 index 46bcb54..0000000 --- a/.hgtags +++ /dev/null @@ -1 +0,0 @@ -b17db60bd576fa4c3fdb084ba78b85719090c6c9 foo diff --git a/.profile b/.profile index 22378b0..86795d7 100644 --- a/.profile +++ b/.profile @@ -1,3 +1 @@ source ~/.bashrc - -export PATH="$HOME/.cargo/bin:$PATH" diff --git a/PS/PowerShellProfile.ps1 b/PS/PowerShellProfile.ps1 new file mode 100644 index 0000000..9bf8a64 --- /dev/null +++ b/PS/PowerShellProfile.ps1 @@ -0,0 +1,50 @@ +# My powershell profile. + +# customize the prompt to be a little more useful +function prompt { + Write-Host -NoNewLine "[" + Write-Host -NoNewLine -Fore Green ("{0:HH}:{0:mm}" -f $(get-date)) + Write-Host -NoNewLine "] " + Write-Host -Fore Cyan "${pwd}" + "PS> " +} + +function Invoke-Elevated { + param ( + [ScriptBlock] + $code + ) + # Elevate our permissions for this first. + Start-Process powershell.exe -ArgumentList $code -WindowStyle hidden -Verb RunAs +} + +# helper command to get whether we are running under elevated privileges or not. +function Get-Elevated { + ([Security.Principal.WindowsPrincipal] ` + [Security.Principal.WindowsIdentity]::GetCurrent() ` + ).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) +} + +# Helper command to make symbolic links. +function New-Link { + param ( + [Parameter(Position=0, Mandatory=$true)] + [String[]] + $Source, + + [Parameter(Position=1, Mandatory=$true)] + [String[]] + $Destination + ) + + # This is a bit of a hack but it's necessary until they make it possible + # to do symbolic links without administrator privileges + if (Get-Elevated) { + New-Item -ItemType SymbolicLink -Path $Destination -Target $Source + } else { + # Elevate our permissions for this first. + Invoke-Elevated { + New-Item -ItemType SymbolicLink -Path $Destination -Target $Source + } + } +} \ No newline at end of file diff --git a/PS/bootstrap.ps1 b/PS/bootstrap.ps1 new file mode 100644 index 0000000..f65f98e --- /dev/null +++ b/PS/bootstrap.ps1 @@ -0,0 +1,15 @@ +#Powershell based windows 10 bootstrap script + +# First we source in our powershell profile so we can have some useful utilities +source "./PowerShellProfile.ps1" + +# First step is to overwrite our current profile with a symlink to the correct one. +Remove-Item -Force -Path $profile +Make-Link -Source "./PowerShellProfile.ps1" -Destination $profile + +# Now ensure our dnsservers are properly set up +Invoke-Elevated { + Get-NetAdapter | ForEach-Object { + Set-DnsClientServerAddress -InterfaceIndex $_.ifIndex -ServerAddresses 1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001 + } +} \ No newline at end of file diff --git a/PS/launch_wsl_xserve.ps1 b/PS/launch_wsl_xserve.ps1 index cec6e06..3822a07 100644 --- a/PS/launch_wsl_xserve.ps1 +++ b/PS/launch_wsl_xserve.ps1 @@ -1,6 +1,10 @@ param ( [string] - $CommandPath = "rxvt-unicode" + $CommandPath = "konsole" ) -Start-Process -FilePath "wsl.exe" -ArgumentList $CommandPath -NoNewWindow \ No newline at end of file +# Set the display variable for this process +Set-Item -Path Env:DISPLAY "127.0.0.1:0.0" +Set-Item -Path Env:WSLENV "DISPLAY/u" + +Start-Process -FilePath "wsl.exe" -ArgumentList $CommandPath -WindowStyle Hidden \ No newline at end of file