diff options
| author | Reiner Herrmann <reiner@reiner-h.de> | 2023-01-06 17:46:19 +0100 |
|---|---|---|
| committer | Reiner Herrmann <reiner@reiner-h.de> | 2023-01-06 17:46:19 +0100 |
| commit | be6d4f8848a00fdf1189fdcea8b388c08893756d (patch) | |
| tree | 78460afa8c41463bd2c11fcebeab91797b054632 /alacritty | |
| parent | c2cc205b9ba9406ef7d71fd148961e21ec417bba (diff) | |
alacritty: add config and script for opening urls
Diffstat (limited to 'alacritty')
| -rw-r--r-- | alacritty/alacritty.yml | 58 | ||||
| -rwxr-xr-x | alacritty/open_url.sh | 8 |
2 files changed, 66 insertions, 0 deletions
diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml new file mode 100644 index 0000000..a14fd74 --- /dev/null +++ b/alacritty/alacritty.yml @@ -0,0 +1,58 @@ +font: + normal: + family: Iosevka Term + style: Regular + size: 8.0 + +hints: + enabled: + - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ + [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + hyperlinks: true + command: xdg-open + post_processing: true + mouse: + enabled: true + mods: None + - regex: "(?:Closes:.|\\#)(1?\\d{6})" + command: open_url.sh + mouse: + enabled: true + - regex: "(1?\\d{6})@bugs.debian.org" + command: open_url.sh + mouse: + enabled: true + +# srcery +colors: + # Default colors + primary: + background: '#1c1b19' + foreground: '#fce8c3' + + # Cursor colors + cursor: + text: CellBackground + cursor: '#fbb829' + + # Normal colors + normal: + black: '#1c1b19' + red: '#ef2f27' + green: '#519f50' + yellow: '#fbb829' + blue: '#2c78bf' + magenta: '#e02c6d' + cyan: '#0aaeb3' + white: '#baa67f' + + # Bright colors + bright: + black: '#918175' + red: '#f75341' + green: '#98bc37' + yellow: '#fed06e' + blue: '#68a8e4' + magenta: '#ff5c8f' + cyan: '#2be4d0' + white: '#fce8c3' diff --git a/alacritty/open_url.sh b/alacritty/open_url.sh new file mode 100755 index 0000000..f4b658c --- /dev/null +++ b/alacritty/open_url.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# open Debian bugs in browser +bugnr=$(echo "$1" | perl -lne 'print $1 if /^(?:Closes: |#)(1?\d{6})$/') +[ -z "$bugnr" ] && bugnr=$(echo "$1" | perl -lne 'print $1 if /^(1?\d{6})\@bugs\.debian\.org$/') +[ -z "$bugnr" ] && exit 1 + +exec x-www-browser "https://bugs.debian.org/$bugnr" |
