]> git.phdru.name Git - dotfiles.git/commitdiff
.fvwm/main.m4: add macros for ssh connection sharing terms
authorOleg Broytman <phd@phdru.name>
Wed, 27 Jul 2016 14:28:18 +0000 (17:28 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 27 Jul 2016 18:43:44 +0000 (21:43 +0300)
.fvwm/main.m4

index ca87a1b8a94d0d7122d2edb4bbc4bb3139ba82d7..db62cb9cc640f65f6a4414c4338e4a75aa0ee124 100644 (file)
@@ -138,6 +138,28 @@ TERM_KOI8 -geometry TERM_GEOM_BIG -title "$2" -n "$2" -e ssh -4 "$1")
 
 define(`REMOTE_HOST_KOI8_BIG_MENU',
 "$2 (koi8)" REMOTE_HOST_KOI8_BIG($1, $2))
+
+define(`SSH_CONNECTION_SHARING_TERM',
+$1 -title "git@$3" -n "git@$3" -e ssh -N4 "$2")
+
+define(`SSH_CONNECTION_SHARING_UTF8',
+SSH_CONNECTION_SHARING_TERM(TERM_UTF8, $1, $2))
+
+define(`SSH_CONNECTION_SHARING_UTF8_BOTLT',
+SSH_CONNECTION_SHARING_TERM(TERM_UTF8_BOTLT, $1, $2))
+
+define(`SSH_CONNECTION_SHARING_UTF8_BOTRT',
+SSH_CONNECTION_SHARING_TERM(TERM_UTF8_BOTRT, $1, $2))
+
+define(`SSH_CONNECTION_SHARING_UTF8_MENU',
+"git@$2 (utf8)" SSH_CONNECTION_SHARING_UTF8($1, $2))
+
+define(`SSH_CONNECTION_SHARING_UTF8_BOTLT_MENU',
+"git@$2 (utf8,btlt)" SSH_CONNECTION_SHARING_UTF8_BOTLT($1, $2))
+
+define(`SSH_CONNECTION_SHARING_UTF8_BOTRT_MENU',
+"git@$2 (utf8,btrt)" SSH_CONNECTION_SHARING_UTF8_BOTRT($1, $2))
+
 divert
 
 ##########################################################################
@@ -704,7 +726,14 @@ AddToMenu TermColors    "Term Colors" Title
 +                       "Term: white/deeppink" TERM_KOI8 -fg white -cr white -bg deeppink
 +                       "Term: white/black" TERM_KOI8 -fg white -cr white -bg black
 
+AddToMenu SSH-connection-sharing "SSH connection sharing" Title
++                       SSH_CONNECTION_SHARING_UTF8_MENU(phd@git.code.sf.net, SF)
++                       SSH_CONNECTION_SHARING_UTF8_BOTLT_MENU(git@gitlab.com, gitlab)
++                       SSH_CONNECTION_SHARING_UTF8_BOTRT_MENU(git@github.com, github)
+
 AddToMenu Systems       "Systems" Title
++                       "SSH connection sharing" Popup SSH-connection-sharing
++                       ""        Nop
 +                       REMOTE_HOST_KOI8_MENU(phdru.name, phdru)
 +                       REMOTE_HOST_UTF8_MENU(phdru.name, phdru)
 +                       REMOTE_HOST_KOI8_BIG_MENU(phdru.name, PHDRU)