Results 1 to 5 of 5

Thread: xfce4-notifyd --- have one notification positioned differently?

  1. #1
    Join Date
    Dec 2007
    Beans
    10,339
    Distro
    Lubuntu 16.04 Xenial Xerus

    xfce4-notifyd --- have one notification positioned differently?

    Xubuntu and Lubuntu use xfce4-notifyd and with xfce4-notifyd-config one can specify in which corner of the screen notifications will appear:
    • top left
    • bottom left
    • top right
    • bottom right

    I've chosen notifications to appear at the bottom right.

    But can I have just one notification (home-brewed) appear at the top left while the system notifications continue to appear in the bottom right as set with xfce4-notifyd-config?

    So, can I modify this script (as an example):

    Code:
    #!/usr/bin/env bash
          notify-send "$(date)"
    to have the notification appear at the top left and not at the bottom right?
    Shortened urls: See point #11 here. And clicking on them could be risky.

  2. #2
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: xfce4-notifyd --- have one notification positioned differently?

    Hi vasa1.

    Try this for your custom notification. It will change the location setting, send the notification, and reset the location. There is a small chance that another notification, if sent while the notification location is briefly changed, will appear at top left.
    Code:
    #!/usr/bin/env bash
    
    # set notification location to top left
    xfconf-query -c xfce4-notifyd -p /notify-location -s 0
    
    # send notification
    notify-send "$(date)"
    
    # reset notification location to bottom right
    xfconf-query -c xfce4-notifyd -p /notify-location -s 0

  3. #3
    Join Date
    Dec 2007
    Beans
    10,339
    Distro
    Lubuntu 16.04 Xenial Xerus

    Re: xfce4-notifyd --- have one notification positioned differently?

    Quote Originally Posted by Toz View Post
    Hi vasa1.

    Try this for your custom notification. It will change the location setting, send the notification, and reset the location. There is a small chance that another notification, if sent while the notification location is briefly changed, will appear at top left.
    Code:
    #!/usr/bin/env bash
    
    # set notification location to top left
    xfconf-query -c xfce4-notifyd -p /notify-location -s 0
    # send notification
    notify-send "$(date)"
    
    # reset notification location to bottom right
    xfconf-query -c xfce4-notifyd -p /notify-location -s 0
    Toz, thanks for the code. I'll try it tomorrow morning. But the two lines in bold are identical?
    Shortened urls: See point #11 here. And clicking on them could be risky.

  4. #4
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: xfce4-notifyd --- have one notification positioned differently?

    Oops. Try this version:
    Code:
    #!/usr/bin/env bash
    
    # set notification location to top left
    xfconf-query -c xfce4-notifyd -p /notify-location -s 0
    # send notification
    notify-send "$(date)"
    
    # reset notification location to bottom right
    xfconf-query -c xfce4-notifyd -p /notify-location -s 3
    Top Left = 0
    Bottom Left = 1
    Top Right = 2
    Bottom Right = 3

  5. #5
    Join Date
    Dec 2007
    Beans
    10,339
    Distro
    Lubuntu 16.04 Xenial Xerus

    Re: xfce4-notifyd --- have one notification positioned differently?

    Quote Originally Posted by Toz View Post
    Hi vasa1.

    Try this for your custom notification. It will change the location setting, send the notification, and reset the location. ...
    Works perfectly. Thanks!
    Shortened urls: See point #11 here. And clicking on them could be risky.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •