How to Use Xmonad, a Tiling Window Manager for Linux


Installation

Xmonad doesn’t include an application launcher by default. You’ll probably also want dmenu, a basic application launcher that works with xmonad. To install both on Ubuntu, run the following command:

sudo apt-get install xmonad suckless-tools

image

Omit suckless-tools from the command if you’d rather not install dmenu. This package contains dmenu – if you’re using an older version of Ubuntu, you may have to install dwm-tools instead.

If you’re using another Linux distribution, you should find xmonad and dmenu in its repositories, too.

After installing xmonad, log out of your Ubuntu system, click the icon next to your name on the login screen, and select XMonad before logging back in.

image

Getting Started

This is what you’ll see when you start xmonad:

image

Don’t worry, it didn’t fail to load — it just starts with an empty screen. Press Alt+Shift+Enter to launch a terminal.

image

To launch additional terminals, press the Alt+Shift+Enter shortcut again. Xmonad automatically resizes and arranges the windows on screen, tiling them. This is what a “tiling window manager” does.

image

To move the focus using the keyboard, use the Alt+J or Alt+K keyboard shortcuts. The focus also follows the mouse, so all you have to do is hover your cursor over a window to focus it.

Use the Alt+Space keyboard shortcut to switch between the different tiling modes. One of the modes shows only one window on the screen at a time.

image

If you installed dmenu, you can press Alt+P to pull it up. Type the first few letters of an application’s name, and then press Enter to launch it.

image

Graphical applications like Firefox appear tiled, just like the terminal windows.

image

Here are some other important keyboard shortcuts to get you started:

  • Alt+Shift+C – Close the focused window.
  • Alt+. & Alt+, – Control the number of windows displayed in the master pane on the left.
  • Alt+Enter – Move the focused window to the master pane on the left.
  • Alt+Shift+J & Alt+Shift+K – Swap the focused window with an adjacent window.
  • Alt+H & Alt+L – Resize the border between the master and secondary panes.
  • Alt+Shift+Q – Log out.

Xmonad supports workspaces, too. For example, to switch to workspace two, use the Alt+2 keyboard shortcut. To move the currently focused window to workspace three, use the Alt+Shift+3keyboard shortcut. Each workspace can have its own tiling mode settings.

Configuring Xmonad

Xmonad is extremely configurable, if you’re willing to get your hands dirty. Xmonad itself is written in Haskell, and its configuration file format uses Haskell, too. Xmonad’s configuration file is located at ~/.xmonad/xmonad.hs (that is, /home/YOU/.xmonad/xmonad.hs). This file doesn’t exist by default – you’ll have to create it yourself.

To get started configuring xmonad, you may want to start with a template file. For more advanced configuration, check out this list of configuration tips on the official wiki.

After modifying the configuration, use the Alt+Q keyboard shortcut to reload your configuration. You can also change the default modifier key in the configuration file – if you do, use your custom modifer key in place of every Alt in this post.


What do you think of xmonad? Do you prefer a different tiling window manager? Leave a comment and let us know.



本文转自:http://www.howtogeek.com/114728/how-to-use-xmonad-a-tiling-window-manager-for-linux/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值