Tuesday, February 23, 2016

Youtube fullscreen with xmonad

Source
import XMonad.Hooks.EwmhDesktops

main = do
    xmonad $ ewmh defaultConfig
        ...
        , handleEventHook = fullscreenEventHook <+> handleEventHook defaultConfig

Toggle layout with X Window System

setxkbmap -option "ctrl:nocaps"
setxkbmap -layout "us,ru" -option "grp:lalt_lshift_toggle"
Where to place the code

Caps Lock as Ctrl with X Window System

First way

 setxkbmap -option "ctrl:nocaps"

Second way

 xmodmap -e "remove Lock = Caps_Lock"
 xmodmap -e "keysym Caps_Lock = Control_L"
 xmodmap -e "add Control = Control_L"

Where to place the code

The code is to be placed in ~/.xsession. If a login manager is used, it should call XSession. For example,
$ cat /usr/share/xsessions/xmonad.desktop
[Desktop Entry]
Name=XMonad
Comment=Lightweight tiling window manager
Exec=/etc/X11/Xsession
Icon=
Type=XSession