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.

29 lines
1.5KB

  1. #!/bin/bash
  2. 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)
  3. if [ $res = "john.me.tz" ]; then
  4. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs w'
  5. elif [ $res = "root@john.me.tz" ]; then
  6. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs r'
  7. elif [ $res = "shb.ng" ]; then
  8. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs s'
  9. elif [ $res = "kipary.mailcleaner.net" ]; then
  10. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs d'
  11. elif [ $res = "camera.lan.john.me.tz" ]; then
  12. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs c'
  13. elif [ $res = "hud.lan.john.me.tz" ]; then
  14. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs h'
  15. elif [ $res = "media.lan.john.me.tz" ]; then
  16. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs m'
  17. elif [ $res = "programmer.lan.john.me.tz" ]; then
  18. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs p'
  19. elif [ $res = "t470s.lan.john.me.tz" ]; then
  20. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs l'
  21. elif [ $res = "therm.lan.john.me.tz" ]; then
  22. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs t'
  23. elif [ $res = "vm.lan.john.me.tz" ]; then
  24. /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs v'
  25. fi
  26. exit 0