File: urxvt.go

package info (click to toggle)
golang-github-charmbracelet-x 0.0~git20251028.0cf22f8%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,940 kB
  • sloc: sh: 124; makefile: 5
file content (17 lines) | stat: -rw-r--r-- 515 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package ansi

import (
	"fmt"
	"strings"
)

// URxvtExt returns an escape sequence for calling a URxvt perl extension with
// the given name and parameters.
//
//	OSC 777 ; extension_name ; param1 ; param2 ; ... ST
//	OSC 777 ; extension_name ; param1 ; param2 ; ... BEL
//
// See: https://man.archlinux.org/man/extra/rxvt-unicode/urxvt.7.en#XTerm_Operating_System_Commands
func URxvtExt(extension string, params ...string) string {
	return fmt.Sprintf("\x1b]777;%s;%s\x07", extension, strings.Join(params, ";"))
}