Iterm scroll beyond last line11/6/2023 ![]() ![]() ![]() "BTTTouchBarAlternateBackgroundColor" : "255.000000, 38.028511, 0.000000, 255.000000",Īlthough this preset doesn't seem to get a huge amount of use, I found it to be exactly what I needed! "BTTTouchBarAppleScriptString" : "tell application \"iTerm\"\r\ttell current session of current window\r\t\tset myprofile to (profile name)\r\t\tif myprofile = \"Default\" then\r\t\t\tset outvalue to contents\r\t\tend if\r\tend tell\rend tell\r\r\rif myprofile is not \"Default\" then\r\ttell application \"iTerm\"\r\t\tset i to 0\r\t\trepeat with aWindow in windows\r\t\t\tif profile name of current session of aWindow = \"Default\" then\r\t\t\t\tset outvalue to contents of current session of aWindow\r\t\t\t\texit repeat\r\t\t\tend if\r\t\t\t\r\t\tend repeat\r\t\t#display dialog length of application\r\tend tell\rend if\r\rset endline to \"\n\"\rset startpos to -3\rset stoppos to -1\rset lastline to \"\"\rrepeat while length of lastline 2)\r\t\ttry\r\t\t\tset someText to text 2 thru -1 of someText\r\t\ton error\r\t\t\treturn \"\"\r\t\tend try\r\tend repeat\r\t\r\trepeat until (someText does not end with \" \" and someText does not end with endline and length of someText > 2)\r\t\tset someText to text 1 thru -2 of someText\r\tend repeat\r\t\r\treturn someText\rend trimThis\r", "BTTTouchBarFreeSpaceAfterButton" : "5.000000", "BTTLaunchPath" : "file:\/\/\/Applications\/iTerm.app", "BTTPredefinedActionName" : "Launch Application \/ Open File \/ Start Apple Script …", "BTTShellTaskActionScript" : "tell application \"iTerm\"\r\ttell current session of current window\r\t\tset myprofile to (profile name)\r\t\tif myprofile = \"Default\" then\r\t\t\treturn\r\t\tend if\r\tend tell\rend tell\r\rif myprofile is not \"Default\" then\r\ttell application \"iTerm\"\r\t\tset i to 0\r\t\trepeat with aWindow in windows\r\t\t\tset i to i + 1\r\t\t\tif profile name of current session of current tab of aWindow = \"Default\" then\r\t\t\t\tselect aWindow\r\t\t\t\treturn\r\t\t\t\texit repeat\r\t\t\tend if\r\t\t\t\r\t\tend repeat\r\t\t#display dialog length of application\r\tend tell\rend if", "BTTInlineAppleScript" : "tell application \"iTerm\"\r\ttell current session of current window\r\t\tset myprofile to (profile name)\r\t\tif myprofile = \"Default\" then\r\t\t\treturn\r\t\tend if\r\tend tell\rend tell\r\rif myprofile is not \"Default\" then\r\ttell application \"iTerm\"\r\t\tset i to 0\r\t\trepeat with aWindow in windows\r\t\t\tset i to i + 1\r\t\t\tif profile name of current session of current tab of aWindow = \"Default\" then\r\t\t\t\tselect aWindow\r\t\t\t\treturn\r\t\t\t\texit repeat\r\t\t\tend if\r\t\t\t\r\t\tend repeat\r\t\t#display dialog length of application\r\tend tell\rend if", ![]() "BTTPredefinedActionName" : "Run Apple Script (blocking)", "BTTTriggerClass" : "BTTTriggerTypeTouchBar", "BTTTriggerTypeDescription" : "Apple Script Widget", This requires iterm2 but you do not need to have shell integration activated. ![]() when you click on it, you will open the associate window.This is also color coded (green when the terminal is working and red when is waiting at shell prompt.I wanted to have on my touchbar the last line of my shell displayed such that I can loosely control what is happening. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |