summaryrefslogtreecommitdiff
path: root/archive/scripts/desktop/dmenu_ssh
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2024-04-22 07:32:20 +0100
committerSean Whitton <spwhitton@spwhitton.name>2024-04-22 07:33:14 +0100
commit4772be9dbdc18a7ead4339ee2500d9e828af4c8a (patch)
tree9e0cc9caf5694ae9bac3b4cd369b36367c98b5e2 /archive/scripts/desktop/dmenu_ssh
parent05ba620733f91b2994d04f8cdf1e49d9a0c7a511 (diff)
downloaddotfiles-4772be9dbdc18a7ead4339ee2500d9e828af4c8a.tar.gz
archive remaining i3-specific config
Diffstat (limited to 'archive/scripts/desktop/dmenu_ssh')
-rwxr-xr-xarchive/scripts/desktop/dmenu_ssh7
1 files changed, 7 insertions, 0 deletions
diff --git a/archive/scripts/desktop/dmenu_ssh b/archive/scripts/desktop/dmenu_ssh
new file mode 100755
index 00000000..76d9aa72
--- /dev/null
+++ b/archive/scripts/desktop/dmenu_ssh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+host=$(perl -wlne'/^Host\s+(\S+)/ and !/\*/ and print $1' $HOME/.ssh/config \
+ | dmenu -p "ssh to tmux on host" "$@")
+if [ -n "$host" ]; then
+ xfce4-terminal -x ssh-and-tmux "$host"
+fi