Browse Source

mucking around with xmonad look & feel

exuberance
Brennen Bearnes 5 years ago
parent
commit
a0dd6f1e18
2 changed files with 72 additions and 11 deletions
  1. +71
    -10
      .xmonad/xmonad.hs
  2. +1
    -1
      bin/xmonad.start

+ 71
- 10
.xmonad/xmonad.hs View File

@ -1,21 +1,31 @@
-- Sources:
-- http://haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration
-- http://www.xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Doc-Configuring.html
-- http://hackage.haskell.org/packages/archive/xmonad-contrib/0.8.1/doc/html/XMonad-Doc-Extending.html
-- http://hackage.haskell.org/packages/archive/xmonad-contrib/0.8.1/doc/html/XMonad-Actions-CycleWS.html
-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-GridSelect.html
-- http://haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration
-- http://www.xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Doc-Configuring.html
-- http://hackage.haskell.org/packages/archive/xmonad-contrib/0.8.1/doc/html/XMonad-Doc-Extending.html
-- http://hackage.haskell.org/packages/archive/xmonad-contrib/0.8.1/doc/html/XMonad-Actions-CycleWS.html
-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-GridSelect.html
-- https://github.com/thcipriani/dotfiles/blob/master/xmonad/xmonad.hs
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers(isFullscreen, isDialog, doFullFloat, doCenterFloat)
import XMonad.Util.Run(spawnPipe) -- Need this guy for talking to xmobar
import XMonad.Util.Run(runInTerm) -- Need this guy for keybindings to external commands
import XMonad.Util.Run(unsafeSpawn) -- Need this guy for keybindings to external commands
import XMonad.Actions.CycleWS
import XMonad.Actions.GridSelect
import XMonad.Layout.Tabbed -- layouts
import XMonad.Layout.Tabbed
import XMonad.Layout.Accordion
import XMonad.Layout.NoBorders
import XMonad.Layout.Spacing
import XMonad.Layout.ResizableTile
import XMonad.Layout.ToggleLayouts
import System.IO
-- I think we do this because otherwise Data.Map.keys would overlap
@ -27,6 +37,20 @@ import qualified Data.Map as M
-- import XMonad.Prompt.Shell
-- import XMonad.Prompt.XMonad
-- Tomorrow Night Colors:
colorBackground = "#1d1f21"
colorCurrent = "#282a2e"
colorSelection = "#373b41"
colorForeground = "#c5c8c6"
colorComment = "#969896"
colorRed = "#cc6666"
colorOrange = "#de935f"
colorYellow = "#f0c674"
colorGreen = "#b5bd68"
colorAqua = "#8abeb7"
colorBlue = "#81a2be"
colorPurple = "#b294bb"
-- This is some crazy shit, man:
main = do
xmproc <- spawnPipe "xmobar"
@ -39,7 +63,7 @@ main = do
, keys = newKeys
, manageHook = manageDocks <+> myManageHook
<+> manageHook defaultConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
, layoutHook = myLayout
, logHook = dynamicLogWithPP $ xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
@ -62,7 +86,44 @@ myKeys x =
]
myManageHook = composeAll
[ className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "Nautilus" --> doFloat
[ className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "Nautilus" --> doFloat
, className =? "Svkbd" --> doFloat
, className =? "Google-chrome" --> doShift "web"
, className =? "Firefox" --> doShift "web"
, isFullscreen --> doFullFloat
]
myTabConfig = defaultTheme { inactiveBorderColor = colorBackground
, activeBorderColor = colorGreen
, activeColor = colorCurrent
, inactiveColor = colorBackground
, inactiveTextColor = colorComment
, activeTextColor = colorForeground
}
-- Originally this was just:
-- myLayout = avoidStruts $ layoutHook defaultConfig
-- ...stole thcipriani's version whole cloth to try out tabs.
myLayout = avoidStruts
$ toggleLayouts tiledSpace
$ smartBorders $ basicRotate
where
basicRotate = Full ||| tabbed shrinkText myTabConfig ||| fullTiled ||| Mirror fullTiled
-- tiled = spacing 5 $ ResizableTall nmaster delta ratio []
tiledSpace = spacing 60 $ ResizableTall nmaster delta ratio []
fullTiled = ResizableTall nmaster delta ratio []
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = toRational (2/(1 + sqrt 5 :: Double))
-- Percent of screen to increment by when resizing panes
delta = 5/100

+ 1
- 1
bin/xmonad.start View File

@ -12,7 +12,7 @@ xmodmap .xmodmap
trayer --SetDockType true --SetPartialStrut true --edge bottom --align right --widthtype percent --width 10 --height 18 &
# Set the background color
# xsetroot -solid midnightblue
xsetroot -solid midnightblue
# Fire up apps


Loading…
Cancel
Save