@JusGellin :-
Quite easy, actually.
/Usr/local/bin would be the most appropriate place, I think.
Go into /usr/local/bin. Right-click on any empty bit of the window, then -> New -> Script. Give the script a name, e.g. "Wifi On", and hit 'Create'. Now do the same again, and this time call it "Wifi Off".
Right-click on "Wifi On" -> Open with Geany, OR -> Open as Text. The first line is already showing:-
This tells the system this will be a Bash script. Now, make the rest of the script read as follows:-
Code: Select all
#!/bin/sh
#
# Turn wifi on
#
ifconfig wlan0 up
.....and make sure to save it before closing. Do the same with "Wifi Off":-
Code: Select all
#!/bin/sh
#
# Turn wifi off
#
ifconfig wlan0 down
.....again, making sure to save it.
~~~~~~~~~~~~~~~~~~~~~
Now, you can drag these two scripts to the desktop. Simples!
You can tart them up with icons (IF you want to). I have hundreds of these, culled from thousands of Google/DuckDuckGo searches over the years. Search for "PNG icons for [whatever]"
Find something you like, then download them. An 'up' arrow & a 'down' arrow might do the job, or perhaps search for actual wifi icons. Once you have them, move them to /usr/share/pixmaps; leave this window open. Now; rt-clk the script -> File 'xxxxxxxx' -> Set icon. A small window opens; literally drag the appropriate icon from /usr/share/pixmaps and drop it onto the space provided in the small window......
.......and now you have a pair of icons on the desk that will do what you want when you click on them.
('Pro' tip here:- Try to find an icon anywhere between 128 x 128 and 512 x 512 in size. ROX automatically resizes everything to 48 x 48 for the desktop, but larger icons will seem sharper and more detailed when re-sized. Don't ask me why, but they just do!)
Any questions, fire away.....
Mike. 