From 92d39143e2c1a9af85e1f99801005f458046a1fa Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 23 Oct 2021 00:14:25 +0300 Subject: td: use correct nextcloud --- .local/bin/td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.local/bin') diff --git a/.local/bin/td b/.local/bin/td index f15c0c6..dad71f1 100755 --- a/.local/bin/td +++ b/.local/bin/td @@ -21,6 +21,6 @@ if [[ $? -ne 0 ]]; then exit 0 fi -echo REM "${task_date}" AT "${task_time}" +45 *15 MSG %\""${task_description}"%\" %c% >> "${HOME}/nextcloud/remind/050-events.rem" +echo REM "${task_date}" AT "${task_time}" +45 *15 MSG %\""${task_description}"%\" %c% >> "${HOME}/nextcloud/virtuals/remind/050-events.rem" notify-send "notification set!" "${task_date} at ${task_time}" --app-name="remind" --icon="checkmark" -- cgit v1.2.3-70-g09d2 From fc85aa0d21b745493c51a3f73d690d71cd6dbe69 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sun, 24 Oct 2021 00:00:08 +0300 Subject: notify_phone: oops --- .local/bin/notify_phone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.local/bin') diff --git a/.local/bin/notify_phone b/.local/bin/notify_phone index 6228f73..adf1464 100755 --- a/.local/bin/notify_phone +++ b/.local/bin/notify_phone @@ -1,6 +1,6 @@ #!/bin/bash -TOKEN=795983515:AAHAPgakm-BbRKNodF9a0z_OH2VDsIxpm_Q +TOKEN=$(pass telegram/notifier) CHAT_ID=4903620 INPUT=$@ MESSAGE=${INPUT:-"all done"} -- cgit v1.2.3-70-g09d2 From 9697b41a458c07f41d923b32d959e73a109dfee6 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sun, 24 Oct 2021 15:00:22 +0300 Subject: scripts: use new dunst interface to pause --- .config/polybar/focus | 1 - .config/polybar/notification_pause.sh | 4 +--- .config/polybar/stop | 1 - .local/bin/toggle_notifications.sh | 16 ++++++---------- 4 files changed, 7 insertions(+), 15 deletions(-) (limited to '.local/bin') diff --git a/.config/polybar/focus b/.config/polybar/focus index 42edffb..49d46d2 100755 --- a/.config/polybar/focus +++ b/.config/polybar/focus @@ -44,4 +44,3 @@ if ($task =~ m/^(.*)?\s(\d+\w+)$/g) { print "$1 | $2"; } } -# print $task; diff --git a/.config/polybar/notification_pause.sh b/.config/polybar/notification_pause.sh index 1df1bd6..9bf6724 100755 --- a/.config/polybar/notification_pause.sh +++ b/.config/polybar/notification_pause.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash -TOGGLE=$HOME/.local/share/.pause_notifications - -if [ ! -e $TOGGLE ]; then +if ! $(dunstctl is-paused); then echo else printf "" diff --git a/.config/polybar/stop b/.config/polybar/stop index 58f8741..1efd193 100755 --- a/.config/polybar/stop +++ b/.config/polybar/stop @@ -44,4 +44,3 @@ if ($task =~ m/^(\d+)(.*)$/g) { exec(qq(dunstify --appname="task" --icon="kt-pause" "stopping" "$1")); } } - diff --git a/.local/bin/toggle_notifications.sh b/.local/bin/toggle_notifications.sh index 9b700b5..6818728 100755 --- a/.local/bin/toggle_notifications.sh +++ b/.local/bin/toggle_notifications.sh @@ -1,14 +1,10 @@ #!/usr/bin/env bash -TOGGLE=$HOME/.local/share/.pause_notifications - -if [ ! -e $TOGGLE ]; then - touch $TOGGLE - dunstify --appname="notifications" --icon="chronometer-pause" "pausing" -u low - sleep 3 - killall -SIGUSR1 dunst # pause -else - rm $TOGGLE - killall -SIGUSR2 dunst # resume +if $(dunstctl is-paused); then dunstify --appname="notifications" --icon="chronometer-start" "here's what happened" -u low + dunstctl set-paused false +else + dunstify --appname="notifications" --icon="chronometer-pause" "pausing" -u low + sleep 2 + dunstctl set-paused true fi -- cgit v1.2.3-70-g09d2 From 5ca235e9dd3d0b9e344be9f53963dcd90b3e73db Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sun, 24 Oct 2021 15:01:05 +0300 Subject: scripts: add app_populator --- .local/bin/app_populator | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 .local/bin/app_populator (limited to '.local/bin') diff --git a/.local/bin/app_populator b/.local/bin/app_populator new file mode 100755 index 0000000..6182b98 --- /dev/null +++ b/.local/bin/app_populator @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# https://www.reddit.com/r/commandline/comments/q9skbh/how_to_remember_what_applications_you_have/ +#< Populates the applist +# cat ~/.local/share/applist | fzf + +ls /usr/share/man/man1 2> /dev/null | + sed -e 's/\.1.*//' | + xargs whatis 2> /dev/null | + sed -e '/unknown subject/d' -e 's/ *- / - /' > ~/.local/share/applist -- cgit v1.2.3-70-g09d2