Hello community,

here is the log from the commit of package xmobar for openSUSE:Factory checked 
in at 2018-08-27 12:58:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xmobar (Old)
 and      /work/SRC/openSUSE:Factory/.xmobar.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xmobar"

Mon Aug 27 12:58:23 2018 rev:2 rq:631368 version:0.28

Changes:
--------
--- /work/SRC/openSUSE:Factory/xmobar/xmobar.changes    2018-08-04 
21:53:51.561328655 +0200
+++ /work/SRC/openSUSE:Factory/.xmobar.new/xmobar.changes       2018-08-27 
12:58:23.864753838 +0200
@@ -1,0 +2,16 @@
+Wed Aug 22 09:18:05 UTC 2018 - psim...@suse.com
+
+- Update xmobar to version 0.28.
+  ## Version 0.28
+
+  _New features_
+
+    - New `ComX`, which runs a command with custom exit error message.
+
+  _Bug fixes_
+
+    - hinotify version upgraded ([issue #356])
+
+  [issue #356]: https://github.com/jaor/xmobar/issues/356
+
+-------------------------------------------------------------------

Old:
----
  xmobar-0.27.tar.gz

New:
----
  xmobar-0.28.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xmobar.spec ++++++
--- /var/tmp/diff_new_pack.9ECpv2/_old  2018-08-27 12:58:24.360754381 +0200
+++ /var/tmp/diff_new_pack.9ECpv2/_new  2018-08-27 12:58:24.368754389 +0200
@@ -18,7 +18,7 @@
 
 %bcond_with tests
 Name:           xmobar
-Version:        0.27
+Version:        0.28
 Release:        0
 Summary:        A Minimalistic Text Based Status Bar
 License:        BSD-3-Clause

++++++ xmobar-0.27.tar.gz -> xmobar-0.28.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmobar-0.27/changelog.md new/xmobar-0.28/changelog.md
--- old/xmobar-0.27/changelog.md        2018-07-12 02:16:27.000000000 +0200
+++ new/xmobar-0.28/changelog.md        2018-08-20 00:44:03.000000000 +0200
@@ -1,3 +1,15 @@
+## Version 0.28
+
+_New features_
+
+  - New `ComX`, which runs a command with custom exit error message.
+
+_Bug fixes_
+
+  - hinotify version upgraded ([issue #356])
+
+[issue #356]: https://github.com/jaor/xmobar/issues/356
+
 ## Version 0.27 (July, 2018)
 
 _New features_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmobar-0.27/readme.md new/xmobar-0.28/readme.md
--- old/xmobar-0.27/readme.md   2018-07-12 02:16:27.000000000 +0200
+++ new/xmobar-0.28/readme.md   2018-08-20 00:44:03.000000000 +0200
@@ -1284,7 +1284,20 @@
 
         Run Com "date" ["+\"%a %b %_d %H:%M\""] "mydate" 600
 
-can be used in the output template as `%mydate%`
+can be used in the output template as `%mydate%`.
+
+Sometimes, you don't mind if the command executed exits with an error,
+or you might want to display a custom message in that case.  To that
+end, you can use the `ComX` variant:
+
+`ComX ProgramName Args ExitMessage Alias RefreshRate`
+
+Works like `Com`, but displaying `ExitMessage` (a string) if the
+execution fails.  For instance:
+
+        Run ComX "date" ["+\"%a %b %_d %H:%M\""] "N/A" "mydate" 600
+
+will display "N/A" if for some reason the `date` invocation fails.
 
 ## Other Plugins
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmobar-0.27/src/Commands.hs 
new/xmobar-0.28/src/Commands.hs
--- old/xmobar-0.27/src/Commands.hs     2018-07-12 02:16:27.000000000 +0200
+++ new/xmobar-0.28/src/Commands.hs     2018-08-20 00:44:03.000000000 +0200
@@ -48,6 +48,7 @@
     trigger _ sh  = sh Nothing
 
 data Command = Com Program Args Alias Rate
+             | ComX Program Args String Alias Rate
                deriving (Show,Read,Eq)
 
 type Args    = [String]
@@ -56,10 +57,12 @@
 type Rate    = Int
 
 instance Exec Command where
-    alias (Com p    _    a _)
-        | p /= ""             = if a == "" then p else a
-        | otherwise           = ""
-    start (Com prog args _ r) cb = if r > 0 then go else exec
+    alias (ComX p _ _ a _) =
+      if p /= "" then (if a == "" then p else a) else ""
+    alias (Com p a al r) = alias (ComX p a "" al r)
+    start (Com p as al r) cb =
+      start (ComX p as ("Could not execute command " ++ p) al r) cb
+    start (ComX prog args msg _ r) cb = if r > 0 then go else exec
         where go = exec >> tenthSeconds r >> go
               exec = do
                 (i,o,e,p) <- runInteractiveProcess prog args Nothing Nothing
@@ -71,8 +74,7 @@
                   ExitSuccess -> do str <- getL
                                     closeHandles
                                     cb str
-                  _ -> do closeHandles
-                          cb $ "Could not execute command " ++ prog
+                  _ -> closeHandles >> cb msg
 
 
 -- | Work around to the Int max bound: since threadDelay takes an Int, it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmobar-0.27/xmobar.cabal new/xmobar-0.28/xmobar.cabal
--- old/xmobar-0.27/xmobar.cabal        2018-07-12 02:16:27.000000000 +0200
+++ new/xmobar-0.28/xmobar.cabal        2018-08-20 00:44:03.000000000 +0200
@@ -1,5 +1,5 @@
 name:               xmobar
-version:            0.27
+version:            0.28
 homepage:           http://xmobar.org
 synopsis:           A Minimalistic Text Based Status Bar
 description:       Xmobar is a minimalistic text based status bar.
@@ -30,7 +30,7 @@
   other-modules:
         Xmobar, Actions, Bitmap, Config, Parsers, Commands, Localize,
         XUtil, StatFS, Runnable, ColorCache, Window, Signal,
-        Environment,
+        Environment, Paths_xmobar,
         Plugins, Plugins.BufferedPipeReader,
         Plugins.CommandReader, Plugins.Date, Plugins.EWMH,
         Plugins.PipeReader, Plugins.MarqueePipeReader,
@@ -139,7 +139,7 @@
     other-modules:
       Xmobar, Actions, Bitmap, Config, Parsers, Commands, Localize,
       XUtil, StatFS, Runnable, ColorCache, Window, Signal,
-      Environment,
+      Environment, Paths_xmobar,
       Plugins, Plugins.BufferedPipeReader,
       Plugins.CommandReader, Plugins.Date, Plugins.EWMH,
       Plugins.PipeReader, Plugins.MarqueePipeReader,
@@ -203,7 +203,7 @@
        cpp-options: -DUTF8
 
     if flag(with_inotify) || flag(all_extensions)
-       build-depends: hinotify == 0.3.*
+       build-depends: hinotify >= 0.3 && < 0.5
        other-modules: Plugins.Mail, Plugins.MBox
        cpp-options: -DINOTIFY
 


Reply via email to