Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
780
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haskell 20.46 KB | None | 0 0
  1. import System.Exit
  2.  
  3. import XMonad.Actions.CycleWS
  4. import XMonad.Actions.NoBorders
  5.  
  6. import XMonad.Hooks.ManageDocks -- Toggle struts
  7. import XMonad.Hooks.DynamicLog  -- xmobar
  8. import XMonad.Hooks.SetWMName
  9. import XMonad.Hooks.ICCCMFocus  -- takeTopFocus
  10. import XMonad.Hooks.ManageHelpers
  11. --import XMonad.Hooks.EwmhDesktops -- Needed for rescuetime
  12.  
  13. import XMonad.Util.Themes
  14. import XMonad.Util.Run
  15.  
  16. import XMonad.Layout.SubLayouts -- Sublayout: pullGroup, MergeAll, UnMerge
  17. import XMonad.Layout.PerWorkspace
  18. import XMonad.Layout.TwoPane
  19. import XMonad.Layout.Combo
  20. import XMonad.Layout.Spiral
  21. import XMonad.Layout.IM
  22. import XMonad.Layout.Grid
  23. import XMonad.Layout.Reflect
  24. import XMonad.Layout.SimpleDecoration
  25. import XMonad.Layout.NoBorders
  26. import XMonad.Layout.ResizableTile
  27. import XMonad.Layout.Circle
  28. import XMonad.Layout.LayoutScreens
  29. import XMonad.Layout.WindowNavigation
  30. import XMonad.Layout.ThreeColumns
  31. import XMonad.Layout.Named
  32.  
  33. import XMonad hiding ( (|||) )  -- don't use the normal ||| operator
  34. import XMonad.Layout hiding ( (|||) )
  35. import XMonad.Layout.LayoutCombinators   -- use the one from LayoutCombinators instead
  36. import XMonad.Util.EZConfig  -- add keybindings easily
  37.  
  38. import Data.List -- for `isSuffixOf`
  39.  
  40. import qualified XMonad.StackSet as W
  41. import qualified Data.Map        as M
  42.  
  43.  
  44. ------------------------------------------------------------------------
  45. -- Window Placement
  46. --
  47.  
  48. --  xprop
  49. myManageHook :: [ManageHook]
  50. myManageHook =
  51.     [ resource  =? "Do"             --> doIgnore
  52.     , className =? "/usr/lib/gnome-do/Do.exe" --> doIgnore
  53.     , className =? "Synapse"        --> doIgnore
  54.     , isFullscreen                  --> doFullFloat
  55.     , className =? "Audacious"      --> doFloat
  56.     , className =? "Pandora"        --> doIgnore
  57.     , className =? "Evolution-alarm-notify" --> doFloat
  58.     , className =? "Xfce4-notifyd" --> doIgnore
  59.     , className =? "Galculator"     --> doFloat
  60.     , className =? "Gnome-panel"    --> doFloat
  61.     , className =? "Gnome-typing-monitor" --> doIgnore
  62.     , className =? "Ggl-gtk"        --> doFloat
  63.     , className =? "Gnome-display-properties" --> doFloat
  64.     , className =? "Gnome-appearance-properties" --> doFloat
  65.     , (className =? "Firefox" <&&> resource =? "Dialog") --> doFloat
  66.     , (className =? "Pidgin" <&&> role =? "log_viewer") --> doFloat
  67.     , (className =? "Pidgin" <&&> role =? "accounts") --> doFloat
  68.     , className =? "Update-manager" --> doFloat
  69.     , role =? "bubble"              --> doIgnore
  70.     , role =? "gimp-message-dialog" --> doFloat
  71.     , className =? "Ediff"          --> doFloat
  72.     , title     =? "Ediff"          --> doFloat
  73.     , className =? "knotes"         --> doFloat
  74.     , className =? "rdesktop"       --> doSideFloat SC
  75.     , resource  =? "desktop_window" --> doIgnore
  76.     , resource  =? "kdesktop"       --> doIgnore
  77.     , resource  =? "stalonetray"    --> doIgnore
  78.     , resource  =? "Kupfer.py"      --> doIgnore
  79.     , className =? "xine"           --> doFloat
  80.     , className =? "gksudo"         --> doFloat
  81.     , className =? "gksu"           --> doFloat
  82.     , className =? "Nm-connection-editor" --> doFloat
  83.     , className =? "Lxrandr"        --> doFloat
  84.     , className =? "Xfce4-display-settings" --> doFloat
  85.     , className =? "Wine"           --> doFloat
  86.     , className =? "Skype"          --> doFloat
  87.     , className =? "XCalc"          --> doFloat
  88.     , className =? "Gnome-calculator" --> doFloat
  89.     , className =? "Qasmixer"       --> doFloat
  90.     , className =? "Pavucontrol"    --> doFloat
  91.     , role      =? "pop-up"         --> doFloat
  92.     , className =? "Shutter"        --> doFloat
  93.     , title     =? "Print"          --> doFloat
  94.     , title     =? "Google+ Hangouts is sharing your screen with plus.google.com." --> doIgnore
  95.     , title     =? "LastPass"       --> doFloat
  96.     , title     =? "Confirm Navigation" --> doFloat
  97.     , className =? "Blueman-manager" --> doFloat
  98.     , title     =? "Task Manager - Google Chrome" --> doFloat
  99.     , title     =? "Google Hangouts is sharing a window with hangouts.google.com." --> doFloat
  100.     -- Scid
  101.     , title     =? "Scid: Header Search" --> doFloat
  102.     , title     =? "Variations"      --> doFloat
  103.  
  104.  
  105.  
  106.     -- Move windows to the right space.
  107.     -- web
  108.     , className =? "Google-chrome"  --> doShift "web"
  109.     , className =? "Google-chrome-beta" --> doShift "web"
  110.     , className =? "Chromium-browser" --> doShift "web"
  111.     , className =? "Opera"          --> doShift "web"
  112.     , className =? "Opera beta"     --> doShift "web"
  113.     , className =? "Navigator"      --> doShift "web"
  114.     , className =? "Pidgin"         --> doShift "web"
  115.     , className =? "Firefox"        --> doShift "web"
  116.     --, className =? "Iceweasel"      --> doShift "web"
  117.     , role      =? "music.google.com__music_listen" --> doShift "music"
  118.     , role      =? "www.pandora.com" --> doShift "music"
  119.     , role      =? "turntable.fm__4e1c691a14169c7aec00ae5f" --> doShift "music"
  120.     -- dev
  121.     , className =? "Eclipse"        --> doShift "dev"
  122.     , className =? "SpringSource Tool Suite" --> doShift "dev"
  123.     , className =? "xmind zen"      --> doShift "dev"
  124.     -- emacs
  125.     , className =? "Emacs"          --> doShift "emacs"
  126.     , className =? "Emacs24"        --> doShift "emacs"
  127.     -- music
  128.     , className =? "Spotify"        --> doShift "music"
  129.     -- gimp
  130.     , className =? "Gimp"           --> doShift "draw"
  131.     , (className =? "Gimp" <&&> fmap ("tool" `isSuffixOf`) role) --> doFloat
  132.     , role      =? "gimp-toolbox-color-dialog" --> doFloat
  133.     , role      =? "gimp-color-selection" --> doFloat
  134.     , title     =? "Cinelerra: Load" --> doFloat
  135.     -- Luminance
  136.     , className =? "Luminance-hdr"   --> doShift "draw"
  137.     -- Dia
  138.     , className =? "Dia"            --> doShift "draw"
  139.     -- Inkscape
  140.     , className =? "Inkscape"       --> doShift "draw"
  141.     -- msg
  142.     , className =? "Xchat"          --> doShift "msg"
  143.     , className =? "Smuxi-frontend-gnome" --> doShift "msg"
  144.     , className =? "HipChat"        --> doShift "msg"
  145.     , className =? "Scudcloud"      --> doShift "msg"
  146.     , className =? "Slack"          --> doShift "msg"
  147.     , className =? "Franz"          --> doShift "msg"
  148.     -- movies
  149.     --, className =? "vlc"            --> doShift "movies"
  150.     --, className =? "vlc"            --> doFloat
  151.     --, className =? "MPlayer"      --> doShift "movies"
  152.     --, className =? "gnome-mplayer" --> doShift "movies"
  153.     --, className =? "Totem"        --> doShift "movies"
  154.     --, className =? "Gxine"        --> doShift "movies"
  155.     -- IntelliJ
  156.     , className =? "jetbrains-idea-ce" --> doShift "dev"
  157.     , className =? "jetbrains-idea" --> doShift "dev"
  158.     , className =? "jetbrains-pycharm" --> doShift "dev"
  159.     , className =? "jetbrains-pycharm-ce" --> doShift "dev"
  160.     , className =? "jetbrains-studio" --> doShift "dev"
  161.     , className =? "TeamViewer.exe" --> doShift "dev"
  162.     ]
  163.     where role = stringProperty "WM_WINDOW_ROLE"
  164.           unfloat = ask >>= doF . W.sink
  165.  
  166. ------------------------------------------------------------------------
  167. -- Colors
  168. --
  169. myActiveTitleColor    = "#D68B00"  -- Orange (lt)
  170. myInactiveTitleColor  = "#282828"  -- Dark grey
  171. --myActiveBorderColor   = "#EE9A00"  -- Orange
  172. myActiveBorderColor   = "#FF6600"  -- Dark orange
  173. myInactiveBorderColor = "#323232"  -- Dark grey
  174. myActiveTextColor     = "black"
  175. myInactiveTextColor   = "grey"
  176. myXmobarColor         = "#A8FC46"
  177.  
  178. ------------------------------------------------------------------------
  179. -- Window Title
  180. --
  181. newTheme :: ThemeInfo
  182. newTheme = TI "" "" "" defaultTheme
  183. myTheme :: ThemeInfo
  184. myTheme =
  185.     newTheme { themeName        = "myTheme"
  186.              , themeAuthor      = "Ones Self"
  187.              , themeDescription = "My Theme"
  188.              , theme            = defaultTheme { activeColor         = myActiveTitleColor
  189.                                                , inactiveColor       = myInactiveTitleColor
  190.                                                , activeBorderColor   = myActiveBorderColor
  191.                                                , inactiveBorderColor = myInactiveBorderColor
  192.                                                , activeTextColor     = myActiveTextColor
  193.                                                , inactiveTextColor   = myInactiveTextColor
  194.                                                --, fontName            = "-*-lucidatypewriter-bold-*-*-*-12-*-*-*-*-*-*-*"
  195.                                                , fontName            = "-*-consolas-bold-*-*-*-12-*-*-*-*-*-*-*"
  196.                                                , decoHeight          = 12
  197.                                                , decoWidth           = 3000
  198.                                                }
  199.              }
  200.  
  201. ------------------------------------------------------------------------
  202. -- Layout
  203. --
  204. myLayout = named "three" (three) ||| named "tiled" tiled ||| mtiled ||| vtiled ||| Grid ||| Full
  205.   where
  206.     -- default tiling algorithm partitions the screen into two panes
  207.     tiled  = withIM (12/100) (ClassName "Pidgin") $ withIM (13/100) (ClassName "Pidgin") $ withIM (14/100) (ClassName "Pidgin") $ Tall nmaster delta ratio
  208.     mtiled = withIM (12/100) (ClassName "Pidgin") $ withIM (13/100) (ClassName "Pidgin") $ withIM (14/100) (ClassName "Pidgin") $ reflectHoriz $ Tall nmaster delta ratio
  209.     vtiled = withIM (12/100) (ClassName "Pidgin") $ withIM (13/100) (ClassName "Pidgin") $ withIM (14/100) (ClassName "Pidgin") $ Mirror $ Tall nmaster delta ratio
  210.     three  = ThreeColMid 1 (3/100) (1/3)
  211.  
  212.     -- The default number of windows in the master pane
  213.     nmaster  = 1
  214.     -- Percent of screen to increment by when resizing panes
  215.     delta    = 3/100
  216.     -- Default proportion of screen occupied by master pane
  217.     ratio    = 1/2
  218.  
  219. ------------------------------------------------------------------------
  220. -- Key bindings
  221. --
  222.  
  223. -- Used to flip the right and left workspaces in a mutihead display.
  224. withOtherWorkspace f ws = f (otherWorkspace ws) ws
  225.   where
  226.     otherWorkspace = W.tag . W.workspace . head . W.visible
  227.  
  228. myKeys :: XConfig Layout -> M.Map (KeyMask, KeySym) (X ())
  229. myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
  230.     -- launch a terminal
  231.     [ ((modMask .|. controlMask, xK_Return), spawn $ XMonad.terminal conf)
  232.     , ((modMask .|. shiftMask, xK_Return),   spawn "$HOME/bin/cool-retro-term")
  233.  
  234.     -- Launch dmenu
  235.     --, ((0,                     xK_F3    ), spawn "exec `dmenu_path | dmenu -i -b -nb black -nf grey -sb '#444' -sf '#EE9A00'`")
  236.     --, ((0,                     xK_F3    ), spawn "dmenu-do")
  237.     --, ((0,                     xK_F3    ), spawn "bash -c 'dmenu_do -i -b -fn Consolas-10:bold -nb black -nf grey -sb \"#444\" -sf \"#EE9A00\"'")
  238.     , ((0,                     xK_F3    ), spawn "dmenu_do -i -b -fn 'Consolas-10:bold' -nb black -nf grey -sb '#444' -sf '#EE9A00'")
  239.  
  240.     -- close focused window
  241.     , ((modMask,               xK_F4    ), kill)
  242.     , ((modMask,               xK_r     ), kill)
  243.  
  244.      -- Rotate through the available layout algorithms
  245.     , ((modMask,               xK_l     ), sendMessage NextLayout)
  246.  
  247.     -- Show layout name
  248.     -- #, ((modMask,               xK_a     ), sendMessage NextLayout >> (curLayout >>= \d->spawn $"xmessage "++d))
  249.  
  250.     -- Reset the layouts on the current workspace to default
  251.     , ((modMask,               xK_h     ), setLayout $ XMonad.layoutHook conf)
  252.  
  253.     -- Set explicit layout keys (get names from M-a pop-up)
  254.     , ((controlMask,           xK_1     ), sendMessage $ JumpToLayout "tiled")
  255.     , ((controlMask,           xK_2     ), sendMessage $ JumpToLayout "three")
  256.     , ((controlMask,           xK_3     ), sendMessage $ JumpToLayout "Full")
  257.     , ((controlMask,           xK_4     ), sendMessage $ JumpToLayout "Grid")
  258.  
  259.  
  260.     -- Float window across screen
  261.     --, ((modMask .|. shiftMask, xK_f), layoutScreens 1 (fixedLayout [Rectangle 0 0 3760 1600]))
  262.     --, ((modMask .|. controlMask, xK_f), rescreen)
  263.  
  264.     -- Move focus to the next window
  265.     , ((modMask,               xK_k     ), windows W.focusDown)
  266.  
  267.     -- Move focus to the previous window
  268.     , ((modMask,               xK_j     ), windows W.focusUp)
  269.  
  270.     -- Move focus to the master window
  271.     , ((modMask,               xK_m     ), windows W.focusMaster)
  272.  
  273.     -- Swap the focused window and the master window
  274.     , ((controlMask .|. shiftMask, xK_m ), windows W.swapMaster)
  275.  
  276.     -- Swap the focused window with the next window
  277.     , ((controlMask .|. shiftMask, xK_k ), windows W.swapDown)
  278.  
  279.     -- Swap the focused window with the previous window
  280.     , ((controlMask .|. shiftMask, xK_j ), windows W.swapUp)
  281.  
  282.     -- Shrink the master area
  283.     , ((controlMask .|. shiftMask, xK_h ), sendMessage Shrink)
  284.  
  285.     -- Expand the master area
  286.     , ((controlMask .|. shiftMask, xK_l ), sendMessage Expand)
  287.  
  288.     -- Push window back into tiling
  289.     , ((modMask .|. shiftMask,     xK_t ), withFocused $ windows . W.sink)
  290.  
  291.     -- Increment the number of windows in the master area
  292.     --, ((controlMask .|. shiftMask, xK_comma), sendMessage (IncMasterN 1))
  293.  
  294.     -- Deincrement the number of windows in the master area
  295.     --, ((controlMask .|. shiftMask, xK_period), sendMessage (IncMasterN (-1)))
  296.  
  297.     -- Move windows in sub tabbed layout
  298.     , ((modMask .|. controlMask, xK_h   ), sendMessage $ pullGroup L)
  299.     , ((modMask .|. controlMask, xK_l   ), sendMessage $ pullGroup R)
  300.     , ((modMask .|. controlMask, xK_k   ), sendMessage $ pullGroup U)
  301.     , ((modMask .|. controlMask, xK_j   ), sendMessage $ pullGroup D)
  302.  
  303.     , ((modMask .|. controlMask, xK_m   ), withFocused (sendMessage . MergeAll))
  304.     , ((modMask .|. controlMask, xK_u   ), withFocused (sendMessage . UnMerge))
  305.  
  306.     , ((modMask .|. controlMask, xK_period), onGroup W.focusUp')
  307.    , ((modMask .|. controlMask, xK_comma), onGroup W.focusDown')
  308.  
  309.     -- Move focus to the next workspaces
  310.     , ((modMask,               xK_0     ), nextWS)
  311.  
  312.     -- Move focus to the previous workspaces
  313.     , ((modMask,               xK_9     ), prevWS)
  314.  
  315.     -- Flip the right and left workspaces in a mutihead display (focus
  316.     -- moves with window).
  317.     , ((controlMask .|. shiftMask, xK_minus), windows (withOtherWorkspace W.view . withOtherWorkspace W.greedyView))
  318.     -- Flip the right and left workspaces in a mutihead display (focus
  319.     -- stays on workspace)
  320.     , ((modMask,               xK_minus ), nextScreen)
  321.     --, ((controlMask,           xK_minus ), nextScreen)
  322.     , ((modMask .|. shiftMask, xK_minus ), shiftNextScreen)
  323.  
  324.     -- toggle the status bar gap
  325.     --, ((controlMask .|. shiftMask, xK_b ), sendMessage ToggleStruts)
  326.  
  327.     -- Toggle borders
  328.     , ((modMask .|. shiftMask, xK_b     ), withFocused toggleBorder)
  329.  
  330.     -- Quit xmonad
  331.     --, ((controlMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
  332.  
  333.     -- Restart xmonad
  334.     , ((modMask .|. shiftMask, xK_q     ), spawn "xmonad --recompile; xmonad --restart")
  335.  
  336.     -- Shutdown
  337.     --, ((modMask .|. controlMask, xK_q   ), spawn "shutdown")
  338.  
  339.     -- Suspend
  340.     , ((modMask .|. controlMask, xK_q   ), spawn "sudo pm-suspend")
  341.  
  342.     -- Resize viewed windows to the correct size
  343.     , ((controlMask .|. shiftMask, xK_r ), refresh)
  344.  
  345.     -- Autodetect screen
  346.     , ((modMask .|. shiftMask, xK_d     ), spawn "$HOME/bin/autodetect")
  347.  
  348.     -- Show display configuration app
  349.     , ((modMask .|. controlMask, xK_d   ), spawn "lxrandr")
  350.  
  351.     -- Show volume control app
  352.     , ((modMask .|. shiftMask, xK_v     ), spawn "pavucontrol")
  353.  
  354.     -- Move xmobar to other monitor
  355.     , ((controlMask .|. shiftMask, xK_d ), spawn "killall -s SIGUSR1 xmobar")
  356.  
  357.     -- Activate screensaver
  358.     --, ((modMask .|. controlMask, xK_i   ), spawn "gnome-screensaver-command --lock")
  359.     , ((modMask .|. controlMask, xK_i   ), spawn "xscreensaver-command -lock")
  360.     --, ((modMask .|. controlMask, xK_i   ), spawn "$HOME/bin/blank-screen")
  361.  
  362.     -- Screenshot
  363.     --, ((0,                      xK_Print), spawn "scrot -uz") -- active window
  364.     --, ((controlMask .|. shiftMask, xK_Print), spawn "scrot -z") -- entire workspace
  365.     --, ((controlMask,            xK_Print), spawn "sleep 0.2; scrot -sz") -- sleep first
  366.  
  367.     , ((0,                      xK_Print), spawn "shutter") -- dialog
  368.     , ((controlMask .|. shiftMask, xK_Print), spawn "shutter -f") -- entire workspace
  369.     , ((controlMask,            xK_Print), spawn "sleep 0.2; shutter -a") -- active window; sleep first
  370.  
  371.     -- Aqualung
  372.     --, ((modMask .|. controlMask, xK_p   ), spawn "aqualung -U")
  373.     --, ((modMask .|. controlMask, xK_n   ), spawn "aqualung -F")
  374.  
  375.     -- Multimedia keys
  376.     -- XF86AudioLowerVolume
  377.     , ((0,                       0x1008ff11), spawn "amixer -q sset Master 5%-")
  378.     , ((modMask,                 xK_F10 ),    spawn "amixer -q sset Master 5%-")
  379.     -- XF86AudioRaiseVolume
  380.     , ((0,                       0x1008ff13), spawn "amixer -q sset Master 5%+")
  381.     , ((modMask,                 xK_F11 ),    spawn "amixer -q sset Master 5%+")
  382.     -- XF86AudioMute
  383.     --, ((0,                       0x1008ff12), spawn "amixer -q sset Master toggle")
  384.     --, ((controlMask,             xK_F9 ),     spawn "amixer -q sset Master toggle")
  385.     -- XF86Launch1
  386.     --, ((0,                       0x1008ff41), spawn "amixer -q sset Master 0%")
  387.  
  388.     -- Monitor brightness (dim display)
  389.     , ((controlMask,             xK_F10 ),    spawn "xbacklight -dec 10")
  390.     , ((controlMask,             xK_F11 ),    spawn "xbacklight -inc 10")
  391.     ]
  392.  
  393.     ++
  394.     --
  395.     -- mod-[1..9], Switch to workspace N
  396.     -- mod-shift-[1..9], Move client to workspace N
  397.     --
  398.     --[((m .|. modMask, k), windows $ f i)
  399.     --    | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_8]
  400.     --    , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
  401.  
  402.     [((m .|. modMask, k), windows $ f i)
  403.         | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_8]
  404.         , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
  405.  
  406.     -- ++
  407.     --
  408.     -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
  409.     -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
  410.     --
  411.     --[((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
  412.     --    | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
  413.     --    , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
  414.     --[((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
  415.     --    | (key, sc) <- zip [xK_u, xK_i] [0..]
  416.     --    , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
  417.  
  418. ------------------------------------------------------------------------
  419. -- Mouse bindings: default actions bound to mouse events
  420. --
  421. myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
  422.  
  423.     -- mod-button1, Set the window to floating mode and move by dragging
  424.     [ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w))
  425.  
  426.     -- mod-button2, Raise the window to the top of the stack
  427.     , ((modMask, button2), (\w -> focus w >> windows W.swapMaster))
  428.  
  429.     -- mod-button3, Set the window to floating mode and resize by dragging
  430.     , ((modMask, button3), (\w -> focus w >> mouseResizeWindow w))
  431.     , ((modMask .|. shiftMask, button1), (\w -> focus w >> mouseResizeWindow w))
  432.  
  433.     -- you may also bind events to the mouse scroll wheel (button4 and button5)
  434.     ]
  435.  
  436. ------------------------------------------------------------------------
  437. -- Xmobar
  438. --
  439.  
  440. -- Command to launch the bar.
  441. myBar = "xmobar"
  442.  
  443. -- Custom PP, configure it as you like. It determines what is being written to the bar.
  444. myPP = xmobarPP { ppTitle = xmobarColor myXmobarColor "" . shorten 50
  445.                 , ppOrder = \(ws:_:t:_) -> [ws, t]
  446.                 }
  447.  
  448. -- Key binding to toggle the gap for the bar.
  449. toggleStrutsKey XConfig {XMonad.modMask = modMask} = (controlMask .|. shiftMask, xK_b)
  450.  
  451. -- Main configuration, override the defaults to your liking.
  452. myConfig = defaultConfig
  453.         { modMask            = mod1Mask
  454.         , keys               = myKeys
  455.         --, mouseBindings      = myMouseBindings
  456.         , manageHook         = manageDocks <+> composeAll myManageHook
  457.         , startupHook        = takeTopFocus >> setWMName "LG3D"
  458.         , layoutHook         = myLayout
  459.         , terminal           = "rxvt-unicode -e $HOME/etc/tmux/init"
  460.         , workspaces         = ["web", "emacs", "dev", "music", "msg", "draw", "log", "movies"]
  461.         , focusedBorderColor = myActiveBorderColor
  462.         , normalBorderColor  = myInactiveBorderColor
  463.         , borderWidth        = 3
  464.         }
  465.  
  466. ------------------------------------------------------------------------
  467. -- main
  468. --
  469. main = xmonad =<< statusBar myBar myPP toggleStrutsKey myConfig
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement