Do not tell anyone about your plans until you are ready to hand in the letter! Not even anyone outside work. You do not want them preempting you with the layoff.
This way you might even get a substantial raise and slack off for several more months for more money while they find / you train your replacement if you are not immediately replaceable.
This way you might even get a substantial raise and slack off for several more months for more money while they find / you train your replacement if you are not immediately replaceable.