-
-
Save zz/11e66023e653ba1cb1d7 to your computer and use it in GitHub Desktop.
steps for changing term background color on any SSH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* How to change background iTerm color on SSH when using fish shell | |
*/ | |
// Put this in a file, replace RGB color with your current bgcolor. ex: original-bgcolor | |
tell application "iTerm" | |
tell the current terminal | |
tell the current session | |
set background color to {0,0,0} | |
end tell | |
end tell | |
end tell | |
// Put this in a file. ex: on-ssh-bgcolor | |
tell application "iTerm" | |
tell the current terminal | |
tell the current session | |
set background color to {12850,12850,12850} | |
end tell | |
end tell | |
end tell | |
// Create a bash script, make it executable and put it in your path. ex /usr/local/bin/ssh-bgcolor | |
#!/bin/bash | |
osascript ~/on-ssh-bgcolor | |
ssh $@ | |
osascript ~/original-bgcolor | |
// Create a fish function for aliasing your ssh command. write the following to ~/.config/fish/functions/ssh.fish | |
alias ssh='/usr/local/bin/ssh-bgcolor' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment