Quite difficult hack

Hi, folks! I'm trying to set to functions in my xmonad.hs, without success. I need to change my workspace with functions keys, not as normal with numbers. I had try the Droundy.hs method, but it not work on my config. Also, I want to have my opacity change on focus in and out. Anyone knows how can I achive this with transet-df? Belowe, some of my config: --- start here import XMonad import XMonad.Hooks.ManageDocks import XMonad.Hooks.EwmhDesktops import qualified XMonad.StackSet as W import Data.Bits ((.|.)) import System.Exit import System.IO import qualified Data.Map as M import XMonad.Layout.TwoPane import XMonad.Layout.ResizableTile import XMonad.Layout.Tabbed import XMonad.Layout.Combo import XMonad.Layout.WindowNavigation import XMonad.Layout.ShowWName -- Actions import XMonad.Actions.CycleWS import XMonad.Actions.SwapWorkspaces import XMonad.Actions.Submap import XMonad.Actions.DwmPromote import XMonad.Actions.UpdatePointer --Utils import XMonad.Util.EZConfig main = xmonad $ defaultConfig { borderWidth = 2 , focusedBorderColor = "#ffa434" , normalBorderColor = "#2e3436" , manageHook = myManageHook <+> manageDocks , workspaces = map show [1 .. 12 :: Int] , terminal = "Terminal" , modMask = mod4Mask , logHook = myLogHook , layoutHook = showWName $ windowNavigation $ (avoidStruts (tall ||| Mirror tall ||| myT , keys = myKeys } where etc, etc, etc... myLogHook :: X () myLogHook = do ewmhDesktopsLogHook return () >> updatePointer (Relative 1 1) etc, etc, etc... myKeys = \conf -> mkKeymap conf $ etc, etc, etc... --Shift workspaces ++ [ (m ++ i, windows $ f j) | (i, j) <- zip (map show [1..12]) , (m, f) <- [("M-", W.greedyView), ] etc, etc, etc... ] thank's a lot, Andrea

* On Thursday, May 22 2008, Andrea Spada wrote:
Hi, folks! I'm trying to set to functions in my xmonad.hs, without success.
I need to change my workspace with functions keys, not as normal with numbers. I had try the Droundy.hs method, but it not work on my config.
Belowe, some of my config:
myKeys = \conf -> mkKeymap conf $
etc, etc, etc...
--Shift workspaces ++ [ (m ++ i, windows $ f j) | (i, j) <- zip (map show [1..12]) , (m, f) <- [("M-", W.greedyView), ]
I find the workspace switching keybindings given in XMonad.Actions.DynamicWorkspaces easier to understand: myKeys = otherBindings ++ zip (zip (repeat (mod1Mask)) [xK_1..xK_9]) (map (withNthWorkspace W.greedyView) [0..]) ++ zip (zip (repeat (mod1Mask .|. shiftMask)) [xK_1..xK_9]) (map (withNthWorkspace W.shift) [0..]) To use the F keys, you want to change the list of keys [xK_1..xK_9] to [xK_F1..xK_F12]. There might be a way to convert it to not use withNthWorkspace, but it will probably look more like what you had.
Also, I want to have my opacity change on focus in and out. Anyone knows how can I achive this with transet-df? It doesn't look like it is immediately achievable from the config, but someone more knowledgeable may think otherwise.

On Fri, 23 May 2008 16:20:22 -0400
Adam Vogt
I find the workspace switching keybindings given in XMonad.Actions.DynamicWorkspaces easier to understand: myKeys = otherBindings ++ zip (zip (repeat (mod1Mask)) [xK_1..xK_9]) (map (withNthWorkspace W.greedyView) [0..]) ++ zip (zip (repeat (mod1Mask .|. shiftMask)) [xK_1..xK_9]) (map (withNthWorkspace W.shift) [0..])
To use the F keys, you want to change the list of keys [xK_1..xK_9] to [xK_F1..xK_F12].
Well, I agree with you, and is exactly what I have done at first... but it doesn't work. Xmonad compile with no errors, but nothing hapens when trying to swith workspace. So, I had try ome others way to achive this, finally discovering the last one, thats everything but elegant.
There might be a way to convert it to not use withNthWorkspace, but it will probably look more like what you had.
Also, I want to have my opacity change on focus in and out. Anyone knows how can I achive this with transet-df? It doesn't look like it is immediately achievable from the config, but someone more knowledgeable may think otherwise.
xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
participants (3)
-
Adam Vogt
-
Andrea Spada
-
Justin Bogner