xmonad设置

-- default desktop configuration for Fedora

import System.Posix.Env (getEnv)
import Data.Maybe (maybe)

import XMonad
import XMonad.Config.Desktop
import XMonad.Config.Gnome
import XMonad.Config.Kde
import XMonad.Config.Xfce

main = do
     session <- getEnv "DESKTOP_SESSION"
--     xmonad  $ maybe desktopConfig desktop session
    --{
       --terminal    = "gnome-terminal"
     --, modMask     = mod4Mask
     --, borderWidth = 3 
    --}
 -- 是的,这些也都是函数,只不过是简单函数
 -- 它们不接受输入变量,返回静态值
     let config = maybe desktopConfig desktop session
     xmonad $ config { modMask = mod4Mask,terminal    = "gnome-terminal" }
myTerminal    = "gnome-terminal"
myModMask     = mod4Mask -- Windows键或Super_L键
myBorderWidth = 3

desktop "gnome" = gnomeConfig
desktop "kde" = kde4Config
desktop "xfce" = xfceConfig
desktop "xmonad-mate" = gnomeConfig
desktop _ = desktopConfig

ps. xmonad中禁用touchpad

Run the following command in a terminal:

xinput list

You will get an output that looks like this:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Laptop_Integrated_Webcam_1.3M             id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=13   [slave  keyboard (3)]

It displays all the input devices connected. Note that they all have an id. Since 12 is the id for my touchpad, running the following command will disable it.

xinput set-prop 12 "Device Enabled" 0

In Ubuntu versions >12.04 you can also directly disable via

xinput --disable 12

(and enable via a similar command)


禁用快捷键

let config = maybe desktopConfig desktop session 
 27      xmonad $ config { modMask = mod4Mask,terminal    = "gnome-terminal" }
 28                        `removeKeys` [(mod4Mask, xK_space)]


  1 http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-EZConfig.html
  2 removeKeys :: XConfig a -> [(ButtonMask, KeySym)] -> XConfig aSource
  3 
  4 Remove standard keybindings you're not using. Example use:
  5 
  6  main = xmonad $ defaultConfig { terminal = "urxvt" }
  7                  `removeKeys` [(mod1Mask .|. shiftMask, n) | n <- [xK_1 .. xK_9]]
  8 
  9 
 10 http://xmonad.org/xmonad-docs/xmonad/src/XMonad-Config.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值