Skip to content

Instantly share code, notes, and snippets.

@zeta-00
Created January 20, 2020 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeta-00/64b006fad838508fffc0fcaad396dd6e to your computer and use it in GitHub Desktop.
Save zeta-00/64b006fad838508fffc0fcaad396dd6e to your computer and use it in GitHub Desktop.
home.nix installation:
xsession = {
enable = true;
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
haskellPackages = pkgs.haskell.packages.ghc865;
extraPackages = haskellPackages: with haskellPackages; [
xmonad
monad-logger
xmonad-contrib
xmonad-entryhelper
# xmonad-eval
xmonad-extras
xmonad-screenshot
xmonad-utils
xmonad-volume
xmonad-wallpaper
# xmonad-windownames
];
config = ./xmonad.hs;
};
};
@zeta-00
Copy link
Author

zeta-00 commented Jan 20, 2020

xmonad.hs configuration file:

import XMonad
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig
import Graphics.X11.ExtraTypes.XF86
--import qualified XMonad.Util.Brightness as Bright

main = xmonad $ defaultConfig

            { modMask = mod4Mask -- Use Super instead of Alt
            , terminal = "terminator"
            }

            `additionalKeysP`
            [ ("M-!", windows $ W.greedyView "1")
            , ("M-S-!", windows $ W.shift "1")
            , ("M-\"", windows $ W.greedyView "2")
            , ("M-S-\"", windows $ W.shift "2")
            , ("M-(", windows $ W.greedyView "3")
            , ("M-S-(", windows $ W.shift "3")
            , ("M-j", windows $ W.greedyView "4")
            , ("M-S-j", windows $ W.shift "4")
            , ("M-y", windows $ W.greedyView "5")
            , ("M-S-y", windows $ W.shift "5")
            , ("M-z", windows $ W.greedyView "6")
            , ("M-S-Z", windows $ W.shift "6")
            , ("M-k", windows $ W.greedyView "7")
            , ("M-S-k", windows $ W.shift "7")
            , ("M-+", windows $ W.greedyView "8")
            , ("M-S-+", windows $ W.shift "8")
            , ("M-*", windows $ W.greedyView "9")
            , ("M-S-*", windows $ W.shift "9")
            , ("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle")
            , ("<XF86AudioLowerVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ -1.5%")
            , ("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +1.5%")
            --, ("<XF86MonBrightnessDown>", Bright.decrease)
            --, ("<XF86MonBrightnessUp>", Bright.increase)
            , ("M-S-e", spawn "emacs")
            , ("M-S-w", spawn "firefox")
            , ("M-S-v", spawn "kodi")
            ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment