diff options
| author | slotThe <soliditsallgood@mailbox.org> | 2020-12-15 12:58:48 +0100 | 
|---|---|---|
| committer | jao <jao@gnu.org> | 2020-12-15 18:37:20 +0000 | 
| commit | 8e912e771da383d0f18cd6daf9fa003cb2151488 (patch) | |
| tree | 81395fd184b2dcbf69c85e8c168a44fe31226f36 | |
| parent | c4cade7bfd8ba57242ec54347f9f3ee750255701 (diff) | |
| download | xmobar-8e912e771da383d0f18cd6daf9fa003cb2151488.tar.gz xmobar-8e912e771da383d0f18cd6daf9fa003cb2151488.tar.bz2  | |
Prefer UnsafeXmonadLog over UnsafeStdinReader
| -rw-r--r-- | doc/plugins.org | 53 | 
1 files changed, 31 insertions, 22 deletions
diff --git a/doc/plugins.org b/doc/plugins.org index 8b529c5..99a850b 100644 --- a/doc/plugins.org +++ b/doc/plugins.org @@ -1286,6 +1286,33 @@ choice.    =StdinReader=. For instance, it allows you to (re)start xmobar outside    xmonad. +** =UnsafeXMonadLog= + +- Aliases to UnsafeXMonadLog +- Displays any text received by xmobar on the =_XMONAD_LOG= atom. +- Will not do anything to the text received. This means you can pass +  xmobar dynamic actions. Be careful to escape (using =<raw=…>=) or +  remove tags from dynamic text that you pipe through to xmobar in this +  way. + +- Sample usage: Send the list of your workspaces, enclosed by actions +  tags, to xmobar.  This enables you to switch to a workspace when you +  click on it in xmobar! + +  #+begin_src shell +    <action=`xdotool key alt+1`>ws1</action> <action=`xdotool key alt+1`>ws2</action> +  #+end_src + +- If you use xmonad, It is advised that you still use =xmobarStrip= for +  the =ppTitle= in your logHook: + +  #+begin_src haskell +    myPP = defaultPP { ppTitle = xmobarStrip } +    main = xmonad $ def +      { logHook = dynamicLogString myPP >>= xmonadPropLog +      } +  #+end_src +  ** =StdinReader=  - Aliases to StdinReader @@ -1299,34 +1326,16 @@ choice.  - Aliases to UnsafeStdinReader  - Displays any text received by xmobar on its standard input. -- Will not do anything to the text received. This means you can pass -  dynamic actions via stdin. Be careful to escape (using =<raw=…>=) or -  remove tags from dynamic text that you pipe-thru to xmobar's standard -  input, e.g. window's title. -- Sample usage: send to xmobar's stdin the list of your workspaces -  enclosed by actions tags that switches the workspaces to be able to -  switch workspaces by clicking on xmobar: +- Similar to [[=UnsafeXMonadLog=][UnsafeXMonadLog]], in the sense that it does not strip any +  actions from the received text, only using =stdin= and not a property +  atom of the root window. Please be equally carefully when using this +  as when using =UnsafeXMonadLog=! -  #+begin_src shell -    <action=`xdotool key alt+1`>ws1</action> <action=`xdotool key alt+1`>ws2</action> -  #+end_src -** =UnsafeXMonadLog= -- Aliases to UnsafeXMonadLog -- Similar to =StdinReader= versus =UnsafeStdinReader=, this does not -  strip =<action ...>= tags from XMonad's =_XMONAD_LOG=. -- It is advised that you still use =xmobarStrip= for the ppTitle in your -  logHook: -  #+begin_src haskell -    myPP = defaultPP { ppTitle = xmobarStrip } -    main = xmonad $ def -      { logHook = dynamicLogString myPP >>= xmonadPropLog -      } -  #+end_src  ** =CommandReader "/path/to/program" Alias=  | 
