config.h (729B)
1 /* See LICENSE file for copyright and license details. */ 2 3 const char* chndlr_fallback_cmd = "firefox "; 4 5 #define P(RE,...) { RE, (const char*[]) { __VA_ARGS__, NULL} } 6 7 #define WEB_PREFIX(URL) "^(https?://www\\." URL "|https?://" URL ")" 8 9 static const Pair pairs[] = { 10 /* regex action */ 11 12 /* files */ 13 P( "\\.(jpg|png|tiff|gif)$","nsxiv", "%s" ), 14 P( "\\.mp3$", "st", "-e", "mplayer", "%s"), 15 16 /* web */ 17 18 /* youtube */ 19 P( WEB_PREFIX("youtube.com/watch\\?|youtu\\.be/"), "mpv", "%s"), 20 21 /* github */ 22 P( WEB_PREFIX("github.com") "/([^/]+)/([^/]+)/actions", 23 "gh", "run", "list", "--repo", "%1/%2/%3" ), 24 P( WEB_PREFIX("github.com"), "lynx", "%s" ), 25 }; 26 27 #undef P 28 #undef WEB_PREFIX