First off, the only tech company on that list that I am kind of indifferent towards is Blackberry. I've never been much of a fan. The others however I like.
You're definitely taking capital from an industry that has run up in value and placing it into one that has witnessed a significant correction. Whether or not this pays off in 5 years is heavily dependent on the planet's demand for oil, and the rate at which interest rates rise.
I think there's still more room for a run-up in energy companies, and I hold XEG, the energy ETF, to gain exposure to this. I plan for it to be a multi-year hold and I will exit when I think the market cools down.
If I personally would be transitioning from oil and gas to tech, I'd probably be slowly doing it. There's certainly more room for tech to go down, and there's certainly more room for energy to go up.
I don't think your strategy is necessarily "bad" but for me personally, I just hold a portfolio that contains both tech and energy. Selling in and out of sectors can be a very difficult thing to time.