summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-11-12 18:34:28 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-11-12 18:34:28 +0100
commit54dbc966d6a911dbb7bbd059f94f7e30c16e47bf (patch)
treec6a068dad02d0aac9de6f8540c1bfba7a52d0d6a /.local/bin
parentNotifications update (diff)
downloaddotfiles-bsd-54dbc966d6a911dbb7bbd059f94f7e30c16e47bf.tar.gz
dotfiles-bsd-54dbc966d6a911dbb7bbd059f94f7e30c16e47bf.tar.bz2
dotfiles-bsd-54dbc966d6a911dbb7bbd059f94f7e30c16e47bf.tar.xz
dotfiles-bsd-54dbc966d6a911dbb7bbd059f94f7e30c16e47bf.tar.zst
dotfiles-bsd-54dbc966d6a911dbb7bbd059f94f7e30c16e47bf.zip
New espeak script for dunst
Diffstat (limited to '')
-rwxr-xr-x.local/bin/dunst_espeak.sh7
-rwxr-xr-x.local/bin/install-port52
-rwxr-xr-x.local/bin/kb1
-rwxr-xr-x.local/bin/linkview2
-rwxr-xr-x.local/bin/setwp11
-rwxr-xr-x.local/bin/tsm-done.sh4
6 files changed, 21 insertions, 56 deletions
diff --git a/.local/bin/dunst_espeak.sh b/.local/bin/dunst_espeak.sh
new file mode 100755
index 0000000..3d1aee1
--- /dev/null
+++ b/.local/bin/dunst_espeak.sh
@@ -0,0 +1,7 @@
+#!/usr/local/bin/dash
+
+[ "$5" = "LOW" ] && exit
+echo $3 > $HOME/file
+[ "$3" ] || exit
+words=$(printf "$3" | sed 's/<b>//g' | sed 's/<\/b>//g' | sed 's/[^a-zA-Z0-9?!., ]//g')
+espeak "$words"
diff --git a/.local/bin/install-port b/.local/bin/install-port
index 8b99de3..ca1f071 100755
--- a/.local/bin/install-port
+++ b/.local/bin/install-port
@@ -49,16 +49,6 @@ sub upgrdports {
system('/usr/local/bin/dash',
'-c',
'/usr/local/bin/notify-send "Initiating upgrade" "Ports upgrade has started\nTotal: ' . $upgrd_nbr . ' to be updated" >/dev/null 2>&1');
- if ($upgrd_nbr == 1) {
- system('/usr/local/bin/dash',
- '-c',
- '/usr/local/bin/espeak "Initiating ' . $upgrd_nbr . ' port upgrade" & >/dev/null 2>&1');
- }
- else {
- system('/usr/local/bin/dash',
- '-c',
- '/usr/local/bin/espeak "Initiating ' . $upgrd_nbr . ' ports upgrade" & >/dev/null 2>&1');
- }
if (system('/usr/local/bin/dash',
'-c',
'/usr/local/bin/doas /usr/local/sbin/portmaster -dya --no-confirm') == 0) {
@@ -68,9 +58,6 @@ sub upgrdports {
system('/usr/local/bin/dash',
'-c',
'/usr/local/bin/notify-send "Upgrade complete!" "Ports upgrade installed successfully\nTotal: ' . $diff_nbr . ' installed" >/dev/null 2>&1');
- system('/usr/local/bin/dash',
- '-c',
- '/usr/local/bin/espeak "Success: $upnbr ports upgrade installed successfully" & >/dev/null 2>&1');
}
else {
my $failed_nbr = `$upgrd_nbr_cmd`;
@@ -79,9 +66,6 @@ sub upgrdports {
system('/usr/local/bin/dash',
'-c',
'/usr/local/bin/notify-send -u critical -t 10000 "Upgrade failed!" "Some ports failed to compile\nTotal: ' . $diff_nbr . ' installed - ' . $failed_nbr . ' failed" >/dev/null 2>&1');
- system('/usr/local/bin/dash',
- '-c',
- '/usr/local/bin/espeak "Failure: not all ports were upgraded - $diffnbr installed - $failednbr failed" & >/dev/null 2>&1');
}
exit;
}
@@ -107,15 +91,6 @@ sub configport {
'Configuration success!',
'Ports config - ' . $port . ' - configured successfully',
);
- my $pid;
- $pid = fork();
- if (not $pid) {
- exec(
- '/usr/local/bin/espeak',
- 'Success: ' . $port_basename . ' configured successfully. Initiating compilation.'
- );
- exit;
- }
}
}
else {
@@ -128,15 +103,6 @@ sub configport {
'Configuration failure!',
'Ports config - ' . $port . ' - failed to configure'
);
- my $pid;
- $pid = fork();
- if (not $pid) {
- exec(
- '/usr/local/bin/espeak',
- 'Failure: failed to configure ' . $port_basename
- );
- exit;
- }
}
}
@@ -154,15 +120,6 @@ sub installport {
'Compilation success!',
'Ports - ' . $port . ' - installed successfully'
);
- my $pid;
- $pid = fork();
- if (not $pid) {
- exec(
- '/usr/local/bin/espeak',
- 'Success: ' . $port_basename . ' installed successfully'
- );
- exit;
- }
}
else {
system(
@@ -174,15 +131,6 @@ sub installport {
'Compilation failure!',
'Ports - ' . $port . ' - failed to install'
);
- my $pid;
- $pid = fork();
- if (not $pid) {
- exec(
- '/usr/local/bin/espeak',
- 'Failure: failed to install ' . $port_basename
- );
- exit;
- }
}
}
diff --git a/.local/bin/kb b/.local/bin/kb
index 41d3fda..1b7a4ea 100755
--- a/.local/bin/kb
+++ b/.local/bin/kb
@@ -14,3 +14,4 @@ if ! xrandr | grep 'HDMI-1 connected' >/dev/null 2>&1; then
xmodmap -e "add Control = Control_L"
fi
fi
+notify-send -u low -t 2000 'kb' ' Keyboard set'
diff --git a/.local/bin/linkview b/.local/bin/linkview
index 704e42a..c14dbc9 100755
--- a/.local/bin/linkview
+++ b/.local/bin/linkview
@@ -76,7 +76,7 @@ sub open_link
'normal',
'-t',
'10000',
- ' download complete',
+ 'download complete',
' <b>' . $file_name . '</b> downloaded successfully to '
. '<b>' . $pwd . '</b>'
);
diff --git a/.local/bin/setwp b/.local/bin/setwp
index a2689ff..54d6375 100755
--- a/.local/bin/setwp
+++ b/.local/bin/setwp
@@ -48,7 +48,16 @@ sub set_wp
WP_FILE,
'--bg-fill',
WP_FILE
- );
+ );
+ system(
+ 'notify-send',
+ '-u',
+ 'low',
+ '-t',
+ '2000',
+ 'setwp',
+ ' Wallpaper set'
+ );
return;
}
diff --git a/.local/bin/tsm-done.sh b/.local/bin/tsm-done.sh
index 1f595ea..c95f71c 100755
--- a/.local/bin/tsm-done.sh
+++ b/.local/bin/tsm-done.sh
@@ -3,5 +3,5 @@
notify-send \
-u normal \
-t 10000 \
- ' Transmission' \
- 'Torrent downloaded'
+ 'Transmission' \
+ ' Torrent downloaded'