configure notify-send on openbox

using gdbus command

it will get icons from /usr/share/icons

gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify "appName" "7" "system-logo-icon" "text 1" "text 2" "[]" "{}" 5000

using notify-send command

1 – install packages Debian/CentOS

apt/yum install xfce4-notifyd

2.1 – show text get icon from /usr/share/icons

notify-send text1 'text 2' -i system-logo-icon

2.2 – show text specifying icon path

notify-send abc 'de f' -i /usr/share/pixmaps/openbox.png

2.3 – show text and command output

notify-send -i system-logo-icon 'boot time' $( systemd-analyze | awk 'NR == 1 {print $NF}' )

– list current configuration

xfconf-query -c xfce4-notifyd -l -v

– changing some property “expire timeout

xfconf-query -c xfce4-notifyd -p /expire-timeout -s 7

– graphical configuration

xfce4-notifyd-config

creating config file manually

cat > ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
 
<channel name="xfce4-notifyd" version="1.0">
  <property name="applications" type="empty">
    <property name="known_applications" type="array">
      <value type="string" value="appName"/>
      <value type="string" value="nm-applet"/>
      <value type="string" value="xfce4-power-manager"/>
      <value type="string" value="xfce4-settings-helper"/>
    </property>
  </property>
  <property name="primary-monitor" type="uint" value="0"/>
  <property name="notify-location" type="uint" value="0"/>
  <property name="log-level" type="uint" value="0"/>
  <property name="log-level-apps" type="uint" value="0"/>
</channel>
EOF

configure notify-send at crontab

0 7 * * * XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send -i pstree32 "$(date +\%R)"

Leave a comment