scripts/rofi/rofi-ssh-menu.sh

42 lines
1.9 KiB
Bash
Raw Normal View History

2020-09-11 15:00:39 +00:00
#!/bin/bash
2020-11-23 09:35:26 +00:00
res=$(echo "john.me.tz|root@john.me.tz|t470s.lan.john.me.tz|shb.ng|\
kipary.fastnet.ch|media.lan.john.me.tz|pipcam0.lan.john.me.tz|\
2022-04-19 04:19:52 +00:00
therm.lan.john.me.tz|hud.lan.john.me.tz|vm.lan.john.me.tz|mac.lan.john.me.tz|light.lan.john.me.tz|\
AndroidUSB" | \
2020-11-23 09:35:26 +00:00
rofi -sep "|" -dmenu -i -p 'P ' "" -columns 1 -rows 1 -width 45 -l 1 -config \
/home/jpm/.config/rofi/config.rasi -theme /home/jpm/.config/rofi/sidebar.rasi -hide-scrollbar -eh 1 -location 0 -yoffset 0 \
2020-11-23 09:35:26 +00:00
-padding 12 -opacity 100 -auto-select -no-fullscreen)
2020-09-11 15:00:39 +00:00
echo $res > /home/jpm/.last_ssh_shortcut
2020-09-11 15:00:39 +00:00
if [ $res = "john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs w'
2020-09-11 15:00:39 +00:00
elif [ $res = "root@john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs r'
2020-09-11 15:00:39 +00:00
elif [ $res = "shb.ng" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs s'
elif [ $res = "kipary.fastnet.ch" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs d'
2020-09-11 15:00:39 +00:00
elif [ $res = "camera.lan.john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs c'
2020-09-11 15:00:39 +00:00
elif [ $res = "hud.lan.john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs h'
2020-09-11 15:00:39 +00:00
elif [ $res = "media.lan.john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs m'
2020-09-11 15:00:39 +00:00
elif [ $res = "programmer.lan.john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs p'
2020-09-11 15:00:39 +00:00
elif [ $res = "t470s.lan.john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs l'
2020-09-11 15:00:39 +00:00
elif [ $res = "therm.lan.john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs t'
2020-09-11 15:00:39 +00:00
elif [ $res = "vm.lan.john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs v'
2022-04-19 04:19:52 +00:00
elif [ $res = "light.lan.john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs light'
elif [ $res = "mac.lan.john.me.tz" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/gvncviewer 192.168.2.10 >> /home/jpm/macos
2021-07-31 01:30:28 +00:00
elif [ $res = "AndroidUSB" ]; then
2023-01-06 19:41:31 +00:00
/usr/bin/scrcpy
2020-09-11 15:00:39 +00:00
fi
exit 0