Xmonad: Difference between revisions

imported>Ackthet
No edit summary
No edit summary
 
(18 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''Xmonad''' is the tiling window manager that rocks!
'''Xmonad''' is the tiling window manager that rocks!


=Ackthet's xmonad.hs=
=Basic Xmonad Keybindings=
Put it in <code>~/.xmonad/xmonad.hs</code>, then restart Xmonad (Mod-q be default). This configuration file is the default configureation file, plus a few changes. The mode key is moved from Alt to Super (windows key), the defalut terminal is set to urxvt instead of xterm, and the PrtSc and Ctr-PrtSc are mapped to scrot (see below for details).
Xmonad has very similar keybindings to [[w:dwm|dwm]]. Heres a few of the major ones. They can be redefined by editing the example configuration below.
;Mod-Space
:Changes the tiling method
;Mod-Enter
:Changes the selected tile to the master tile
;Mod-q
:Restarts Xmonad. Note that any open windows and tiles will NOT bet lost
;Mod-Shift-q
:Kills Xmonad, and usually Xorg (depending on how you start X)
;Mod-j
:Select the next tile
;Mod-k
:Select the previous tile
;Mod-Shift-j
:Move the current tile forward
;Mod-Shift-k
:Move the current tile backwards
;Mod-n
:Moves to desktop number n
;Mod-Shift-n
:Move the current tile to desktop n
;Mod-h
:Increase the size of the current tile
;Mod-l
:Decrease the size of the current tile
;Mod-p
:Launches dmenu (if installed)
 
=Configuring Xmonad=
Edit <code>~/.xmonad/xmonad.hs</code>, then restart Xmonad (Mod-q be default). This configuration file below is the default configuration file, plus a few changes. The mode key is moved from Alt to Super (windows key), the default terminal is set to urxvt instead of xterm, and the PrtSc and Ctr-PrtSc are mapped to scrot (see below for details). Note that this file is written in Haskell, and thus, comments are --. This file also starts xmobar (Xmonad's bar). It is usually a separate package, so if you want this bar, make sure to install it and configure .xmobarrc.
 
=Ackthet's xmonad.hs and .xmobarrc=
For dual head setup, come to IRC and bug Shards_of_Narsil (used to be ackthet)
Here is an example .xmobarrc:
<pre>
Config { font        = "-*-terminus-*-*-*-*-12-*-*-*-*-*-*-u"
            , bgColor      = "#000000"
            , fgColor      = "#00FFFF"
            , position =  Top
            , lowerOnStart = False
            , commands    = [ Run Network "eth0" ["-L","0","-H","32","-l", "green", "--normal","orange","--high","red"] 10
                              , Run Network "wlan0" ["-L","0","-H","32","-l", "green", "--normal","orange","--high","red"] 10
                              , Run Cpu ["<cpu0>/<cpu1>","-L","3","-H","50","-l","green","--normal","orange","--high","red"]  10
                              , Run Cpu ["<cpu0>","-L","3","-H","50","-l","green","--normal","orange","--high","red"]  10
                              , Run Memory ["-t","Mem: <usedratio>%", "-l", "green", "--normal","orange","--high","red"] 10
                              , Run Date "%a %b %_d %H:%M" "date" 60
                              , Run CpuFreq ["-t","Freq:<cpu0>|<cpu1>GHz","-L","0","-H","2","-l","green","-n","orange","-h","red"] 10
                              , Run Battery ["-L","50","-H","75","--high","green","--normal","yellow", "--low", "red"] 10
                              , Run StdinReader
                              ]
            , sepChar      = "%"
            , alignSep    = "}{"
            , template = " %StdinReader% }{ %cpu% @ %cpufreq% <fc=#0033FF>|</fc>  %memory% <fc=#0033FF>|</fc> %eth0% <fc=#0033FF>|</fc> %wlan0%  <fc=#0033FF>|</fc> %date% <fc=#0033FF>|</fc> %battery%"
            }
</pre>
Here is a modified xmonad.hs
<pre>
<pre>
--
--
Line 334: Line 389:
     }
     }
</pre>
</pre>
[[Category:Howtos]]
[[Category:Software]]
[[Category:Scripts]]