2017-01-14 18:42:55 +01:00
|
|
|
#!/bin/bash
|
2016-12-11 08:12:15 +01:00
|
|
|
if [ "$1" == 'root' ]; then
|
|
|
|
a=" (root)"
|
2017-02-12 15:31:40 +01:00
|
|
|
b="-t 'sudo -s'"
|
2016-12-11 23:12:43 +01:00
|
|
|
fi
|
|
|
|
machine=$(cat ~/.ssh/config | grep '^Host ' | cut -d ' ' -f 2 | grep -v '*' | sort | $HOME/.config/i3/dmenu_cmd -p "SSH$a to ")
|
|
|
|
if [ ! -z $machine ]; then
|
2018-07-10 14:50:07 +02:00
|
|
|
urxvtc -e ssh $machine $b
|
2016-12-11 08:12:15 +01:00
|
|
|
fi
|