From 2421f0ea9d5db639d52991f22150a67a438dbf59 Mon Sep 17 00:00:00 2001 From: gwern0 Date: Tue, 1 Apr 2008 03:50:49 +0200 Subject: RunOrRaise.hs: FF 3 doesn't use the "Firefox-bin" classname darcs-hash:20080401015049-f7719-c74577d9a3eb93c17a6107cafef34cc45d6bcd94.gz --- XMonad/Prompt/RunOrRaise.hs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'XMonad/Prompt/RunOrRaise.hs') diff --git a/XMonad/Prompt/RunOrRaise.hs b/XMonad/Prompt/RunOrRaise.hs index 9fafb2c..3fffe74 100644 --- a/XMonad/Prompt/RunOrRaise.hs +++ b/XMonad/Prompt/RunOrRaise.hs @@ -29,18 +29,18 @@ import Control.Monad (liftM2) import Data.Maybe import System.Directory (doesDirectoryExist, doesFileExist, executable, getPermissions) --- $usage --- 1. In your @~\/.xmonad\/xmonad.hs@: --- --- > import XMonad.Prompt --- > import XMonad.Prompt.RunOrRaise --- --- 2. In your keybindings add something like: --- --- > , ((modMask x .|. controlMask, xK_x), runOrRaisePrompt defaultXPConfig) --- --- For detailed instruction on editing the key binding see --- "XMonad.Doc.Extending#Editing_key_bindings". +{- $usage +1. In your @~\/.xmonad\/xmonad.hs@: + +> import XMonad.Prompt +> import XMonad.Prompt.RunOrRaise + +2. In your keybindings add something like: + +> , ((modMask x .|. controlMask, xK_x), runOrRaisePrompt defaultXPConfig) + +For detailed instruction on editing the key binding see +"XMonad.Doc.Extending#Editing_key_bindings". -} data RunOrRaisePrompt = RRP instance XPrompt RunOrRaisePrompt where @@ -61,8 +61,8 @@ open path = (io $ isNormalFile path) >>= \b -> getTarget x = (x,isApp x) isApp :: String -> Query Bool -isApp "firefox" = className =? "Firefox-bin" -isApp "thunderbird" = className =? "Thunderbird-bin" +isApp "firefox" = className =? "Firefox-bin" <||> className =? "Firefox" +isApp "thunderbird" = className =? "Thunderbird-bin" <||> className =? "Thunderbird" isApp x = liftM2 (==) pid $ pidof x pidof :: String -> Query Int -- cgit v1.2.3