xmonad-contrib-0.18.0: Community-maintained extensions for xmonad

Copyright | (C) 2020 Zubin Duggal
License | BSD3
Maintainer | zubin.duggal@gmail.com
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Prompt.Zsh

Contents

- Usage
- Utility functions

Description

A version of XMonad.Prompt.Shell that lets you access the awesome power of Zsh completions in your xmonad prompt

Synopsis

- data Zsh = Zsh
- zshPrompt :: XPConfig -> FilePath -> X ()
- getZshCompl :: FilePath -> String -> IO [String]
- stripZsh :: String -> String

# Usage

1. Grab the `capture.zsh` script to capture zsh completions from https://github.com/Valodim/zsh-capture-completion
2. In your `xmonad.hs`:

    import XMonad.Prompt
    import XMonad.Prompt.Zsh

1. In your keybindings add something like:

      , ((modm .|. controlMask, xK_x), zshPrompt def "/path/to/capture.zsh")

For detailed instruction on editing the key binding see the tutorial.

data Zsh Source #

Constructors

Zsh |

#### Instances

Instances details

XPrompt Zsh Source # |
Instance details Defined in XMonad.Prompt.Zsh Methods showXPrompt :: Zsh -> String Source # nextCompletion :: Zsh -> String -> [String] -> String Source # commandToComplete :: Zsh -> String -> String Source # completionToCommand :: Zsh -> String -> String Source # completionFunction :: Zsh -> ComplFunction Source # modeAction :: Zsh -> String -> String -> X () Source #

zshPrompt :: XPConfig -> FilePath -> X () Source #

# Utility functions

getZshCompl :: FilePath -> String -> IO [String] Source #

stripZsh :: String -> String Source #

Removes the argument description from the zsh completion