04-03-2022, 11:30 AM
(04-01-2022, 03:50 AM)dukla2000 Wrote:(03-31-2022, 03:04 PM)kbm Wrote: ...
That would be even better. I haven't used con up before. Can I just do that for the hotspot?
I am only about half a page ahead of you in the manual![]()
I got this idea (and most of the code below) from "D J" on the mobian chat so all the credit belongs to them!
Copy/paste the following
into a file ~/.local/share/applications/mymenu.desktopCode:[Desktop Entry]
Actions=NetCon;StartHotspot;StopHotspot;disks;firmware;dconf;tweaks;1minSus;30minSus;RestartPhosh;PowerStats;keys
Type=Application
Name=System
GenericName=Suspend
Comment=Suspend
Icon=/usr/share/icons/desktop-base/128x128/emblems/emblem-debian.png
TryExec=systemctl
Exec=systemctl suspend
Terminal=false
Categories=Power;Session;
X-Purism-FormFactor=Workstation;Mobile;
MimeType=
Keywords=suspend
[Desktop Action RestartPhosh]
Exec=/home/mobian/Scripts/phosh-restart.sh
Name=Restart Phosh
[Desktop Action PowerStats]
Exec=powersupply
Name=Powersupply
[Desktop Action ModemMgr]
Exec=modem-manager-gui
Name=Modem Manager
[Desktop Action Proc]
Exec=gnome-usage
Name=Activity Monitor
[Desktop Action NetCon]
Exec=nm-connection-editor
Name=Network Manager
[Desktop Action StartHotspot]
Exec=nmcli con up Hotspot
Name=Start Hotspot
[Desktop Action StopHotspot]
Exec=nmcli con down Hotspot
Name=Stop Hotspot
[Desktop Action 30minSus]
Exec=gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1800
Name=30 Minute Suspend
[Desktop Action 1minSus]
Exec=gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 180
Name=3 Minute Suspend
[Desktop Action keys]
Exec=notify-send "Nope!" "This is just a spacer not an acutal menu item"
Name=_______________ ~ _______________
[Desktop Action dconf]
Exec=dconf-editor
Name=Dconf Editor
[Desktop Action firmware]
Exec=gnome-firmware
Name=Firmware
[Desktop Action tweaks]
Exec=pmos-tweaks %u
Name=Phosh Tweaks
[Desktop Action disks]
Exec=gnome-disks
Name=Disks/Drives
After a reboot/relogin (or maybe automagically) you should have a new desktop icon. If you push and hold there will be options to start/stop hotspot.
Note this is pretty crude - it depends on WiFi being up (needs another option!), there are several options in the code not selected as Actions at the top, and the chosen icon doesn't exist in my arch install. So very much WIP but it is the thought that counts!
And many thanks to "D J"
That's awesome! Thanks. I'll give it a try