; Module/File: Desktop_NotifySimple.pb ; Function: A simple way to show a desktop-notify (Benachrichtigung) - Linux ; Author: Omi ; Date: Mar. 21, 2015 ; Version: 0.1 ; Target Compiler: PureBasic 5.22/5.31/5.40 ; Target OS: Linux: (X/K/L)ubuntu, Mint, 32/64, Ascii/Uni ;-------------------------------------------------------------- ;needs libnotify-bin, Check with RunProgram ("which", "notify-send", "", #PB_Program_Open | #PB_Program_Read) ;Options: ;--urgency=low, --urgency=normal, --urgency=critical ;--expire-time=ms ;--icon=IconStock OR IconFilename; see table Named-IconList.txt Global nSummary.s= "My Application" Global nBody.s = "A Desktop-Notification with 'notify-send'" + "\n" + "and a 2. line" Global nIcon.s = "--icon=dialog-information --urgency=normal --expire-time=5000" If Not RunProgram("notify-send", #DQUOTE$ + nSummary + #DQUOTE$ + " " + #DQUOTE$ + nBody + #DQUOTE$ + nIcon, "") Debug "'notify-send' not available!" Debug "install: sudo apt-get install libnotify-bin" EndIf ; IDE Options = PureBasic 5.40 LTS Beta 9 (Linux - x86) ; CursorPosition = 22 ; EnableUnicode ; EnableXP