Fix set_osx_hostname arguments, made everything in prompt.sh use separator, add HighConstrast theme, don't set require password in osx.sh

This commit is contained in:
Ivan Malison 2014-04-26 19:17:43 -07:00
parent dc97362297
commit 06ac029460
4 changed files with 288 additions and 85 deletions

View File

@ -168,8 +168,7 @@ function git_reset_author() {
}
function set_osx_hostname() {
local new_hostname="$1"
test -z new_hostname && new_hostname="IvansMac"
local new_hostname="${1-imalison}"
sudo scutil --set ComputerName $new_hostname
sudo scutil --set HostName $new_hostname
sudo scutil --set LocalHostName $new_hostname

View File

@ -36,23 +36,23 @@ function git_prompt_info() {
then
echo ""
else
echo " %{$FG[239]%}on%{$reset_color%} %{$FG[255]%}$(git branch-or-sha)%{$reset_color%}$(git_status_character)"
echo " $(separator "on") $(git branch-or-sha)$(git_status_character)"
fi
}
function git_status_character() {
if git dirty;
then
echo "%{$FG[202]%}✘%{$reset_color%}"
print_with_color "✘" "$fg_bold[red]"
else
echo "%{$FG[040]%}✔%{$reset_color%}"
print_with_color "✔" "$fg_bold[green]"
fi
}
function sandbox_prompt() {
if [ ! -z "$(sandbox_prompt_info)" ];
then
echo " %{$FG[239]%}with $(colored_sandbox_string)%{$reset_color%}"
echo " $(separator "with") $(colored_sandbox_string)%{$reset_color%}"
fi
}
@ -73,17 +73,15 @@ function prompt_custom_colors() {
}
function prompt_basic_colors() {
export USERNAME_COLOR="$fg[blue]"
export SEPARATOR_COLOR="$fg[black]"
export HOSTNAME_COLOR="$fg[green]"
export USERNAME_COLOR="$fg_no_bold[green]"
export SEPARATOR_COLOR="$fg_no_bold[black]"
export HOSTNAME_COLOR="$fg_no_bold[blue]"
export CURRENT_DIRECTORY_COLOR="$fg[yellow]"
}
function prompt_basic_colors_with_grey_separator() {
export USERNAME_COLOR="$fg[blue]"
prompt_basic_colors
export SEPARATOR_COLOR="$FG[239]"
export HOSTNAME_COLOR="$fg[green]"
export CURRENT_DIRECTORY_COLOR="$fg[yellow]"
}
function print_with_color() {

View File

@ -1080,6 +1080,216 @@
<real>0.71372549019607845</real>
</dict>
</dict>
<key>HighContrast</key>
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.14479697905114011</real>
<key>Red Component</key>
<real>0.66360294117647056</real>
</dict>
<key>Ansi 10 Color</key>
<dict>
<key>Blue Component</key>
<real>0.3333333432674408</real>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>0.3333333432674408</real>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Blue Component</key>
<real>0.00090433453030602795</real>
<key>Green Component</key>
<real>0.93554482995661459</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Blue Component</key>
<real>1</real>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Blue Component</key>
<real>1</real>
<key>Green Component</key>
<real>0.3333333432674408</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Blue Component</key>
<real>1</real>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>0.3333333432674408</real>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Blue Component</key>
<real>1</real>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0028098621633742206</real>
<key>Green Component</key>
<real>0.87563631221719462</real>
<key>Red Component</key>
<real>0.0018110387789222668</real>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0014849494388337197</real>
<key>Green Component</key>
<real>0.7171533063461043</real>
<key>Red Component</key>
<real>0.71797228506787336</real>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Blue Component</key>
<real>1</real>
<key>Green Component</key>
<real>0.40000000596046448</real>
<key>Red Component</key>
<real>0.40000000596046448</real>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Blue Component</key>
<real>0.73333334922790527</real>
<key>Green Component</key>
<real>0.0</real>
<key>Red Component</key>
<real>0.73333334922790527</real>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Blue Component</key>
<real>0.73333334922790527</real>
<key>Green Component</key>
<real>0.73333334922790527</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Blue Component</key>
<real>0.73333334922790527</real>
<key>Green Component</key>
<real>0.73333334922790527</real>
<key>Red Component</key>
<real>0.73333334922790527</real>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Blue Component</key>
<real>0.33333333333333331</real>
<key>Green Component</key>
<real>0.33333333333333331</real>
<key>Red Component</key>
<real>0.33333333333333331</real>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.086573815128913489</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Background Color</key>
<dict>
<key>Blue Component</key>
<real>0.10635251696832582</real>
<key>Green Component</key>
<real>0.10635251696832582</real>
<key>Red Component</key>
<real>0.10635251696832582</real>
</dict>
<key>Bold Color</key>
<dict>
<key>Blue Component</key>
<real>1</real>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Blue Component</key>
<real>0.73333334922790527</real>
<key>Green Component</key>
<real>0.73333334922790527</real>
<key>Red Component</key>
<real>0.73333334922790527</real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Blue Component</key>
<real>1</real>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Blue Component</key>
<real>0.90196079015731812</real>
<key>Green Component</key>
<real>0.90196079015731812</real>
<key>Red Component</key>
<real>0.90196079015731812</real>
</dict>
<key>Selected Text Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Selection Color</key>
<dict>
<key>Blue Component</key>
<real>1</real>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>0.40000000596046448</real>
</dict>
</dict>
<key>Homebrew</key>
<dict>
<key>Ansi 0 Color</key>
@ -4525,7 +4735,7 @@
<key>NSWindow Frame NSColorPanel</key>
<string>427 366 214 309 0 0 1920 1080 </string>
<key>NSWindow Frame Preferences</key>
<string>86 531 924 485 0 0 1920 1058 </string>
<string>432 463 924 485 0 0 1920 1080 </string>
<key>NSWindow Frame SUStatusFrame</key>
<string>768 697 384 129 0 0 1920 1058 </string>
<key>NSWindow Frame iTerm Window 0</key>
@ -4544,146 +4754,146 @@
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.45882353186607361</real>
<real>0.0</real>
<key>Green Component</key>
<real>0.45882353186607361</real>
<real>0.0</real>
<key>Red Component</key>
<real>0.45882353186607361</real>
<real>0.0</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Blue Component</key>
<real>0.30196079611778259</real>
<real>0.0</real>
<key>Green Component</key>
<real>0.364705890417099</real>
<real>0.14479698240756989</real>
<key>Red Component</key>
<real>0.50980395078659058</real>
<real>0.66360294818878174</real>
</dict>
<key>Ansi 10 Color</key>
<dict>
<key>Blue Component</key>
<real>0.66666668653488159</real>
<real>0.3333333432674408</real>
<key>Green Component</key>
<real>0.85098040103912354</real>
<real>1</real>
<key>Red Component</key>
<real>0.59607845544815063</real>
<real>0.3333333432674408</real>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Blue Component</key>
<real>0.61568629741668701</real>
<real>0.00090433453442528844</real>
<key>Green Component</key>
<real>0.90588235855102539</real>
<real>0.93554484844207764</real>
<key>Red Component</key>
<real>0.98039215803146362</real>
<real>1</real>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Blue Component</key>
<real>0.81176471710205078</real>
<real>1</real>
<key>Green Component</key>
<real>0.76470589637756348</real>
<real>1</real>
<key>Red Component</key>
<real>0.47843137383460999</real>
<real>0.0</real>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Blue Component</key>
<real>0.63137257099151611</real>
<real>1</real>
<key>Green Component</key>
<real>0.69803923368453979</real>
<real>0.3333333432674408</real>
<key>Red Component</key>
<real>0.83921569585800171</real>
<real>1</real>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Blue Component</key>
<real>0.87843137979507446</real>
<real>1</real>
<key>Green Component</key>
<real>0.87843137979507446</real>
<real>1</real>
<key>Red Component</key>
<real>0.67843139171600342</real>
<real>0.3333333432674408</real>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Blue Component</key>
<real>0.87843137979507446</real>
<real>1</real>
<key>Green Component</key>
<real>0.87843137979507446</real>
<real>1</real>
<key>Red Component</key>
<real>0.87843137979507446</real>
<real>1</real>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Blue Component</key>
<real>0.38431373238563538</real>
<real>0.0028098621405661106</real>
<key>Green Component</key>
<real>0.54901963472366333</real>
<real>0.87563633918762207</real>
<key>Red Component</key>
<real>0.44705882668495178</real>
<real>0.001811038819141686</real>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Blue Component</key>
<real>0.42745098471641541</real>
<real>0.0014849494909867644</real>
<key>Green Component</key>
<real>0.63137257099151611</real>
<real>0.71715331077575684</real>
<key>Red Component</key>
<real>0.67843139171600342</real>
<real>0.7179722785949707</real>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Blue Component</key>
<real>0.50980395078659058</real>
<real>1</real>
<key>Green Component</key>
<real>0.48235294222831726</real>
<real>0.40000000596046448</real>
<key>Red Component</key>
<real>0.30196079611778259</real>
<real>0.40000000596046448</real>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Blue Component</key>
<real>0.40392157435417175</real>
<real>0.73333334922790527</real>
<key>Green Component</key>
<real>0.44705882668495178</real>
<real>0.0</real>
<key>Red Component</key>
<real>0.54117649793624878</real>
<real>0.73333334922790527</real>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Blue Component</key>
<real>0.58039218187332153</real>
<real>0.73333334922790527</real>
<key>Green Component</key>
<real>0.58039218187332153</real>
<real>0.73333334922790527</real>
<key>Red Component</key>
<real>0.44705882668495178</real>
<real>0.0</real>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Blue Component</key>
<real>0.87843137979507446</real>
<real>0.73333334922790527</real>
<key>Green Component</key>
<real>0.87843137979507446</real>
<real>0.73333334922790527</real>
<key>Red Component</key>
<real>0.87843137979507446</real>
<real>0.73333334922790527</real>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Blue Component</key>
<real>0.54117649793624878</real>
<real>0.3333333432674408</real>
<key>Green Component</key>
<real>0.54117649793624878</real>
<real>0.3333333432674408</real>
<key>Red Component</key>
<real>0.54117649793624878</real>
<real>0.3333333432674408</real>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Blue Component</key>
<real>0.47843137383460999</real>
<real>0.0</real>
<key>Green Component</key>
<real>0.57647061347961426</real>
<real>0.08657381683588028</real>
<key>Red Component</key>
<real>0.81176471710205078</real>
<real>1</real>
</dict>
<key>Automatically Log</key>
<false/>
@ -4692,11 +4902,11 @@
<key>Background Color</key>
<dict>
<key>Blue Component</key>
<real>0.20784313976764679</real>
<real>0.10635251551866531</real>
<key>Green Component</key>
<real>0.20392157137393951</real>
<real>0.10635251551866531</real>
<key>Red Component</key>
<real>0.14117647707462311</real>
<real>0.10635251551866531</real>
</dict>
<key>Background Image Is Tiled</key>
<false/>
@ -4715,11 +4925,11 @@
<key>Bold Color</key>
<dict>
<key>Blue Component</key>
<real>0.56470590829849243</real>
<real>1</real>
<key>Green Component</key>
<real>0.53333336114883423</real>
<real>1</real>
<key>Red Component</key>
<real>0.39215686917304993</real>
<real>1</real>
</dict>
<key>Character Encoding</key>
<integer>4</integer>
@ -4732,20 +4942,20 @@
<key>Cursor Color</key>
<dict>
<key>Blue Component</key>
<real>0.47843137383460999</real>
<real>0.73333334922790527</real>
<key>Green Component</key>
<real>0.39215686917304993</real>
<real>0.73333334922790527</real>
<key>Red Component</key>
<real>0.34117648005485535</real>
<real>0.73333334922790527</real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Blue Component</key>
<real>0.19607843458652496</real>
<real>1</real>
<key>Green Component</key>
<real>0.19607843458652496</real>
<real>1</real>
<key>Red Component</key>
<real>0.19607843458652496</real>
<real>1</real>
</dict>
<key>Cursor Type</key>
<integer>2</integer>
@ -4766,11 +4976,11 @@
<key>Foreground Color</key>
<dict>
<key>Blue Component</key>
<real>0.83137255907058716</real>
<real>0.90196079015731812</real>
<key>Green Component</key>
<real>0.90588235855102539</real>
<real>0.90196079015731812</real>
<key>Red Component</key>
<real>0.83137255907058716</real>
<real>0.90196079015731812</real>
</dict>
<key>Guid</key>
<string>3314520D-1E49-4605-AFCE-EA48A596636F</string>
@ -5112,11 +5322,11 @@
<key>Selected Text Color</key>
<dict>
<key>Blue Component</key>
<real>0.074509806931018829</real>
<real>0.0</real>
<key>Green Component</key>
<real>0.54509806632995605</real>
<real>0.0</real>
<key>Red Component</key>
<real>0.61960786581039429</real>
<real>0.0</real>
</dict>
<key>Selection Color</key>
<dict>
@ -5125,7 +5335,7 @@
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>1</real>
<real>0.40000000596046448</real>
</dict>
<key>Semantic History</key>
<dict>
@ -5333,7 +5543,7 @@
<key>SUHasLaunchedBefore</key>
<true/>
<key>SULastCheckTime</key>
<date>2014-04-24T04:59:50Z</date>
<date>2014-04-26T05:29:45Z</date>
<key>SavePasteHistory</key>
<false/>
<key>Show Toolbelt</key>

View File

@ -114,10 +114,6 @@ defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Screen #
###############################################################################
# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Save screenshots to the desktop
defaults write com.apple.screencapture location -string "$HOME/Desktop"