Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
e70f0057
Commit
e70f0057
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
wifi menu on mesh desktop
parent
b239d752
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-image-mesh
+34
-1
34 additions, 1 deletion
src/freedombone-image-mesh
with
34 additions
and
1 deletion
src/freedombone-image-mesh
+
34
−
1
View file @
e70f0057
...
...
@@ -321,6 +321,38 @@ function create_tox_user {
echo
$'Created Tox user'
>>
$INSTALL_LOG
}
function
desktop_wifi_menu
{
menu_title_str
=
$'Wifi'
ssid_title_str
=
$'Change Wifi SSID'
ssid_change_str
=
$'You may want to make your mesh SSID similar to other
\n
SSIDs in order to not stand out from the crowd
\n
'
option1_str
=
$"Set wifi SSID"
option2_str
=
$"Run wifi monitor"
{
echo
'#!/bin/bash'
;
echo
"result=
\$
(zenity --list --text
\"
$menu_title_str
\"
--radiolist --column
\"\"
--column
\"\"
TRUE
\"
$option1_str
\"
FALSE
\"
$option2_str
\"
--width 400 --height 200)"
;
echo
"case
\"\$
result
\"
in"
;
echo
"
$option1_str
)"
;
echo
" WIFI_SSID='mesh'"
;
echo
" if [ -f /home/fbone/ssid.txt ]; then"
;
echo
" WIFI_SSID=
\$
(cat /home/fbone/ssid.txt)"
;
echo
" fi"
;
echo
" NEW_WIFI_SSID=
\$
(zenity --entry --title=
\"
$ssid_title_str
\"
--text=
\"
$ssid_change_str
\"
--entry-text
\"
$WIFI_SSID
\"
)"
;
echo
" if [
\"\$
NEW_WIFI_SSID
\"
]; then"
;
echo
" if [
\$
{#NEW_WIFI_SSID} -gt 2 ]; then"
;
echo
" if [[
\"\$
NEW_WIFI_SSID
\"
!=
\"
WIFI_SSID
\"
]]; then"
;
echo
" echo -n
\"
$NEW_WIFI_SSID
\"
> /home/fbone/ssid.txt"
;
echo
" mate-terminal --full-screen -e
\"
sudo batman restart
\"
"
;
echo
' fi'
;
echo
' fi'
;
echo
' fi'
;
echo
' ;;'
;
echo
"
$option2_str
)"
;
echo
" mate-terminal --full-screen -e
\"
sudo batman monitor
\"
"
;
echo
' ;;'
;
echo
'esac'
;
}
>
/usr/bin/wifi-menu
chmod
+x /usr/bin/wifi-menu
}
function
show_desktop_icons
{
if
[
!
-d
/home/
$MY_USERNAME
/Desktop
]
;
then
return
...
...
@@ -387,7 +419,7 @@ function show_desktop_icons {
echo
"Comment[it]=Controllare lo stato wifi"
;
echo
"Comment[ru]= wifi"
;
echo
"Comment[zh]=wifi"
;
echo
'Exec=
mate-terminal --full-screen -e "sudo batman monitor"
'
;
echo
'Exec=
bash -c /usr/bin/wifi-menu
'
;
echo
"Icon=/usr/share/
${
PROJECT_NAME
}
/avatars/icon_wifi.png"
;
echo
'Terminal=false'
;
echo
'Categories=Application;'
;
}
>
"/home/
$MY_USERNAME
/Desktop/wifi.desktop"
...
...
@@ -1482,6 +1514,7 @@ if [ -f $MESH_INSTALL_SETUP ]; then
systemctl disable mesh-setup.service
fi
desktop_wifi_menu
show_desktop_icons
mesh_restart_daemons
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment