Shortcut for wifi hotspot
#1
Does anyone know of a way to make a shortcut that can be clicked and will just launch the hotspot?

I've got the settings configured, but it's 2-3 clicks/touches and ideally I'd like to just have it launch with one
  Reply
#2
the "menulibre" package may be worth exploring, its in AUR
  Reply
#3
(03-30-2022, 10:49 AM)brb78 Wrote: the "menulibre" package may be worth exploring, its in AUR

Very interesting. Thanks!
  Reply
#4
An idea, just use nmcli con up in a suitable .desktop file?
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.12 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with pmOS/SXMO on eMMC
  Reply
#5
(03-31-2022, 01:59 AM)dukla2000 Wrote: An idea, just use nmcli con up in a suitable .desktop file?

That would be even better. I haven't used con up before. Can I just do that for the hotspot?
  Reply
#6
(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 Big Grin 

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
Code:
[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
into a file ~/.local/share/applications/mymenu.desktop

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"
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.12 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with pmOS/SXMO on eMMC
  Reply
#7
For reference: https://specifications.freedesktop.org/d...atest.html
Cheers,
TRS-80

What is Free Software and why is it so important for society?

Protocols, not Platforms

For the most Linux-y experience on your Linux phone, try SXMO!

I am (nominally) the Armbian Maintainer for PineBook Pro (although severely lacking in time these days).
  Reply
#8
(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 Big Grin 

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
Code:
[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
into a file ~/.local/share/applications/mymenu.desktop

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
  Reply
#9
(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 Big Grin 

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
Code:
[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
into a file ~/.local/share/applications/mymenu.desktop

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"

Tried putting it into the local dir but that didn't seem to work. I had to put it into /usr/share/applications (I'm running Arch)

So far I've just changed the first section and that works. Exec=nmcli con up HotSpot

When running it brings up the hot-spot network screen, so maybe there's some way to get that to minimize after. But still, WAY easier than the 4 clicks it was taking before!

Thanks again for the help and if I can make it any better I'll update here!
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Manjaro plasma mobile Wifi Uturn 2 234 12-05-2024, 12:46 AM
Last Post: Uturn
  Wifi 2.4G speed decreased by Bluetooth connection established Piotr 2 1,562 03-11-2023, 04:55 PM
Last Post: Kevin Kofler
  Certain wifi networks not showing expant 2 2,115 05-18-2022, 11:00 PM
Last Post: expant
  PinePhone Pro and inaccessible WiFi channels aigilea 0 1,183 02-23-2022, 08:16 AM
Last Post: aigilea

Forum Jump:


Users browsing this thread: 1 Guest(s)