В принципе все неодходимое
nano ~/.xmonad/xmonad.hs
import XMonad
import System.Exit
import qualified XMonad.StackSet as W
import qualified Data.Map as M
myTerminal = "urxvtc"
myBorderWidth = 1
myModMask = mod4Mask
myNumlockMask = mod2Mask
myWorkspaces = ["1","2","3","4","5","6","7","8","9"]
myNormalBorderColor = "#007700"
myFocusedBorderColor = "#00ff00"
myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
[ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
, ((modMask, xK_p ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"")
, ((modMask .|. shiftMask, xK_p ), spawn "gmrun")
, ((modMask .|. shiftMask, xK_c ), kill)
, ((modMask, xK_space ), sendMessage NextLayout)
, ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
, ((modMask, xK_n ), refresh)
, ((modMask, xK_Tab ), windows W.focusDown)
, ((modMask, xK_j ), windows W.focusDown)
, ((modMask, xK_k ), windows W.focusUp )
, ((modMask, xK_m ), windows W.focusMaster )
, ((modMask, xK_Return), windows W.swapMaster)
, ((modMask .|. shiftMask, xK_j ), windows W.swapDown )
, ((modMask .|. shiftMask, xK_k ), windows W.swapUp )
, ((modMask, xK_h ), sendMessage Shrink)
, ((modMask, xK_l ), sendMessage Expand)
, ((modMask, xK_t ), withFocused $ windows . W.sink)
, ((modMask , xK_comma ), sendMessage (IncMasterN 1))
, ((modMask , xK_period), sendMessage (IncMasterN (-1)))
, ((modMask, xK_e ), spawn "dolphin &")
, ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
, ((modMask , xK_q ), restart "xmonad" True) ]
++
[((m .|. modMask, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
[((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
[ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w))
, ((modMask, button2), (\w -> focus w >> windows W.swapMaster))
, ((modMask, button3), (\w -> focus w >> mouseResizeWindow w)) ]
myLayout = tiled ||| Mirror tiled ||| Full
where
tiled = Tall nmaster delta ratio
nmaster = 1
ratio = 1/2
delta = 3/100
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore ]
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
myLogHook = return ()
myStartupHook = return ()
main = xmonad defaults
defaults = defaultConfig {
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
borderWidth = myBorderWidth,
modMask = myModMask,
numlockMask = myNumlockMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
keys = myKeys,
mouseBindings = myMouseBindings,
layoutHook = myLayout,
manageHook = myManageHook,
logHook = myLogHook,
startupHook = myStartupHook
}
Более подробный конфиг можно найти на просторах интернета
Обязательное действие - особенности xmonad
Его конфиг сперва пишется на Haskell, потом компилирутеся, вот такие причуды)
nano ~/.Xdefaults
apt-get install xmonadСоздаем папку в домашней дерриктории. Знак "~" означает домашний, кто не знает)))
apt-get install xserver-xorg-core
apt-get install xinit
apt-get install rxvt-unicode
mkdir ~/.xmonadКопипастим этот конфиг
touch ~/.xmonad/xmonad.hs
nano ~/.xmonad/xmonad.hs
import XMonad
import System.Exit
import qualified XMonad.StackSet as W
import qualified Data.Map as M
myTerminal = "urxvtc"
myBorderWidth = 1
myModMask = mod4Mask
myNumlockMask = mod2Mask
myWorkspaces = ["1","2","3","4","5","6","7","8","9"]
myNormalBorderColor = "#007700"
myFocusedBorderColor = "#00ff00"
myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
[ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
, ((modMask, xK_p ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"")
, ((modMask .|. shiftMask, xK_p ), spawn "gmrun")
, ((modMask .|. shiftMask, xK_c ), kill)
, ((modMask, xK_space ), sendMessage NextLayout)
, ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
, ((modMask, xK_n ), refresh)
, ((modMask, xK_Tab ), windows W.focusDown)
, ((modMask, xK_j ), windows W.focusDown)
, ((modMask, xK_k ), windows W.focusUp )
, ((modMask, xK_m ), windows W.focusMaster )
, ((modMask, xK_Return), windows W.swapMaster)
, ((modMask .|. shiftMask, xK_j ), windows W.swapDown )
, ((modMask .|. shiftMask, xK_k ), windows W.swapUp )
, ((modMask, xK_h ), sendMessage Shrink)
, ((modMask, xK_l ), sendMessage Expand)
, ((modMask, xK_t ), withFocused $ windows . W.sink)
, ((modMask , xK_comma ), sendMessage (IncMasterN 1))
, ((modMask , xK_period), sendMessage (IncMasterN (-1)))
, ((modMask, xK_e ), spawn "dolphin &")
, ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
, ((modMask , xK_q ), restart "xmonad" True) ]
++
[((m .|. modMask, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
[((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
[ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w))
, ((modMask, button2), (\w -> focus w >> windows W.swapMaster))
, ((modMask, button3), (\w -> focus w >> mouseResizeWindow w)) ]
myLayout = tiled ||| Mirror tiled ||| Full
where
tiled = Tall nmaster delta ratio
nmaster = 1
ratio = 1/2
delta = 3/100
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore ]
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
myLogHook = return ()
myStartupHook = return ()
main = xmonad defaults
defaults = defaultConfig {
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
borderWidth = myBorderWidth,
modMask = myModMask,
numlockMask = myNumlockMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
keys = myKeys,
mouseBindings = myMouseBindings,
layoutHook = myLayout,
manageHook = myManageHook,
logHook = myLogHook,
startupHook = myStartupHook
}
Более подробный конфиг можно найти на просторах интернета
Обязательное действие - особенности xmonad
Его конфиг сперва пишется на Haskell, потом компилирутеся, вот такие причуды)
ghc --make -O2 ~/.xmonad/xmonad.hsОпределяем параметры запуска терминала
touch ~/.xinitrcГорячии клавиши:
echo 'xset r rate 180 50' >> ~/.xinitrc
echo 'urxvtd -q -f -o' >> ~/.xinitrc
echo 'xmonad' >> ~/.xinitrc
cat ~/.xinitrc
shift+win+:Настройки для иксов:шрифт, цвета, терминал ...
enter - открыть
C - закрыть
wim+:
1..9 - рабоцие столы
space - менять положение
T - тайлинг
h - увеличить
l - уменьшить
win+mous:
left - двигать
rihg - менять размер
nano ~/.Xdefaults
URxvt.font: xft:Andale Mono:size=6:autohint=trueЭто так бонусом. Прикольная игруха))). Можете не ставить....
URxvt.background: black
URxvt.foreground: white
URxvt.fading: 40
URxvt.scrollBar: false
URxvt.scrollstyle: plain
URxvt.secondaryScroll: true
URxvt.termName: rxvt-unicode
apt-get install hedgewarsНа этом все. Более подробно в нете. У меня так все заработало.
Комментариев нет:
Отправить комментарий