Added icon variable.

dev
frnmst/Franco Masotti 7 years ago
parent e82a47cc37
commit 37800bccbd
  1. 12
      man/gnupot.config.man
  2. 5
      src/config.sh
  3. 1
      src/configVariables.conf
  4. 1
      src/form.sh
  5. 4
      src/functions.sh

@ -21,7 +21,7 @@
.\"
.TH GNUPOT 5 "January 2016" "0.4" "File Formats Manual"
.TH GNUPOT 5 "February 2016" "0.4" "File Formats Manual"
.SH NAME
gnupot.conf \- Configuration file for GNUpot.
@ -290,6 +290,16 @@ The same as
except that this is the upload speed.
.RE
.TP
.B gnupotIcon
.RS
A string containing the full path of GNUpot's icon. This icon will appear on
the desktop notifications.
.br
For further information read
.B notify-send\ --help
.RE
.SH AUTHOR
Written by Franco Masotti <franco.masotti@student.unife.it>

@ -30,7 +30,7 @@ REMOTECHKCMD="which git && which inotifywait"
# Other global variables.
options=""
optNum="21"
optNum="22"
infoMsg()
{
@ -76,7 +76,7 @@ gnupotGitFileExclude gnupotGitCommitterUsername gnupotGitCommitterEmail \
gnupotTimeToWaitForOtherChanges gnupotBusyWaitTime \
gnupotSSHServerAliveInterval gnupotSSHServerAliveCountMax \
gnupotSSHMasterSocketPath gnupotNotificationTime gnupotLockFilePath \
gnupotDownloadSpeed gnupotUploadSpeed"
gnupotDownloadSpeed gnupotUploadSpeed gnupotIcon"
# Control bash version to avoid IFS bug. bash <=4.2 has this bug. If
# bash is <=4.2 spaces must be avoided in form fields.
@ -239,6 +239,7 @@ gnupotNotificationTime=\""$gnupotNotificationTime"\"\n\
gnupotLockFilePath=\""$gnupotLockFilePath"\"\n\
gnupotDownloadSpeed=\""$gnupotDownloadSpeed"\"\n\
gnupotUploadSpeed=\""$gnupotUploadSpeed"\"\n\
gnupotIcon=\""$gnupotIcon"\"\n\
" > "$CONFIGFILEPATH"
chmod 600 "$CONFIGFILEPATH"

@ -51,3 +51,4 @@ gnupotNotificationTime="2000"
gnupotDownloadSpeed="0"
gnupotUploadSpeed="0"
gnupotIcon="$(pwd)/src/gnupotIcon.png"

@ -69,4 +69,5 @@ $action 0 \
20 1 "$gnupotDownloadSpeed" 20 $fldChrs $action 0 \
"Upload max speed (KB/s) (0 = no limit):" \
21 1 "$gnupotUploadSpeed" 21 $fldChrs $action 0 \
"GNUpot icon full path:" 22 1 "$gnupotIcon" 22 $fldChrs $action 0 \
)

@ -168,7 +168,7 @@ LocalDirO SSHKeyPathO RSAKeyBitsU KeepMaxCommitsU InotifyFileExcludeO \
GitFileExcludeO GitCommitterUsernameO GitCommitterEmailO \
TimeToWaitForOtherChangesU BusyWaitTimeU SSHServerAliveIntervalN \
SSHServerAliveCountMaxN SSHMasterSocketPathO NotificationTimeU LockFilePathO \
DownloadSpeedU UploadSpeedU"
DownloadSpeedU UploadSpeedU IconO"
local variable="" type=""
for variable in $variableList; do
@ -602,7 +602,7 @@ parseOpts()
# NOTE: notify-send works only with full paths. Variable setting here must
# changed, otherwise it cannot be handled in the PKGBUILD. It can be set in
# the setup so it's simpler...
iconPath=""$(pwd)"/src/gnupotIcon.png"
iconPath="$gnupotIcon"
# Get options from special variable $@. Treat no arguments as -i.
getopts ":dhknpsv" opt "$argArray"