aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2022-04-04 19:16:35 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2022-04-04 19:16:35 +0200
commite6bae389d62f6bab0d427e89c2ba11b1c8714f26 (patch)
treeaf95288ba751ae1be792fcb37640e3854708d8b8
parentShould work now man (diff)
downloadgo2work-e6bae389d62f6bab0d427e89c2ba11b1c8714f26.tar.gz
go2work-e6bae389d62f6bab0d427e89c2ba11b1c8714f26.tar.bz2
go2work-e6bae389d62f6bab0d427e89c2ba11b1c8714f26.tar.xz
go2work-e6bae389d62f6bab0d427e89c2ba11b1c8714f26.tar.zst
go2work-e6bae389d62f6bab0d427e89c2ba11b1c8714f26.zip
Ok
-rw-r--r--Makefile17
-rw-r--r--share/go2work.toml.sample22
-rw-r--r--src/c_defs.go1
3 files changed, 36 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e12f695..cdead21 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@
# ========================
#
# go2work: Makefile
-# Mon Apr 4 18:29:15 CEST 2022
+# Mon Apr 4 18:43:18 CEST 2022
# Joe
#
# GNU Makefile
@@ -42,7 +42,8 @@ MAN := $(addsuffix .1, ${TARGET})
MKDIR := mkdir -p
RMDIR := rmdir
-RM := rm -Rf
+RM := rm -f
+RMDIR := rmdir
GZIP := gzip
GUNZIP := gunzip
INSTALL := install
@@ -63,6 +64,10 @@ install-data:
${MKDIR} ${DESTDIR}share/${TARGET}
${INSTALL} -m0644 ${DATA_DIR}ring01.wav ${DESTDIR}share/${TARGET}
${INSTALL} -m0644 ${DATA_DIR}ring02.wav ${DESTDIR}share/${TARGET}
+ ${INSTALL} -m0644 ${DATA_DIR}${TARGET}.toml.sample ${DESTDIR}share/${TARGET}
+ ${INSTALL} -m0644 LICENSE ${DESTDIR}share/${TARGET}
+ ${INSTALL} -m0644 README ${DESTDIR}share/${TARGET}
+ ${INSTALL} -m0644 README.org ${DESTDIR}share/${TARGET}
install-doc:
${MKDIR} ${DESTDIR}man/man1
@@ -74,7 +79,13 @@ install: install-bin install-data install-doc
uninstall:
${RM} ${DESTDIR}bin/${TARGET}
- ${RM} ${DESTDIR}share/${TARGET}
+ ${RM} ${DESTDIR}share/${TARGET}/ring01.wav
+ ${RM} ${DESTDIR}share/${TARGET}/ring02.wav
+ ${RM} ${DESTDIR}share/${TARGET}/${TARGET}.toml.sample
+ ${RM} ${DESTDIR}share/${TARGET}/LICENSE
+ ${RM} ${DESTDIR}share/${TARGET}/README
+ ${RM} ${DESTDIR}share/${TARGET}/README.org
+ ${RMDIR} ${DESTDIR}share/${TARGET}
${RM} ${DESTDIR}man/man1/${MAN}.gz
clean:
diff --git a/share/go2work.toml.sample b/share/go2work.toml.sample
new file mode 100644
index 0000000..46745d9
--- /dev/null
+++ b/share/go2work.toml.sample
@@ -0,0 +1,22 @@
+# Audio files to be played. There can be several, in that case
+# only the first one is being played unless the 'random' option
+# is set to 'true'
+files = [
+ '/usr/local/share/go2work/ring01.wav',
+ '/usr/local/share/go2work/ring02.wav',
+]
+# The program used to play the music files
+# Default: 'mpv'
+media_player = 'mpv'
+# Command-line options to be passed to the program
+# Default: [ '--no-video', '--loop' ]
+player_options = [
+ '--no-video',
+ '--loop',
+]
+# Choose a random audio file in the list
+# Default: false
+random = false
+# Display a cool fortune message
+# Default: true
+fortune = true
diff --git a/src/c_defs.go b/src/c_defs.go
index ee2435a..111597b 100644
--- a/src/c_defs.go
+++ b/src/c_defs.go
@@ -64,7 +64,6 @@ const (
func DEF_FILES() []string {
return []string{
"/usr/local/share/go2work/ring01.wav",
- "/usr/local/share/go2work/ring02.wav",
}
}