Antsy
view release on metacpan or search on metacpan
lib/Antsy.pm view on Meta::CPAN
# OSC 1337 ; CursorShape=[N] ST
sub _iterm_set_cursor ( $n ) {
unless( $n == 0 or $n == 1 or $n == 2 ) {
carp "The cursor type can be 0, 1, or 2, but you specified <$n>";
return;
}
OSC() . 1337 . ';' . "CursorShape=$n" . 'ST'
}
sub iterm_set_block_cursor () { state $s = _iterm_set_cursor(0); $s }
sub iterm_set_bar_cursor () { state $s = _iterm_set_cursor(1); $s }
sub iterm_set_underline_cursor () { state $s = _iterm_set_cursor(2); $s }
=item * set_mark
Same as Command-Shift-M. Mark the current location and jump back to it
with Command-Shift-J.
=cut
# OSC 1337 ; SetMark ST
sub set_mark () { state $s = _osc_1337( 'SetMark' ); $s }
=item * steal_focus
Bring the window to the foreground.
=cut
# OSC 1337 ; StealFocus ST
sub steal_focus () { state $s = _osc_1337( 'StealFocus' ); $s }
=item * clear_scrollback_history
Erase the scrollback history.
=cut
# OSC 1337 ; ClearScrollback ST
sub clear_scrollback_history () { state $s = _osc_1337( 'ClearScrollback' ); $s }
=item * post_notification
=cut
# OSC 9 ; [Message content goes here] ST
=item * set_current_directory
=cut
# OSC 1337 ; CurrentDir=[current directory] ST
=item * change_profile
=cut
# OSC 1337 SetProfile=[new profile name] ST
=item * start_copy_to_clipboard
=item * end_copy_to_clipboard
=cut
# OSC 1337 ; CopyToClipboard=[clipboard name] ST
# OSC 1337 ; EndCopy ST
=item * change_color_palette
[key] gives the color to change. The accepted values are: fg bg bold link selbg selfg curbg curfg underline tab" black red green yellow blue magenta cyan white br_black br_red br_green br_yellow br_blue br_magenta br_cyan br_white
[value] gives the new color. The following formats are accepted:
RGB (three hex digits, like fff)
RRGGBB (six hex digits, like f0f0f0)
cs:RGB (like RGB but cs gives a color space)
cs:RRGGBB (like RRGGBB but cs gives a color space)
If a color space is given, it should be one of:
srgb (the standard sRGB color space)
rgb (the device-specific color space)
p3 (the standard P3 color space, whose gamut is supported on some newer hardware)
=cut
# OSC 1337 ; SetColors=[key]=[value] ST
=item * add_annotation
OSC 1337 ; AddAnnotation=[message] ST
OSC 1337 ; AddAnnotation=[length] | [message] ST
OSC 1337 ; AddAnnotation=[message] | [length] | [x-coord] | [y-coord] ST
OSC 1337 ; AddHiddenAnnotation=[message] ST
OSC 1337 ; AddHiddenAnnotation=[length] | [message] ST
OSC 1337 ; AddHiddenAnnotation=[message] | [length] | [x-coord] | [y-coord] ST
`[message]`: The message to attach to the annotation.
`[length]`: The number of cells to annotate. Defaults to the rest of the line beginning at the start of the annotation.
`[x-coord]` and `[y-coord]`: The starting coordinate for the annotation. Defaults to the cursor's coordinate.
=cut
sub add_annotation () {}
=item * hide_cursor_guide
=item * show_cursor_guide
=cut
# OSC 1337 ; HighlightCursorLine=[boolean] ST
sub hide_cursor_guide () { state $s = _osc_1337( 'HighlightCursorLine=no' ); $s }
sub show_cursor_guide () { state $s = _osc_1337( 'HighlightCursorLine=yes' ); $s }
=item * iterm_attention
Play with the dock icon.
=over 4
=item * fireworks - animation at the cursor
=item * no - stop bouncing the dock icon
=item * once - bounce the dock icon once
( run in 1.468 second using v1.01-cache-2.11-cpan-df04353d9ac )