mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
TUTORIAL: Add separators for < 0.17.0 instructions
At least one of the instructions spans multiple paragraphs, which makes it difficult to make out when this kind of interlude ends and the rest of the text picks back up. Introducing separators, while slightly visually jarring, solves this problem. As such, make sure that these sections are reasonably far apart and group ones that are close together.
This commit is contained in:
parent
fb1f33258e
commit
fd9de8903f
44
TUTORIAL.md
44
TUTORIAL.md
@ -379,12 +379,16 @@ effect (and some applications, like chromium, will misbehave and need
|
|||||||
some [Hacks] to make this work), we will also add the relevant function
|
some [Hacks] to make this work), we will also add the relevant function
|
||||||
to get "proper" fullscreen behaviour here.
|
to get "proper" fullscreen behaviour here.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
_IF YOU ARE ON A VERSION `< 0.17.0`_: The `ewmhFullscreen` function does
|
_IF YOU ARE ON A VERSION `< 0.17.0`_: The `ewmhFullscreen` function does
|
||||||
not exist in these versions. Instead of it, you can try to add
|
not exist in these versions. Instead of it, you can try to add
|
||||||
`fullscreenEventHook` to your `handleEventHook` to achieve similar
|
`fullscreenEventHook` to your `handleEventHook` to achieve similar
|
||||||
functionality (how to do this is explained in the documentation of
|
functionality (how to do this is explained in the documentation of
|
||||||
[XMonad.Hooks.EwmhDesktops]).
|
[XMonad.Hooks.EwmhDesktops]).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
To use the two combinators, we compose them with the `xmonad` function
|
To use the two combinators, we compose them with the `xmonad` function
|
||||||
in the following way:
|
in the following way:
|
||||||
|
|
||||||
@ -430,7 +434,7 @@ Much better!
|
|||||||
## Make XMonad and Xmobar Talk to Each Other
|
## Make XMonad and Xmobar Talk to Each Other
|
||||||
|
|
||||||
Onto the main dish. First, we have to import the necessary modules.
|
Onto the main dish. First, we have to import the necessary modules.
|
||||||
Add the following to your list of imports:
|
Add the following to your list of imports
|
||||||
|
|
||||||
``` haskell
|
``` haskell
|
||||||
import XMonad.Hooks.DynamicLog
|
import XMonad.Hooks.DynamicLog
|
||||||
@ -438,23 +442,27 @@ import XMonad.Hooks.StatusBar
|
|||||||
import XMonad.Hooks.StatusBar.PP
|
import XMonad.Hooks.StatusBar.PP
|
||||||
```
|
```
|
||||||
|
|
||||||
_IF YOU ARE ON A VERSION `< 0.17.0`_: The `XMonad.Hooks.StatusBar` and
|
and replace your `main` function above with:
|
||||||
`XMonad.Hooks.StatusBar.PP` modules don't exist yet. You can find
|
|
||||||
everything you need in the `XMonad.Hooks.DynamicLog` module, so remove
|
|
||||||
these two imports.
|
|
||||||
|
|
||||||
Replace your `main` function above with:
|
|
||||||
|
|
||||||
``` haskell
|
``` haskell
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = xmonad $ ewmhFullscreen $ ewmh $ xmobarProp $ myConfig
|
main = xmonad $ ewmhFullscreen $ ewmh $ xmobarProp $ myConfig
|
||||||
```
|
```
|
||||||
|
|
||||||
_IF YOU ARE ON A VERSION `< 0.17.0`_: The `xmobarProp` function does not
|
---
|
||||||
exist in these versions. Instead of it, use `xmobar` via
|
|
||||||
`main = xmonad . ewmh =<< xmobar myConfig` and carefully read the part
|
_IF YOU ARE ON A VERSION `< 0.17.0`_: The `XMonad.Hooks.StatusBar` and
|
||||||
about pipes later on (`xmobar` uses pipes to make xmobar talk to
|
`XMonad.Hooks.StatusBar.PP` modules don't exist yet. You can find
|
||||||
xmonad).
|
everything you need in the `XMonad.Hooks.DynamicLog` module, so remove
|
||||||
|
these two imports.
|
||||||
|
|
||||||
|
Further, the `xmobarProp` function does not exist in older versions.
|
||||||
|
Instead of it, use `xmobar` via `main = xmonad . ewmh =<< xmobar
|
||||||
|
myConfig` and carefully read the part about pipes later on (`xmobar`
|
||||||
|
uses pipes to make xmobar talk to xmonad). Do note the lack of
|
||||||
|
`ewmhFullscreen`, as explained above!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
As a quick side-note, we could have also written
|
As a quick side-note, we could have also written
|
||||||
|
|
||||||
@ -540,11 +548,15 @@ when things are not being read! For this reason we have to use
|
|||||||
(this is useful, for example, for [XMonad.Util.ClickableWorkspaces],
|
(this is useful, for example, for [XMonad.Util.ClickableWorkspaces],
|
||||||
which is a new feature in `0.17.0`).
|
which is a new feature in `0.17.0`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
_IF YOU ARE ON A VERSION `< 0.17.0`_: As discussed above, the `xmobar`
|
_IF YOU ARE ON A VERSION `< 0.17.0`_: As discussed above, the `xmobar`
|
||||||
function uses pipes, so you actually do want to use the `StdinReader`.
|
function uses pipes, so you actually do want to use the `StdinReader`.
|
||||||
Simply replace _all_ occurences of `XMonadLog` with `StdinReader`
|
Simply replace _all_ occurences of `XMonadLog` with `StdinReader`
|
||||||
below (don't forget the template!)
|
below (don't forget the template!)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Configuring Xmobar
|
## Configuring Xmobar
|
||||||
|
|
||||||
Now, before this will work, we have to configure xmobar. Here's a nice
|
Now, before this will work, we have to configure xmobar. Here's a nice
|
||||||
@ -660,6 +672,8 @@ main = xmonad
|
|||||||
$ myConfig
|
$ myConfig
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
_IF YOU ARE ON A VERSION `< 0.17.0`_: `xmobar` has a similar definition,
|
_IF YOU ARE ON A VERSION `< 0.17.0`_: `xmobar` has a similar definition,
|
||||||
relying on `statusBar` alone: `xmobar = statusBar "xmobar" xmobarPP
|
relying on `statusBar` alone: `xmobar = statusBar "xmobar" xmobarPP
|
||||||
toggleStrutsKey`. Sadly, the `defToggleStrutsKey` function is not yet
|
toggleStrutsKey`. Sadly, the `defToggleStrutsKey` function is not yet
|
||||||
@ -675,6 +689,8 @@ main = xmonad
|
|||||||
toggleStrutsKey XConfig{ modMask = m } = (m, xK_b)
|
toggleStrutsKey XConfig{ modMask = m } = (m, xK_b)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
The `defToggleStrutsKey` here is just the key with which you can toggle
|
The `defToggleStrutsKey` here is just the key with which you can toggle
|
||||||
the bar; it is bound to `M-b`. If you want to change this, you can also
|
the bar; it is bound to `M-b`. If you want to change this, you can also
|
||||||
define your own:
|
define your own:
|
||||||
@ -771,6 +787,8 @@ myXmobarPP = def
|
|||||||
lowWhite = xmobarColor "#bbbbbb" ""
|
lowWhite = xmobarColor "#bbbbbb" ""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
_IF YOU ARE ON A VERSION `< 0.17`_: Both `logTitles` and `xmobarBorder`
|
_IF YOU ARE ON A VERSION `< 0.17`_: Both `logTitles` and `xmobarBorder`
|
||||||
are not available yet, so you will have to remove them. As an
|
are not available yet, so you will have to remove them. As an
|
||||||
alternative to `xmobarBorder`, a common way to "mark" the currently
|
alternative to `xmobarBorder`, a common way to "mark" the currently
|
||||||
@ -778,6 +796,8 @@ _IF YOU ARE ON A VERSION `< 0.17`_: Both `logTitles` and `xmobarBorder`
|
|||||||
`ppCurrent = wrap (blue "[") (blue "]")` and see if you like it. Also
|
`ppCurrent = wrap (blue "[") (blue "]")` and see if you like it. Also
|
||||||
read the bit about `ppOrder` further down!
|
read the bit about `ppOrder` further down!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
That's a lot! But don't worry, take a deep breath and remind yourself
|
That's a lot! But don't worry, take a deep breath and remind yourself
|
||||||
of what you read above in the documentation of the [PP record]. Even if
|
of what you read above in the documentation of the [PP record]. Even if
|
||||||
you haven't read the documentation yet, most of the fields should be
|
you haven't read the documentation yet, most of the fields should be
|
||||||
|
Loading…
x
Reference in New Issue
Block a user