summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-04 21:24:00 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-04 21:24:00 -0700
commit63c3a0e29310ef38c6241161c141577b33896e9b (patch)
tree281979c25b335e7d89b9ebb836ad434ee0109809 /scripts
parent496ee3bfe35a2f5f8f112c9400a36ff71eb2151d (diff)
downloaddotfiles-63c3a0e29310ef38c6241161c141577b33896e9b.tar.gz
use wofi with sway
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/desktop/wofi_ssh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/desktop/wofi_ssh b/scripts/desktop/wofi_ssh
new file mode 100755
index 00000000..525cf94b
--- /dev/null
+++ b/scripts/desktop/wofi_ssh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+host=$(perl -wlne'/^Host\s+(\S+)/ and !/\*/ and print $1' $HOME/.ssh/config \
+ | wofi --dmenu -p "ssh to tmux on host" "$@")
+if [ -n "$host" ]; then
+ ssh-and-tmux-term "$host"
+fi