mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-28 10:41:52 -07:00
scripts
tests
Accordion.hs
Anneal.hs
Circle.hs
Combo.hs
Commands.hs
ConstrainedResize.hs
CopyWindow.hs
CycleWS.hs
DeManage.hs
DirectoryPrompt.hs
Dishes.hs
Dmenu.hs
DragPane.hs
DwmPromote.hs
DynamicLog.hs
DynamicWorkspaces.hs
Dzen.hs
EwmhDesktops.hs
FindEmptyWorkspace.hs
FlexibleManipulate.hs
FlexibleResize.hs
FloatKeys.hs
FocusNth.hs
Grid.hs
HintedTile.hs
Invisible.hs
LICENSE
LayoutCombinators.hs
LayoutHints.hs
LayoutModifier.hs
LayoutScreens.hs
MagicFocus.hs
Magnifier.hs
ManPrompt.hs
ManageDocks.hs
Maximize.hs
MetaModule.hs
Mosaic.hs
MosaicAlt.hs
MouseGestures.hs
NamedWindows.hs
NoBorders.hs
README
ResizableTile.hs
Roledex.hs
RotSlaves.hs
RotView.hs
Run.hs
SetWMName.hs
ShellPrompt.hs
SimpleDate.hs
SinkAll.hs
Spiral.hs
Square.hs
SshPrompt.hs
Submap.hs
SwapWorkspaces.hs
SwitchTrans.hs
Tabbed.hs
TagWindows.hs
ThreeColumns.hs
TilePrime.hs
ToggleLayouts.hs
TwoPane.hs
UrgencyHook.hs
Warp.hs
WindowBringer.hs
WindowNavigation.hs
WindowPrompt.hs
WmiiActions.hs
WorkspaceDir.hs
WorkspacePrompt.hs
XMonadPrompt.hs
XPrompt.hs
XPropManage.hs
XSelection.hs
XUtils.hs
53 lines
1.5 KiB
Haskell
53 lines
1.5 KiB
Haskell
-----------------------------------------------------------------------------
|
|
-- |
|
|
-- Module : XMonadContrib.XMonadPrompt
|
|
-- Copyright : (C) 2007 Andrea Rossato
|
|
-- License : BSD3
|
|
--
|
|
-- Maintainer : andrea.rossato@unibz.it
|
|
-- Stability : unstable
|
|
-- Portability : unportable
|
|
--
|
|
-- A prompt for running XMonad commands
|
|
--
|
|
-----------------------------------------------------------------------------
|
|
|
|
module XMonadContrib.XMonadPrompt (
|
|
-- * Usage
|
|
-- $usage
|
|
xmonadPrompt,
|
|
xmonadPromptC
|
|
) where
|
|
|
|
import XMonad
|
|
import XMonadContrib.XPrompt
|
|
import XMonadContrib.Commands (defaultCommands, runCommand')
|
|
|
|
-- $usage
|
|
--
|
|
-- in Config.hs add:
|
|
--
|
|
-- > import XMonadContrib.XPrompt
|
|
-- > import XMonadContrib.XMonadPrompt
|
|
--
|
|
-- in you keybindings add:
|
|
--
|
|
-- > , ((modMask .|. controlMask, xK_x), xmonadPrompt defaultXPConfig)
|
|
--
|
|
|
|
-- %import XMonadContrib.XPrompt
|
|
-- %import XMonadContrib.XMonadPrompt
|
|
-- %keybind , ((modMask .|. controlMask, xK_x), xmonadPrompt defaultXPConfig)
|
|
|
|
data XMonad = XMonad
|
|
|
|
instance XPrompt XMonad where
|
|
showXPrompt XMonad = "XMonad: "
|
|
|
|
xmonadPrompt :: XPConfig -> X ()
|
|
xmonadPrompt c = mkXPrompt XMonad c (mkComplFunFromList (map fst defaultCommands)) runCommand'
|
|
|
|
-- xmonad prompt with custom command list
|
|
xmonadPromptC :: [(String, X ())] -> XPConfig -> X ()
|
|
xmonadPromptC commands c = mkXPrompt XMonad c (mkComplFunFromList (map fst commands)) runCommand'
|