A variety of simple automation scripts and enhancements to Sway and i3.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.6KB

  1. #!/bin/bash
  2. res=$(echo "john.me.tz|root@john.me.tz|t470s.lan.john.me.tz|shb.ng|\
  3. kipary.mailcleaner.net|media.lan.john.me.tz|pipcam.lan.john.me.tz|\
  4. therm.lan.john.me.tz|hud.lan.john.me.tz|vm.lan.john.me.tz" | \
  5. rofi -sep "|" -dmenu -i -p 'P ' "" -columns 1 -rows 1 -width 45 -l 1 -config \
  6. /home/jpm/.config/rofi/config -hide-scrollbar -eh 1 -location 0 -yoffset 0 \
  7. -padding 12 -opacity 100 -auto-select -no-fullscreen)
  8. if [ $res = "john.me.tz" ]; then
  9. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs w'
  10. elif [ $res = "root@john.me.tz" ]; then
  11. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs r'
  12. elif [ $res = "shb.ng" ]; then
  13. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs s'
  14. elif [ $res = "kipary.mailcleaner.net" ]; then
  15. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs d'
  16. elif [ $res = "camera.lan.john.me.tz" ]; then
  17. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs c'
  18. elif [ $res = "hud.lan.john.me.tz" ]; then
  19. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs h'
  20. elif [ $res = "media.lan.john.me.tz" ]; then
  21. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs m'
  22. elif [ $res = "programmer.lan.john.me.tz" ]; then
  23. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs p'
  24. elif [ $res = "t470s.lan.john.me.tz" ]; then
  25. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs l'
  26. elif [ $res = "therm.lan.john.me.tz" ]; then
  27. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs t'
  28. elif [ $res = "vm.lan.john.me.tz" ]; then
  29. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs v'
  30. fi
  31. exit 0