diff options
author | gwern0 <gwern0@gmail.com> | 2008-04-01 03:50:49 +0200 |
---|---|---|
committer | gwern0 <gwern0@gmail.com> | 2008-04-01 03:50:49 +0200 |
commit | 2421f0ea9d5db639d52991f22150a67a438dbf59 (patch) | |
tree | 580fcbfd4a7d35ab67f888391c69ba24cb8b7807 | |
parent | e6c215cbecc6c4c4f86d8d18884e55d82d3eb1ce (diff) | |
download | XMonadContrib-2421f0ea9d5db639d52991f22150a67a438dbf59.tar.gz XMonadContrib-2421f0ea9d5db639d52991f22150a67a438dbf59.tar.xz XMonadContrib-2421f0ea9d5db639d52991f22150a67a438dbf59.zip |
RunOrRaise.hs: FF 3 doesn't use the "Firefox-bin" classname
darcs-hash:20080401015049-f7719-c74577d9a3eb93c17a6107cafef34cc45d6bcd94.gz
-rw-r--r-- | XMonad/Prompt/RunOrRaise.hs | 28 |
1 files changed, 14 insertions, 14 deletions
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 |