From 3db6df450cb441b16bfb50959d42dfcd2a859999 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Sun, 8 Nov 2009 18:05:03 +0100 Subject: X.A.DynamicWorkspaces: new 'addWorkspacePrompt' method Ignore-this: a3992b1b7938be80d8fd2a5a503a4042 darcs-hash:20091108170503-1e371-0d0cc44d7d9bf275a4289b8161b098f65b338192.gz --- XMonad/Actions/DynamicWorkspaces.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'XMonad') diff --git a/XMonad/Actions/DynamicWorkspaces.hs b/XMonad/Actions/DynamicWorkspaces.hs index 66d4767..839d8d2 100644 --- a/XMonad/Actions/DynamicWorkspaces.hs +++ b/XMonad/Actions/DynamicWorkspaces.hs @@ -16,7 +16,8 @@ module XMonad.Actions.DynamicWorkspaces ( -- * Usage -- $usage - addWorkspace, removeWorkspace, + addWorkspace, addWorkspacePrompt, + removeWorkspace, addHiddenWorkspace, withWorkspace, selectWorkspace, renameWorkspace, @@ -101,6 +102,9 @@ selectWorkspace conf = workspacePrompt conf $ \w -> addWorkspace :: String -> X () addWorkspace newtag = addHiddenWorkspace newtag >> windows (greedyView newtag) +-- | Prompt for the name of a new workspace, and add it. +addWorkspacePrompt :: XPConfig -> X () +addWorkspacePrompt conf = mkXPrompt (Wor "New workspace name: ") conf (const (return [])) addWorkspace -- | Add a new hidden workspace with the given name. addHiddenWorkspace :: String -> X () -- cgit v1.2.3