diff --git a/img/avatars/invite.png b/img/avatars/invite.png new file mode 100644 index 0000000000000000000000000000000000000000..08d815c006db07eeda8c2f9a541997f158e10d72 Binary files /dev/null and b/img/avatars/invite.png differ diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 52de53b4b3357c840a17de2a4e2ac2f5a44b6131..64f482e9cd1925bced26d75583a3ff0e8411ea9c 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -887,6 +887,9 @@ function configure_user_interface { # USB cloning tool chroot "$rootdir" apt-get -yq install gnome-multi-writer + # clipboard + chroot "$rootdir" apt-get -yq install xclip + # Produce a text file on the desktop listing users on the mesh cat <<EOF > $rootdir/usr/bin/list-tox-users #!/bin/bash diff --git a/src/freedombone-image-mesh b/src/freedombone-image-mesh index 52198a606c573ff47da4671f07b5cc06ce159102..955f0037df93c0d0156c820324995c8469ce2d14 100755 --- a/src/freedombone-image-mesh +++ b/src/freedombone-image-mesh @@ -311,6 +311,16 @@ function show_desktop_icons { echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/audio.desktop echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/audio.desktop + echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/invite.desktop + echo 'Version=1.0' >> /home/$MY_USERNAME/Desktop/invite.desktop + echo 'Name=Create Invite' >> /home/$MY_USERNAME/Desktop/invite.desktop + echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/invite.desktop + echo 'Comment=Create an invite for Patchwork or Ferment' >> /home/$MY_USERNAME/Desktop/invite.desktop + echo 'Exec=mate-terminal -e freedombone-mesh-invite' >> /home/$MY_USERNAME/Desktop/invite.desktop + echo 'Icon=/usr/share/freedombone/avatars/invite.png' >> /home/$MY_USERNAME/Desktop/invite.desktop + echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/invite.desktop + echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/invite.desktop + # set permissions chmod +x /home/$MY_USERNAME/Desktop/*.desktop chown ${MY_USERNAME}:${MY_USERNAME} /home/$MY_USERNAME/Desktop/* diff --git a/src/freedombone-mesh-invite b/src/freedombone-mesh-invite new file mode 100755 index 0000000000000000000000000000000000000000..1e91f36bc9cbb7bb95a79526e3bbd3ed4c9802fd --- /dev/null +++ b/src/freedombone-mesh-invite @@ -0,0 +1,46 @@ +#!/bin/bash +# +# .---. . . +# | | | +# |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-. +# | | (.-' (.-' ( | ( )| | | | )( )| | (.-' +# ' ' --' --' -' - -' ' ' -' -' -' ' - --' +# +# Freedom in the Cloud +# +# Creates a scuttlebot invite for use with Ferment or Patchwork +# +# License +# ======= +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=${PROJECT_NAME}-mesh-invite +export TEXTDOMAINDIR="/usr/share/locale" + +invite=$(su -c 'sbot invite.create 1' - scuttlebot | awk -F '"' '{print $2}') + +if [ ${#invite} -lt 10 ]; then + dialog --title $"Create Invite" \ + --msgbox $"\nThe invite could not be created" 7 70 +fi + +echo "$invite" | xclip -selection c + +dialog --title $"Create Invite" \ + --msgbox $"\nThe invite has been copied to the clipboard.\n\nYou can paste it with CTRL+v" 9 70 + +exit 0