scripts/rofi/rofi-ssh-menu.sh

29 lines
1.5 KiB
Bash
Raw Normal View History

2020-09-11 15:00:39 +00:00
#!/bin/bash
res=$(echo "john.me.tz|root@john.me.tz|t470s.lan.john.me.tz|shb.ng|kipary.mailcleaner.net|media.lan.john.me.tz|pipcam.lan.john.me.tz|therm.lan.john.me.tz|hud.lan.john.me.tz|vm.lan.john.me.tz" | rofi -sep "|" -dmenu -i -p 'P ' "" -columns 1 -rows 1 -width 45 -l 1 -config /home/jpm/.config/rofi/config -hide-scrollbar -eh 1 -location 0 -yoffset 0 -padding 12 -opacity 100 -auto-select -no-fullscreen)
if [ $res = "john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs w'
elif [ $res = "root@john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs r'
elif [ $res = "shb.ng" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs s'
elif [ $res = "kipary.mailcleaner.net" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs d'
elif [ $res = "camera.lan.john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs c'
elif [ $res = "hud.lan.john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs h'
elif [ $res = "media.lan.john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs m'
elif [ $res = "programmer.lan.john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs p'
elif [ $res = "t470s.lan.john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs l'
elif [ $res = "therm.lan.john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs t'
elif [ $res = "vm.lan.john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs v'
fi
exit 0