Browse Source

xmonad.hs cleanup

exuberance
Brennen Bearnes 5 years ago
parent
commit
87d3e144ef
1 changed files with 28 additions and 20 deletions
  1. +28
    -20
      .xmonad/xmonad.hs

+ 28
- 20
.xmonad/xmonad.hs View File

@ -1,13 +1,22 @@
-- This is my xmonad configuration. Take it as read that I do not know what I
-- am doing in this file. It is pure magpie behavior with little underlying
-- logic. I do not know Haskell.
-- Sources:
-- Tyler Cipriani's setup: https://github.com/thcipriani/dotfiles/blob/master/xmonad/xmonad.hs
-- Things I have bookmarked: https://pinboard.in/search/u:brennen?query=xmonad
-- 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 qualified XMonad.StackSet as W -- used by the scratchpad stuff below
-- I think we do this because otherwise Data.Map.keys would overlap
-- with XMonad.keys:
import qualified Data.Map as M
import System.IO
import qualified XMonad.StackSet as W -- used by the scratchpad stuff below
import XMonad
import XMonad.Actions.CycleWS
import XMonad.Actions.GridSelect
@ -21,17 +30,13 @@ import XMonad.Layout.ResizableTile
import XMonad.Layout.Spacing
import XMonad.Layout.Tabbed
import XMonad.Layout.ToggleLayouts
import XMonad.Util.EZConfig(additionalKeys) -- easier keybindings, not in use here yet
import XMonad.Util.EZConfig(additionalKeys) -- Easier keybindings, not in use here yet
import XMonad.Util.NamedScratchpad
import XMonad.Util.NamedWindows
import XMonad.Util.Run(runInTerm) -- Need this guy for keybindings to external commands
import XMonad.Util.Run(spawnPipe) -- Need this guy for talking to xmobar
import XMonad.Util.Run(unsafeSpawn) -- Need this guy for keybindings to external commands
-- I think we do this because otherwise Data.Map.keys would overlap
-- with XMonad.keys:
import qualified Data.Map as M
-- Tomorrow Night Colors:
colorBackground = "#1d1f21"
colorCurrent = "#282a2e"
@ -48,6 +53,9 @@ colorPurple = "#b294bb"
-- A breakdown of desired workspaces:
-- [NSP] - named scratchpads; created implicitly by namedScratchpad stuff
-- - one gnome-terminal
-- - one gnome-terminal with a tmux containing a vim with notes
-- top - for monitoring, logs, and remote shells
-- mail - originally for thunderbird, now a rarely-used spare
-- irc - chat clients (weechat, hipchat, slack, signal, etc.)
@ -56,10 +64,6 @@ colorPurple = "#b294bb"
-- org - a vim with notes file and such
-- media - photos, graphics work, video, file managers, etc.
-- scratchpads:
-- one for a terminal
-- one for a vim with notes
-- This is some crazy shit, man:
main = do
xmproc <- spawnPipe "xmobar"
@ -110,21 +114,25 @@ myManageHook = composeAll
, namedScratchpadManageHook scratchpads
]
-- Named scratchpads - a terminal and a tmux session for editing notes in:
-- Named scratchpads - a terminal and a tmux session for editing notes in. I
-- use gnome-terminal with a role for both of these instead of uxterm with a
-- title, because title gets changed by running stuff inside of xterms, seemingly
-- no matter how things are configured. See also /bin/notesession.
scratchpads =
[ NS "scratch" "uxterm -title scratch" (title =? "scratch")
[ NS "scratch" "gnome-terminal --role scratch" (role =? "scratch")
(customFloating $ W.RationalRect 0.1 0.1 0.7 0.7)
, NS "notes" "gnome-terminal --role=notesession -e notesession" (role =? "notesession")
(customFloating $ W.RationalRect 0.05 0.05 0.9 0.9)
] where role = stringProperty "WM_WINDOW_ROLE"
myTabConfig = defaultTheme { inactiveBorderColor = colorBackground
, activeBorderColor = colorGreen
, activeColor = colorCurrent
, inactiveColor = colorBackground
, inactiveTextColor = colorComment
, activeTextColor = colorForeground
}
myTabConfig = defaultTheme
{ inactiveBorderColor = colorBackground
, activeBorderColor = colorGreen
, activeColor = colorCurrent
, inactiveColor = colorBackground
, inactiveTextColor = colorComment
, activeTextColor = colorForeground
}
-- Originally this was just:
-- myLayout = avoidStruts $ layoutHook defaultConfig


Loading…
Cancel
Save