Como posso obter o xmonad para trabalhar com o Gnome 3?
-Sidenote, alguns comandos como recompilar xmonad ( Alt + Q ) e sair ( Alt + Shift + Q ) e dmenu ( Alt + P ) não funcionavam a menos que eu os adicionasse ao meu arquivo xmonad.hs, enquanto os outros comandos funcionavam . Mas então, o resto dos comandos, como alternar entre os espaços de trabalho, abrir o terminal, alterar os layouts, não funcionou, então sei que tive que adicionar todos eles, estranho.
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