From: Oleg Broytman Date: Wed, 27 Jul 2016 14:27:50 +0000 (+0300) Subject: .fvwm/main.m4: refactor remote host macros X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=6930d98c59d2bfaf2c9fdae0ce1ea8f1a0ce36c1;p=dotfiles.git .fvwm/main.m4: refactor remote host macros --- diff --git a/.fvwm/main.m4 b/.fvwm/main.m4 index 839333d..ca87a1b 100644 --- a/.fvwm/main.m4 +++ b/.fvwm/main.m4 @@ -91,17 +91,23 @@ define(`TERM_KOI8_BOTRT', `TERM_KOI8 -geometry TERM_GEOM_BOTRT') define(`TERM_UTF8_BOTRT', `TERM_UTF8 -geometry TERM_GEOM_BOTRT') +define(`REMOTE_HOST_TERM', +`$1 -e ssh -4 $2') + +define(`REMOTE_HOST_TERM_TITLE', +`$1 -title $3 -n $3 -e ssh -4 $2') + define(`REMOTE_HOST_KOI8', -`TERM_KOI8 -title "$2" -n "$2" -e ssh -4 "$1"') +REMOTE_HOST_TERM_TITLE(TERM_KOI8, $1, $2)) define(`REMOTE_HOST_KOI8_MENU', "$2 (koi8)" REMOTE_HOST_KOI8($1, $2)) define(`REMOTE_HOST_KOI8_BOTLT', -TERM_KOI8_BOTLT -title "$2" -n "$2" -e ssh -4 "$1") +REMOTE_HOST_TERM_TITLE(TERM_KOI8_BOTLT, $1, $2)) define(`REMOTE_HOST_KOI8_BOTRT', -`TERM_KOI8_BOTRT -title "$2" -n "$2" -e ssh -4 "$1"') +REMOTE_HOST_TERM_TITLE(TERM_KOI8_BOTRT, $1, $2)) define(`REMOTE_HOST_KOI8_BOTLT_MENU', "$2 (koi8,btlt)" REMOTE_HOST_KOI8_BOTLT($1, $2)) @@ -110,16 +116,16 @@ define(`REMOTE_HOST_KOI8_BOTRT_MENU', "$2 (koi8,btrt)" REMOTE_HOST_KOI8_BOTRT($1, $2)) define(`REMOTE_HOST_UTF8', -TERM_UTF8 -e ssh -4 "$1") +REMOTE_HOST_TERM(TERM_UTF8, $1)) define(`REMOTE_HOST_UTF8_MENU', "$2 (utf8)" REMOTE_HOST_UTF8($1, $2)) define(`REMOTE_HOST_UTF8_BOTLT', -TERM_UTF8_BOTLT -e ssh -4 "$1") +REMOTE_HOST_TERM(TERM_UTF8_BOTLT, $1)) define(`REMOTE_HOST_UTF8_BOTRT', -TERM_UTF8_BOTRT -e ssh -4 "$1") +REMOTE_HOST_TERM(TERM_UTF8_BOTRT, $1)) define(`REMOTE_HOST_UTF8_BOTLT_MENU', "$2 (utf8,btlt)" REMOTE_HOST_UTF8_BOTLT($1, $2))