Как я могу заставить xmonad работать с Gnome 3? [закрыто]

Как мне заставить xmonad работать с Gnome 3?

-Sidenote, некоторые команды, такие как перекомпиляция xmonad ( Alt + Q ) и выход ( Alt + Shift + Q ) и dmenu ( Alt + P ) не работали если я не добавил их в свой файл xmonad.hs, в то время как другие команды работали. Но затем остальные команды, такие как переключение между рабочими пространствами, открытие терминала, изменение макетов, не сработали, так что знаете, мне пришлось добавить все из них, странно.

import XMonad
import XMonad.Config.Gnome
import System.Exit
import qualified Data.Map as M
import qualified XMonad.StackSet as W

myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
    -- launch dmenu
    [ ((modm,               xK_p     ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"")

    -- Start a terminal.  Terminal to start is specified by myTerminal variable.
    , ((modm .|. shiftMask, xK_Return), spawn "gnome-terminal")

 -- Rotate through the available layout algorithms
    , ((modm,               xK_space ), sendMessage NextLayout)

    --  Reset the layouts on the current workspace to default
    , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)

    -- Resize viewed windows to the correct size
    , ((modm,               xK_n     ), refresh)

    -- Move focus to the next window
    , ((modm,               xK_Tab   ), windows W.focusDown)

    -- Move focus to the next window
    , ((modm,               xK_j     ), windows W.focusDown)

    -- Move focus to the previous window
    , ((modm,               xK_k     ), windows W.focusUp  )

    -- Move focus to the master window
    , ((modm,               xK_m     ), windows W.focusMaster  )

    -- Swap the focused window and the master window
    , ((modm,               xK_Return), windows W.swapMaster)

    -- Swap the focused window with the next window
    , ((modm .|. shiftMask, xK_j     ), windows W.swapDown  )

    -- Swap the focused window with the previous window
    , ((modm .|. shiftMask, xK_k     ), windows W.swapUp    )

    -- Shrink the master area
    , ((modm,               xK_h     ), sendMessage Shrink)

    -- Expand the master area
    , ((modm,               xK_l     ), sendMessage Expand)

    -- Push window back into tiling
    , ((modm,               xK_t     ), withFocused $ windows . W.sink)

    -- Increment the number of windows in the master area
    , ((modm              , xK_comma ), sendMessage (IncMasterN 1))

    -- Deincrement the number of windows in the master area
    , ((modm              , xK_period), sendMessage (IncMasterN (-1)))

    -- close focused window
    , ((modm .|. shiftMask, xK_c     ), kill)

    -- Quit xmonad
    , ((modm .|. shiftMask, xK_q     ), io (exitWith ExitSuccess))

    -- Restart xmonad
    , ((modm              , xK_q     ), spawn "xmonad --recompile; xmonad --restart")
    ]
    ++

    [((m .|. modm, k), windows $ f i)
        | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
        , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]

myManageHook = composeAll (
    [ manageHook gnomeConfig
    , className =? "Unity-2d-panel" --> doIgnore
    , className =? "Unity-2d-launcher" --> doFloat
    ])

main = xmonad gnomeConfig { manageHook = myManageHook, keys = myKeys }

/usr/share/gnome-session/sessions/xmonad.session

[GNOME Session]
Name=Xmonad/GNOME
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;notifications;
DefaultProvider-windowmanager=xmonad
DefaultProvider-notifications=notification-daemon

/ usr / share / xsessions / xmonad

[Desktop Entry]
Name=Xmonad/GNOME
Comment=Tiling window manager
Exec=gnome-session --session=xmonad
TryExec=/usr/bin/gnome-session
Type=XSession
5
задан 17 May 2012 в 11:37

0 ответов

Другие вопросы по тегам:

Похожие вопросы: