-
Notifications
You must be signed in to change notification settings - Fork 44
/
speak.sh
executable file
·46 lines (32 loc) · 1.13 KB
/
speak.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
## TURN ON & OFF espeak
# TODO CHANGE PROG LINK
PROG=$(which espeak)
if [[ $1 == "OFF" ]]; then
espeak "SHUT UP NOW"
[[ ! $PROG == "$HOME/.local/bin/espeak" ]] \
&& mkdir -p $HOME/.local/bin \
&& echo '#!/bin/bash' > $HOME/.local/bin/espeak \
&& chmod +x $HOME/.local/bin/espeak
fi
if [[ $1 == "ON" || $1 == "" ]]; then
[[ ! $PROG == "/usr/bin/espeak" ]] \
&& rm $HOME/.local/bin/espeak
espeak "TALKING NOW"
fi
##########################################################
## TRYING TO ADD Add To IPFS Nemo right click action
## https://discuss.ipfs.tech/t/how-to-add-a-file-to-ipfs-with-a-right-clic-in-your-file-manager/16294/1
# Exec=sh -c "/usr/local/bin/ipfs add -q %F | xclip -selection c"
if [[ -d ~/.local/share/nemo/actions ]]; then
echo '[Nemo Action]
Name=+ to IPFS
Comment=Adding %f to IPFS
Exec=sh -c "/usr/local/bin/ipfs add -q %F | xargs -L1 -I % /usr/bin/zenity --width=300 --height=100 --info --text=%"
Selection=s
Extensions=nodirs;
Quote=double
EscapeSpaces=true' > ~/.local/share/nemo/actions/add2ipfs.nemo_action
fi
###################################################
exit 0