Manual switch plus pir

Hi Arduino community. Firstly, I am a super noob, please don't get to irritated with my stupid questions. The project I want to complete is a bedroom light switch, which utilizes a momentary switch and a pir sensor. The idea is when the switch/button is pressed, and the pir detects motion, that the light is switched on. If after a predetermined time period has passed with no movement detected, that the light switches off automatically. However I would also like the option that if I want to turn off the light manually, that I can do that by pressing the button again. As you may have guessed I have at least one offspring. But the other use I would have for this project is for some of the tools I use at my workbench, like soldering iron, glue gun and maybe even the air compressor. tools that I am very paranoid about leaving on.

I did get as far as writing a sketch using if and and statements but soon found at least as far as I could see that would not work. Could someone steer me in the right direction please?

Thank you

What about one of these: motion sensor

Just wire an interposing relay to control your bench equipment instead of a light.

did get as far as writing a sketch using if and and statements but soon found at least as far as I could see that would not work.

Post the sketch here and describe what happens when you run it. It is easier to provide help by seeing what has been tried rather than giving advice on something we have not seen.

What type of PIR and switch are you using and how are they connected to the Arduino ?
Which Arduino board are you using ?