SHARE
TWEET

Untitled

a guest Oct 15th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import XMonad
  2. import XMonad.Hooks.DynamicLog
  3. import XMonad.Hooks.ManageDocks
  4. import XMonad.Util.Run(spawnPipe)
  5. import XMonad.Util.EZConfig(additionalKeys)
  6. import XMonad.Layout.NoBorders
  7. import XMonad.Layout.Gaps
  8. import XMonad.Layout.Spacing
  9. import XMonad.Hooks.EwmhDesktops
  10. import XMonad.Layout.ThreeColumns
  11. import XMonad.Layout.Circle
  12. import XMonad.Layout.BinarySpacePartition
  13. import System.IO
  14. import XMonad.Actions.KeyRemap ( KeymapTable (..)
  15.     , buildKeyRemapBindings
  16.     , setDefaultKeyRemap
  17.     , setKeyRemap
  18.     , emptyKeyRemap )
  19.  
  20. primaryColor = "#df5f5f"
  21. bgColor      = "#1c1c1c"
  22.  
  23. myFocusedBorderColor = primaryColor
  24. myNormalBorderColor  = bgColor
  25.  
  26. myLayoutHook = ThreeColMid 1 (3/100) (1/2)
  27.   ||| emptyBSP
  28.  
  29. myKeyRemap = KeymapTable [ ((0, xK_i), (0, xK_I))
  30.                          ]
  31.  
  32. main = do
  33.     xmproc <- spawnPipe "xmobar"
  34.  
  35.     xmonad $ docks defaultConfig
  36.         { manageHook = manageDocks <+> manageHook defaultConfig
  37.         , terminal   = "kitty"
  38.         , handleEventHook = ewmhDesktopsEventHook
  39.         , layoutHook = smartSpacing 4 $ smartBorders $ avoidStruts $ myLayoutHook --defaultConfig
  40.         , logHook = ewmhDesktopsLogHook <+> dynamicLogWithPP xmobarPP
  41.                         { ppOutput = hPutStrLn xmproc
  42.                         , ppCurrent = xmobarColor primaryColor ""
  43.                         , ppTitle = xmobarColor primaryColor "" . shorten 50
  44.                         }
  45.         , modMask = mod4Mask     -- Rebind Mod to the Windows key
  46.         , focusedBorderColor = myFocusedBorderColor
  47.         , borderWidth        = 2
  48.         , normalBorderColor  = myNormalBorderColor
  49.         , startupHook = do
  50.           setDefaultKeyRemap emptyKeyRemap [emptyKeyRemap, myKeyRemap]
  51.         } `additionalKeys`
  52.         [ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock; xset dpms force off")
  53.         , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
  54.         , ((0, xK_Print), spawn "scrot screen_%Y-%m-%d-%H-%M-%S.png -d 1")
  55.         , ((mod4Mask, xK_p), spawn "rofi -show run")
  56.         , ((0, 0x1008ff03), spawn "light -S $(echo $(light -G)/2|bc)")
  57.         , ((0, 0x1008ff02), spawn "light -S $(echo \"$(light -G)*2+0.1\"|bc)")
  58.         , ((0, 0x1008ff12), spawn "amixer -q set Master toggle")
  59.         , ((0, 0x1008ff11), spawn "amixer -q set Master 10%-")
  60.         , ((0, 0x1008ff13), spawn "amixer -q set Master 10%+")
  61.         ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top