How to change terminal style back to default? - macos

I'm having problem to change the terminal style in my mac. I would like to change it back to default setting but I don't know how to. I want to remove the heart (as you see from the screenshot). Thank you! (This style was from Flatiron School online free swift coding lesson)
Terminal Screen Shot

This article
http://osxdaily.com/2013/04/08/add-emoji-command-line-bash-prompt/
would seem to indicate that there is a line in your .bash_profile that specifies this emoji using a line that begins with PS1=
so try
nano .bash_profile
add a # before any line that begins with PS1=
ctrl+O to save
return to confirm file name
ctrl+x to close nano

When in Terminal open the Settings via CMD+, or in the menu bar via "Terminal" > "Settings"
In the top bar close Profiles, now the window should look like this:
Now choose the Basic profile an hit standard.
Maybe this solves your problem.

Related

How to change the font color of SageMath terminal version 9.5?

I am rocking a Ubuntu 22.04 laptop, so I am stuck to SageMath v9.5, instead of the current version as of today. The font is currently blue, which is not the best match at all with the default purple terminal background. How could I change the color to, let's say, green?
I've tried something in this link, but the approach is so old, it doesn't apply to this version anymore. I can type %colors Linux at the Sage shell itself, but it resets whenever I log off.
You can change the font colour of the terminal by modifying the Sage Terminal profile in the terminal's preferences.
Open the terminal in SageMath.
Go to Edit > Profile Preferences.
In the Profile Preferences window, select the Colours tab.
4.Under Text colour, you can use the colour picker to select a new font colour for the terminal.
5.Click Close to apply the changes and close the window.
I've tried something in this link, but the approach is so old, it
doesn't apply to this version anymore. I can type %colors Linux at the
Sage shell itself, but it resets whenever I log off.
You have to save the command %colors Linux into init.sage file which will be save at location ~/.sage/init.sage you can flow the below steps to achieve this
Open the Terminal by pressing keys Ctrl+Alt+T or from all programs
Go to ~/.sage directory by using cd ~/.sage command
Enter touch init.sage to create a file by the name init.sage
Open the file with an editor like vim/nano etc
Now write the command %colors Linux and save the file and close it
New font color will not change after restarting sage

iTerm2 tab names change; what is this bash command?

I use iTerm2 as my terminal on OS X. When I SSH into a machine, I like to name my tabs by going into the session preferences (cmd + i). Whenever I run another bash command after setting this preference, the tab title goes back to the default that it was when I first SSHd in.
Browsing around for an answer, I found this answer by Chad that is working for me:
export PROMPT_COMMAND=''
echo -e "\033];MY_NEW_TITLE\007"
I don't really understand the PROMPT_COMMAND line, though I tried looking it up.
Can someone explain this in simple terms?
Same question for the 2nd line, as I don't even know how to begin researching that.
To keep the original tab:
Go to Iterm's Preferences > Profiles > Terminal
Uncheck "Terminal may set tab/window title"
Now you can name your tab, ssh into a server, exit and still keep the original tab name.
Credit to: https://groups.google.com/forum/#!topic/iterm2-discuss/czV-sv4ykzI
You can read iTerm2 escape code .
I didn't read the related iTerm2 code thoroughly, but it seems like an interface to manipulate iTerm2.
I guess iTerm2 does this magic by parse the output of screen if the contents fit special format(start by "\033]" and so on), iTerm2 will consider that's the information mean to sent to itself.
I used tabset node plugin. It works like a charm, and also color codes each tab, and has multiple options to color code, add a badge and even bring up a color picker to choose.

Rename tab in MobaXterm for session duration

How can we rename tabs in MobaXTerm for the entire session duration? At the moment, I can right-click and rename the tabs, but as soon as I press enter to get command prompt, MobaXTerm resets tab name to its original default. I have tried changing PS1 env variable with no effect. Please help.
I haven't tried this myself but when you create a profile for a new ssh session, there is a tab "Bookmark settings" and within this tab there is a check box named "Lock terminal title." According to the manual:
Lock terminal title
Terminal title will be set to the session name
If you check this option, any attempt by the shell to set tab title will fail.
Uncheck this option if you want to allow the shell to change tab title.
Looks like you need to open every new tab as a New Session (Click on the "Session" button) and then follow what ks2000 suggested (It works for me).
There is limitation in number of sessions created for non-purchased mobaxterm. When you go for edit the session, red coloured message this message will be displayed. Delete unwanted sessions, unlock terminal title, then it will work. Otherwise purchase mobaxterm.
A bit late, but I came across this and wanted to update it.
I found the answer here:
https://stackoverflow.com/questions/29963545/rename-tab-in-mobaxterm-for-session-duration
I wrote a bash function to quickly handle this for me.
set_title() {
PROMPT_COMMAND="echo -ne \"\033]0;$1\a\""
}
set_title "webserver"
If none of the above works, just go to the sessions tab and click on the session you want to rename (just like when you want to rename a file). You should see the following:
After that, enter the preferred name and hit enter. The following window will occur:
Click yes and voilĂ !
THIS IS NOT FOR THE SESSION DURATION BUT PERMANENT

Terminal window inside Sublime Text 2

I saw this project that basically opens a new terminal window from sublime text-2.
What I'm looking for is a way to open the terminal inside sublime text 2 via console.
Does anyone knows how can I do that?
SublimeREPL does what you want
https://github.com/wuub/SublimeREPL/
Of course, there are some limitations because the window of Sublime Text 2 is not originally designed for continuous running buffer of stdin input.
+ 2 years (sorry) - but my solution in ubuntu was to open both sublime and my (real) terminal in the same window, shrink and stretch the terminal to cover the lower portion of the screen, then right click on the terminal and select "keep on top" - works a treat.
EDIT 04/23/2019: Terminus extends TerminalView & adds:
Windows support
Continuous history
Easily customizable themes (see Terminus Utilities)
Unicode support
256 colors support
Better xterm support
Terminal panel view
imgcat support (also works on Linux / WSL)
Bind key shortcut to open shell on file path (e.g. ctrl+alt+t to open):
{
"keys": ["ctrl+alt+t"], "command": "terminus_open", "args": {
"cwd": "${file_path:${folder}}"
}
}
Original Answer:
I've tried pretty much every terminal package around, what you want is TerminalView:
To bind a key shortcut, simply add it to your user key bindings file:
{ "keys": ["ctrl+alt+t"], "command": "terminal_view_open" },
Use Glue. It is a plugin that provides an interface to your shell from the Sublime Text. So basically it a terminal for Sublime Text.
https://packagecontrol.io/packages/Glue
Like #mikko I also decided that due to the limitations of the shell add-ons for sublime to stick with a real terminal window - I've got too used to the F2-F4 workflow of geany.
So really the issue for me is quickly flip-flopping between the two windows easily. To that end, I knocked this up - to be fired from F12 (or whatever you want) in your desktop manager (XFCE in my case)
Note, I launch sublime a from shortcut with terminator -T st3_bash & st3 so I've got a known bash window title for switching focus to.
https://gist.github.com/robertpearce/8725224
I know this code is really, (really) bad, and it'll fail if you have multiple sublime's open, but i don't ever have that anyhow.
Feel free to fork and improve it.
I have always wanted a way to open terminal inside sublime text. After trying out different options I have come to a solution of installing guake terminal as a work around on linux systems, follow the steps below.
Run the command sudo apt-get install guake
Press F12 (for opening terminal)
Now you can use the terminal without leaving sublime.
For windows :
Install Conemu
Have the Quake settings as shown in the pic below
Press ctrl + ~ (for opening terminal)
Note: This is just a workaround. Guake is basically a terminal package for ubuntu-like linux systems.

How do I turn the beep slash bell off in cygwin?

The system beep/bell happens frequently (ie, when I type a few letters then type tab to autocomplete when there are a few options).
How can I turn this off?
I googled it and tried:
set bell-style none (the command went through but nothing changed)
and
setterm -blength 0 (got a bash command not found)
Thanks!
Add set bell-style none to .inputrc in your home directory. You need to start a new shell for this to take effect; that may be why your test didn't work.
The default terminal mintty has built-in options to control the terminal bell.
Right-click on the background and click "Options..."
Select the "Terminal" section.
Change the "Bell" dropdown to "none"
Note: Here you can also enable or disable the visible bell (terminal flashing) and to highlight the taskbar icon on a bell ring.
Cut the wire to your speaker. :-)
An alternative solution that doesn't seem to be mentioned here is:
Right click on the header of the Cygwin window and chose Options...:
In the options menu, under the Terminal tab, choose "no beep":
This should take effect immediately without having to restart Cygwin.
I experienced a series of beeps when I would cat a particular file. The above tips did not silence the bell. In my case, the beeps were due to bullet points that had been copy/pasted into the file. Replacing the bullets with dashes stopped the beeping.
Use mintty. Among many other advantages over the usual console, the bell is off by default.
Path to '.inputrc:
'C:\cygwin64\home\<username>\.inputrc

Resources