Change dunstify to notidy-send
This commit is contained in:
54
polybar.org
54
polybar.org
@@ -327,11 +327,11 @@ fi
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+begin_src bash
|
||||
dunstify --replace=98465 "Mails " "Syncing...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:YpqAgorv "Mails " "Syncing...";
|
||||
checkmail -q && \
|
||||
mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l` && \
|
||||
if [ "$mail_nb" -eq "0" ]; then
|
||||
dunstify --replace=98465 "Mails " "No new mail";
|
||||
notify-send --hint=string:x-dunst-stack-tag:YpqAgorv "Mails " "No new mail";
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -381,7 +381,7 @@ fi
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+begin_src bash
|
||||
dunstify --replace=38492 "Newsboat " "Reloading...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:4z5CvV6G "Newsboat " "Reloading...";
|
||||
|
||||
if pgrep -x "newsboat" >/dev/null; then
|
||||
# If newsboat is already running, try to refresh in the tmux session
|
||||
@@ -389,7 +389,7 @@ if pgrep -x "newsboat" >/dev/null; then
|
||||
else
|
||||
newsboat -x reload && /
|
||||
news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
|
||||
dunstify --replace=38492 "Newsboat " "$news_nb Unread News";
|
||||
notify-send --hint=string:x-dunst-stack-tag:4z5CvV6G "Newsboat " "$news_nb Unread News";
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -493,10 +493,10 @@ fi
|
||||
#+begin_src bash
|
||||
if pgrep -x "redshift" >/dev/null; then
|
||||
killall redshift && \
|
||||
dunstify --replace=36492 "Redshift 望" "Turned off";
|
||||
notify-send --hint=string:x-dunst-stack-tag:EKFLpst1 "Redshift 望" "Turned off";
|
||||
else
|
||||
nohup redshift > /dev/null 2>&1 &
|
||||
dunstify --replace=36492 "Redshift 望" "Starting...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:EKFLpst1 "Redshift 望" "Starting...";
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -539,16 +539,16 @@ fi
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+BEGIN_SRC bash
|
||||
dunstify --replace=64654 'Packages ' "Refreshing..."
|
||||
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "Refreshing..."
|
||||
|
||||
paru -Sy > /dev/null 2>&1 && \
|
||||
package_nb=$(paru -Qu 2> /dev/null | wc -l) || \
|
||||
package_nb=0
|
||||
|
||||
if [ "$package_nb" -eq "0" ]; then
|
||||
dunstify --replace=64654 'Packages ' "No upgrade available"
|
||||
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "No upgrade available"
|
||||
else
|
||||
dunstify --replace=64654 'Packages ' "$package_nb upgrade(s) available"
|
||||
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "$package_nb upgrade(s) available"
|
||||
fi
|
||||
#+END_SRC
|
||||
|
||||
@@ -606,9 +606,9 @@ tmpfile="/tmp/dunststatus";
|
||||
if [ -f $tmpfile ] && grep -q "off" $tmpfile ; then
|
||||
killall -SIGUSR2 dunst && \
|
||||
echo "on" > $tmpfile;
|
||||
dunstify --replace=16549 "Notifications " "Activated";
|
||||
notify-send --hint=string:x-dunst-stack-tag:KLJ63nVo "Notifications " "Activated";
|
||||
else
|
||||
dunstify --replace=16549 "Notifications " "Deactivated";
|
||||
notify-send --hint=string:x-dunst-stack-tag:KLJ63nVo "Notifications " "Deactivated";
|
||||
sleep 1 && \
|
||||
killall -SIGUSR1 dunst && \
|
||||
echo "off" > $tmpfile;
|
||||
@@ -654,10 +654,10 @@ fi
|
||||
#+begin_src bash
|
||||
if pgrep -x "xautolock" >/dev/null ; then
|
||||
pkill xautolock && \
|
||||
dunstify --replace=13602 'Lock Screen ' 'Desactivated'
|
||||
notify-send --hint=string:x-dunst-stack-tag:tH6bxvvv 'Lock Screen ' 'Desactivated'
|
||||
else
|
||||
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
||||
dunstify --replace=13602 'Lock Screen ' 'Activated'
|
||||
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "notify-send -u --hint=string:x-dunst-stack-tag:tH6bxvvv critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
||||
notify-send --hint=string:x-dunst-stack-tag:tH6bxvvv 'Lock Screen ' 'Activated'
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -718,13 +718,13 @@ isdevicedown=$(nmcli device status | grep ^$1 | grep disconnected)
|
||||
|
||||
if [ -z "$isdevicedown" ]
|
||||
then
|
||||
dunstify --replace=84847 "$1" "Disconnecting..." && \
|
||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Disconnecting..." && \
|
||||
nmcli device disconnect $1 && \
|
||||
dunstify --replace=84847 "$1" "Disconnected"
|
||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Disconnected"
|
||||
else
|
||||
dunstify --replace=84847 "$1" "Connection..." && \
|
||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Connection..." && \
|
||||
nmcli device connect $1 && \
|
||||
dunstify --replace=84847 "$1" "Connected"
|
||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Connected"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -788,10 +788,10 @@ isconnected=$(bluetoothctl show $controllerid | grep Powered | grep yes)
|
||||
if [ -z "$isconnected" ]
|
||||
then
|
||||
bluetoothctl power on && \
|
||||
dunstify --replace=88498 "Bluetooth" "Power ON"
|
||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Bluetooth" "Power ON"
|
||||
else
|
||||
bluetoothctl power off && \
|
||||
dunstify --replace=88498 "Bluetooth" "Power OFF"
|
||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Bluetooth" "Power OFF"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -868,16 +868,12 @@ fi
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
config="homelab"
|
||||
|
||||
connection=$(sudo wg show "$config" 2>/dev/null | head -n 1 | awk '{print $NF }')
|
||||
|
||||
if [ "$connection" = "$config" ]; then
|
||||
sudo wg-quick down "$config" && \
|
||||
dunstify --replace=83244 "Wireguard" "Disconnected from $config"
|
||||
if pgrep -x "highlight-point" >/dev/null; then
|
||||
killall highlight-point && \
|
||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Turned off";
|
||||
else
|
||||
sudo wg-quick up "$config" && \
|
||||
dunstify --replace=83244 "Wireguard" "Connected to $config"
|
||||
nohup highlight-pointer -r 10 > /dev/null 2>&1 &
|
||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Highlight...";
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
|
||||
Reference in New Issue
Block a user