diff options
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | config/aerc.conf | 10 | ||||
-rw-r--r-- | config/general.go | 2 | ||||
-rw-r--r-- | doc/aerc-config.5.scd | 12 | ||||
-rw-r--r-- | widgets/terminal.go | 3 |
5 files changed, 30 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 36dc8f58..5612b09f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,6 @@ All notable changes to aerc will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased](https://git.sr.ht/~rjarry/aerc/log/master) -- Search/filter by flags with the `-H` flag. ### Added @@ -24,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Allow basic shell globbing in `[openers]` MIME types. - Dynamic `msglist_*` styling based on email header values in stylesets. - Add `mail-received`, `aerc-startup`, and `aerc-shutdown` hooks. +- Search/filter by flags with the `-H` flag. ### Changed @@ -35,7 +35,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). `signature-file` and `signature-cmd` if not already present. - All `aerc(1)` commands now interpret `aerc-templates(7)` markup. - running commands (like mailto: or mbox:) no longer prints a success message -- The built-in `colorize` filter now emits OSC 8 to mark URLs and emails. +- The built-in `colorize` filter now emits OSC 8 to mark URLs and emails. Set + `[general].enable-osc8 = true` in `aerc.conf` to enable it. ### Deprecated diff --git a/config/aerc.conf b/config/aerc.conf index 62d2ba92..cb720e07 100644 --- a/config/aerc.conf +++ b/config/aerc.conf @@ -38,6 +38,16 @@ # Default: info #log-level=info +# Set the $TERM environment variable used for the embedded terminal. +# +# Default: xterm-256color +#term=xterm-256color + +# Display OSC8 strings in the embedded terminal +# +# Default: false +#enable-osc8=false + [ui] # # Describes the format for each row in a mailbox view. This is a comma diff --git a/config/general.go b/config/general.go index a2c5e765..65c20cfd 100644 --- a/config/general.go +++ b/config/general.go @@ -17,6 +17,8 @@ type GeneralConfig struct { LogFile string `ini:"log-file"` LogLevel log.LogLevel `ini:"log-level" default:"info" parse:"ParseLogLevel"` DisableIPC bool `ini:"disable-ipc"` + EnableOSC8 bool `ini:"enable-osc8" default:"false"` + Term string `ini:"term" default:"xterm-256color"` } var General = new(GeneralConfig) diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd index 4931d021..5a04288a 100644 --- a/doc/aerc-config.5.scd +++ b/doc/aerc-config.5.scd @@ -67,6 +67,18 @@ These options are configured in the *[general]* section of _aerc.conf_. Default: _false_ +*term* = _<TERM>_ + Set the $TERM environment variable used for the embedded terminal. + + Default: _xterm-256color_ + +*enable-osc8* = __true_|_false_ + Enable the embedded terminal to output OSC 8 (hyperlinks) escape + sequences. Not all terminal emulators handle OSC 8 sequences properly + and can produce confusing results, disable this setting if that occurs. + + Default: _false_ + # UI OPTIONS These options are configured in the *[ui]* section of _aerc.conf_. diff --git a/widgets/terminal.go b/widgets/terminal.go index cbc943d7..8a75fb78 100644 --- a/widgets/terminal.go +++ b/widgets/terminal.go @@ -3,6 +3,7 @@ package widgets import ( "os/exec" + "git.sr.ht/~rjarry/aerc/config" "git.sr.ht/~rjarry/aerc/lib/ui" "git.sr.ht/~rjarry/aerc/log" tcellterm "git.sr.ht/~rockorager/tcell-term" @@ -32,6 +33,8 @@ func NewTerminal(cmd *exec.Cmd) (*Terminal, error) { vterm: tcellterm.New(), visible: true, } + term.vterm.OSC8 = config.General.EnableOSC8 + term.vterm.TERM = config.General.Term return term, nil } |