Minor edits.

This commit is contained in:
Derek Taylor
2020-06-06 18:40:47 -05:00
parent 09d7f63c4f
commit 271fd84de3
4 changed files with 103 additions and 73 deletions

View File

@@ -199,5 +199,8 @@ fi
### FORCE ALL KAKOUNE WINDOWS TO BE IN ONE SESSION ### FORCE ALL KAKOUNE WINDOWS TO BE IN ONE SESSION
alias kak="kak -c mysession" alias kak="kak -c mysession"
### CLEAR THE TERMINAL
# alias clear='[ $[$RANDOM % 10] = 0 ] && cd /home/dt/vt100 && ./slowcat.pl $(/bin/ls | grep .vt | shuf -n 1) || clear'
### RANDOM COLOR SCRIPT ### ### RANDOM COLOR SCRIPT ###
/opt/shell-color-scripts/colorscript.sh random /opt/shell-color-scripts/colorscript.sh random

View File

@@ -13,36 +13,35 @@ filetype off " required
" => Vundle For Managing Plugins " => Vundle For Managing Plugins
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" set the runtime path to include Vundle and initialize call plug#begin('~/.vim/plugged')
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin() " required, all plugins must appear after this line.
"{{ The Basics }} "{{ The Basics }}
Plugin 'gmarik/Vundle.vim' " Vundle Plug 'gmarik/Vundle.vim' " Vundle
Plugin 'itchyny/lightline.vim' " Lightline statusbar Plug 'itchyny/lightline.vim' " Lightline statusbar
Plugin 'suan/vim-instant-markdown', {'rtp': 'after'} " Markdown Preview Plug 'suan/vim-instant-markdown', {'rtp': 'after'} " Markdown Preview
Plugin 'frazrepo/vim-rainbow' Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'frazrepo/vim-rainbow'
"{{ File management }} "{{ File management }}
Plugin 'vifm/vifm.vim' " Vifm Plug 'vifm/vifm.vim' " Vifm
Plugin 'scrooloose/nerdtree' " Nerdtree Plug 'scrooloose/nerdtree' " Nerdtree
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight' " Highlighting Nerdtree Plug 'tiagofumo/vim-nerdtree-syntax-highlight' " Highlighting Nerdtree
Plugin 'ryanoasis/vim-devicons' " Icons for Nerdtree Plug 'ryanoasis/vim-devicons' " Icons for Nerdtree
"{{ Productivity }} "{{ Productivity }}
Plugin 'vimwiki/vimwiki' " VimWiki Plug 'vimwiki/vimwiki' " VimWiki
Plugin 'jreybert/vimagit' " Magit-like plugin for vim Plug 'jreybert/vimagit' " Magit-like plugin for vim
"{{ Tim Pope Plugins }} "{{ Tim Pope Plugins }}
Plugin 'tpope/vim-surround' " Change surrounding marks Plug 'tpope/vim-surround' " Change surrounding marks
"{{ Syntax Highlighting and Colors }} "{{ Syntax Highlighting and Colors }}
Plugin 'PotatoesMaster/i3-vim-syntax' " i3 config highlighting Plug 'PotatoesMaster/i3-vim-syntax' " i3 config highlighting
Plugin 'kovetskiy/sxhkd-vim' " sxhkd highlighting Plug 'kovetskiy/sxhkd-vim' " sxhkd highlighting
Plugin 'vim-python/python-syntax' " Python highlighting Plug 'vim-python/python-syntax' " Python highlighting
Plugin 'ap/vim-css-color' " Color previews for CSS Plug 'ap/vim-css-color' " Color previews for CSS
"{{ Junegunn Choi Plugins }} "{{ Junegunn Choi Plugins }}
Plugin 'junegunn/goyo.vim' " Distraction-free viewing Plug 'junegunn/goyo.vim' " Distraction-free viewing
Plugin 'junegunn/limelight.vim' " Hyperfocus on a range Plug 'junegunn/limelight.vim' " Hyperfocus on a range
Plugin 'junegunn/vim-emoji' " Vim needs emojis! Plug 'junegunn/vim-emoji' " Vim needs emojis!
call vundle#end() " required, all plugins must appear before this line. call plug#end()
filetype plugin indent on " required filetype plugin indent on " required
" To ignore plugin indent changes, instead use: " To ignore plugin indent changes, instead use:

View File

@@ -20,6 +20,9 @@
;; Setting the neotree width to be adjustable. ;; Setting the neotree width to be adjustable.
(setq neo-window-fixed-size nil) (setq neo-window-fixed-size nil)
;; Sets binding to toggle line wrap on/off.
(global-set-key "\C-x\ t" 'toggle-truncate-lines)
;; Sets transparency for focuses and unfocused frames. ;; Sets transparency for focuses and unfocused frames.
;; (set-frame-parameter (selected-frame) 'alpha '(95 . 80)) ;; (set-frame-parameter (selected-frame) 'alpha '(95 . 80))
;; (add-to-list 'default-frame-alist '(alpha . (95 . 80))) ;; (add-to-list 'default-frame-alist '(alpha . (95 . 80)))

View File

@@ -8,7 +8,6 @@
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Base -- Base
import XMonad import XMonad
import XMonad.Config.Desktop
import System.IO (hPutStrLn) import System.IO (hPutStrLn)
import System.Exit (exitSuccess) import System.Exit (exitSuccess)
import qualified XMonad.StackSet as W import qualified XMonad.StackSet as W
@@ -38,8 +37,9 @@ import XMonad.Util.SpawnOnce
-- Hooks -- Hooks
import XMonad.Hooks.DynamicLog (dynamicLogWithPP, wrap, xmobarPP, xmobarColor, shorten, PP(..)) import XMonad.Hooks.DynamicLog (dynamicLogWithPP, wrap, xmobarPP, xmobarColor, shorten, PP(..))
import XMonad.Hooks.ManageDocks (avoidStruts, manageDocks, ToggleStruts(..)) import XMonad.Hooks.ManageDocks (avoidStruts, docksEventHook, manageDocks, ToggleStruts(..))
import XMonad.Hooks.ManageHelpers (isFullscreen, doFullFloat) import XMonad.Hooks.ManageHelpers (isFullscreen, doFullFloat)
import XMonad.Hooks.ServerMode
import XMonad.Hooks.SetWMName import XMonad.Hooks.SetWMName
import XMonad.Hooks.EwmhDesktops -- for some fullscreen events, also for xcomposite in obs. import XMonad.Hooks.EwmhDesktops -- for some fullscreen events, also for xcomposite in obs.
@@ -54,6 +54,7 @@ import XMonad.Actions.GridSelect
import XMonad.Actions.MouseResize import XMonad.Actions.MouseResize
-- Layouts modifiers -- Layouts modifiers
import XMonad.Layout.Decoration
import XMonad.Layout.LayoutModifier import XMonad.Layout.LayoutModifier
import XMonad.Layout.LimitWindows (limitWindows, increaseLimit, decreaseLimit) import XMonad.Layout.LimitWindows (limitWindows, increaseLimit, decreaseLimit)
import XMonad.Layout.MultiToggle (mkToggle, single, EOT(EOT), Toggle(..), (??)) import XMonad.Layout.MultiToggle (mkToggle, single, EOT(EOT), Toggle(..), (??))
@@ -62,17 +63,17 @@ import XMonad.Layout.NoBorders
import XMonad.Layout.Reflect (REFLECTX(..), REFLECTY(..)) import XMonad.Layout.Reflect (REFLECTX(..), REFLECTY(..))
import XMonad.Layout.Renamed (renamed, Rename(Replace)) import XMonad.Layout.Renamed (renamed, Rename(Replace))
import XMonad.Layout.Spacing import XMonad.Layout.Spacing
import XMonad.Layout.Tabbed
import XMonad.Layout.WindowArranger (windowArrange, WindowArrangerMsg(..)) import XMonad.Layout.WindowArranger (windowArrange, WindowArrangerMsg(..))
import qualified XMonad.Layout.ToggleLayouts as T (toggleLayouts, ToggleLayout(Toggle)) import qualified XMonad.Layout.ToggleLayouts as T (toggleLayouts, ToggleLayout(Toggle))
-- Layouts -- Layouts
import XMonad.Layout.GridVariants (Grid(Grid)) import XMonad.Layout.GridVariants (Grid(Grid))
import XMonad.Layout.OneBig
import XMonad.Layout.SimplestFloat import XMonad.Layout.SimplestFloat
import XMonad.Layout.Spiral import XMonad.Layout.Spiral
import XMonad.Layout.ResizableTile import XMonad.Layout.ResizableTile
import XMonad.Layout.ThreeColumns import XMonad.Layout.ThreeColumns
import XMonad.Layout.ZoomRow (zoomRow, zoomReset, ZoomMessage(ZoomFullToggle)) import XMonad.Layout.ZoomRow (zoomReset, ZoomMessage(ZoomFullToggle))
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- VARIABLES -- VARIABLES
@@ -136,6 +137,7 @@ mygridConfig colorizer = (buildDefaultGSConfig myColorizer)
, gs_originFractY = 0.5 , gs_originFractY = 0.5
, gs_font = myFont , gs_font = myFont
} }
spawnSelected' :: [(String, String)] -> X () spawnSelected' :: [(String, String)] -> X ()
spawnSelected' lst = gridselect conf lst >>= flip whenJust spawn spawnSelected' lst = gridselect conf lst >>= flip whenJust spawn
where conf = def where conf = def
@@ -201,17 +203,22 @@ dtXPConfig = def
, historySize = 256 , historySize = 256
, historyFilter = id , historyFilter = id
, defaultText = [] , defaultText = []
, autoComplete = Just 100000 -- set Just 100000 for .1 sec , autoComplete = Just 100000 -- set Just 100000 for .1 sec
, showCompletionOnTab = False , showCompletionOnTab = False
, searchPredicate = isPrefixOf , searchPredicate = isPrefixOf
, alwaysHighlight = True , alwaysHighlight = True
, maxComplRows = Nothing -- set to Just 5 for 5 rows , maxComplRows = Nothing -- set to Just 5 for 5 rows
} }
------------------------------------------------------------------------
-- CALCPROMPT requires qalculate-gtk to be installed
------------------------------------------------------------------------
-- You could use this as a template for other custom prompts that
-- use command line programs that return a single line of output.
calcPrompt :: XPConfig -> String -> X () calcPrompt :: XPConfig -> String -> X ()
calcPrompt c ans = calcPrompt c ans =
inputPrompt c (trim ans) ?+ \input -> inputPrompt c (trim ans) ?+ \input ->
liftIO(runProcessWithInput "qalc" [input] "") >>= calcPrompt c liftIO(runProcessWithInput "whereis" [input] "") >>= calcPrompt c
where where
trim = f . f trim = f . f
where f = reverse . dropWhile isSpace where f = reverse . dropWhile isSpace
@@ -240,11 +247,12 @@ myKeys =
-- Windows -- Windows
, ("M-S-c", kill1) -- Kill the currently focused client , ("M-S-c", kill1) -- Kill the currently focused client
, ("M-S-a", killAll) -- Kill all the windows on current workspace , ("M-S-a", killAll) -- Kill all windows on current workspace
-- Floating windows -- Floating windows
, ("M-<Delete>", withFocused $ windows . W.sink) -- Push floating window back to tile. , ("M-f", sendMessage (T.Toggle "floats")) -- Toggles my 'floats' layout
, ("M-S-<Delete>", sinkAll) -- Push ALL floating windows back to tile. , ("M-<Delete>", withFocused $ windows . W.sink) -- Push floating window back to tile
, ("M-S-<Delete>", sinkAll) -- Push ALL floating windows to tile
-- Grid Select -- Grid Select
, (("M-S-t"), spawnSelected' , (("M-S-t"), spawnSelected'
@@ -262,22 +270,22 @@ myKeys =
, ("PCManFM", "pcmanfm") , ("PCManFM", "pcmanfm")
, ("Simple Terminal", "st") , ("Simple Terminal", "st")
, ("Steam", "steam") , ("Steam", "steam")
, ("Surf Browser", "surf suckless.org") , ("Surf Browser", "surf suckless.org")
, ("Xonotic", "xonotic-glx") , ("Xonotic", "xonotic-glx")
]) ])
, ("M-S-g", goToSelected $ mygridConfig myColorizer) -- goto selected , ("M-S-g", goToSelected $ mygridConfig myColorizer) -- goto selected
, ("M-S-b", bringSelected $ mygridConfig myColorizer) -- bring selected , ("M-S-b", bringSelected $ mygridConfig myColorizer) -- bring selected
-- Windows navigation -- Windows navigation
, ("M-m", windows W.focusMaster) -- Move focus to the master window , ("M-m", windows W.focusMaster) -- Move focus to the master window
, ("M-j", windows W.focusDown) -- Move focus to the next window , ("M-j", windows W.focusDown) -- Move focus to the next window
, ("M-k", windows W.focusUp) -- Move focus to the prev window , ("M-k", windows W.focusUp) -- Move focus to the prev window
--, ("M-S-m", windows W.swapMaster) -- Swap the focused window and the master window --, ("M-S-m", windows W.swapMaster) -- Swap the focused window and the master window
, ("M-S-j", windows W.swapDown) -- Swap the focused window with the next window , ("M-S-j", windows W.swapDown) -- Swap focused window with next window
, ("M-S-k", windows W.swapUp) -- Swap the focused window with the prev window , ("M-S-k", windows W.swapUp) -- Swap focused window with prev window
, ("M-<Backspace>", promote) -- Moves focused window to master, all others maintain order , ("M-<Backspace>", promote) -- Moves focused window to master, others maintain order
, ("M1-S-<Tab>", rotSlavesDown) -- Rotate all windows except master and keep focus in place , ("M1-S-<Tab>", rotSlavesDown) -- Rotate all windows except master and keep focus in place
, ("M1-C-<Tab>", rotAllDown) -- Rotate all the windows in the current stack , ("M1-C-<Tab>", rotAllDown) -- Rotate all the windows in the current stack
--, ("M-S-s", windows copyToAll) --, ("M-S-s", windows copyToAll)
, ("M-C-s", killAllOtherCopies) , ("M-C-s", killAllOtherCopies)
@@ -297,18 +305,17 @@ myKeys =
, ("M-C-<Left>", sendMessage (DecreaseLeft 10)) -- Decrease size of focused window left , ("M-C-<Left>", sendMessage (DecreaseLeft 10)) -- Decrease size of focused window left
-- Layouts -- Layouts
, ("M-<Tab>", sendMessage NextLayout) -- Switch to next layout , ("M-<Tab>", sendMessage NextLayout) -- Switch to next layout
, ("M-S-<Space>", sendMessage ToggleStruts) -- Toggles struts , ("M-<Space>", sendMessage (Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full
, ("M-S-n", sendMessage $ Toggle NOBORDERS) -- Toggles noborder , ("M-S-<Space>", sendMessage ToggleStruts) -- Toggles struts
, ("M-S-=", sendMessage (Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full , ("M-S-n", sendMessage $ Toggle NOBORDERS) -- Toggles noborder
, ("M-S-f", sendMessage (T.Toggle "float"))
, ("M-S-x", sendMessage $ Toggle REFLECTX) , ("M-S-x", sendMessage $ Toggle REFLECTX)
, ("M-S-y", sendMessage $ Toggle REFLECTY) , ("M-S-y", sendMessage $ Toggle REFLECTY)
--, ("M-S-m", sendMessage $ Toggle MIRROR) --, ("M-S-m", sendMessage $ Toggle MIRROR)
, ("M-<KP_Multiply>", sendMessage (IncMasterN 1)) -- Increase number of clients in the master pane , ("M-<KP_Multiply>", sendMessage (IncMasterN 1)) -- Increase number of clients in master pane
, ("M-<KP_Divide>", sendMessage (IncMasterN (-1))) -- Decrease number of clients in the master pane , ("M-<KP_Divide>", sendMessage (IncMasterN (-1))) -- Decrease number of clients in master pane
, ("M-S-<KP_Multiply>", increaseLimit) -- Increase number of windows that can be shown , ("M-S-<KP_Multiply>", increaseLimit) -- Increase number of windows
, ("M-S-<KP_Divide>", decreaseLimit) -- Decrease number of windows that can be shown , ("M-S-<KP_Divide>", decreaseLimit) -- Decrease number of windows
, ("M-h", sendMessage Shrink) , ("M-h", sendMessage Shrink)
, ("M-l", sendMessage Expand) , ("M-l", sendMessage Expand)
@@ -318,10 +325,10 @@ myKeys =
, ("M-;", sendMessage ZoomFullToggle) , ("M-;", sendMessage ZoomFullToggle)
-- Workspaces -- Workspaces
, ("M-.", nextScreen) -- Switch focus to next monitor , ("M-.", nextScreen) -- Switch focus to next monitor
, ("M-,", prevScreen) -- Switch focus to prev monitor , ("M-,", prevScreen) -- Switch focus to prev monitor
, ("M-S-<KP_Add>", shiftTo Next nonNSP >> moveTo Next nonNSP) -- Shifts focused window to next workspace , ("M-S-<KP_Add>", shiftTo Next nonNSP >> moveTo Next nonNSP) -- Shifts focused window to next ws
, ("M-S-<KP_Subtract>", shiftTo Prev nonNSP >> moveTo Prev nonNSP) -- Shifts focused window to previous workspace , ("M-S-<KP_Subtract>", shiftTo Prev nonNSP >> moveTo Prev nonNSP) -- Shifts focused window to prev ws
-- Scratchpads -- Scratchpads
, ("M-C-<Return>", namedScratchpadAction myScratchPads "terminal") , ("M-C-<Return>", namedScratchpadAction myScratchPads "terminal")
@@ -343,16 +350,16 @@ myKeys =
--- My Applications (Super+Alt+Key) --- My Applications (Super+Alt+Key)
, ("M-M1-a", spawn (myTerminal ++ " -e ncpamixer")) , ("M-M1-a", spawn (myTerminal ++ " -e ncpamixer"))
, ("M-M1-b", spawn ("surf www.youtube.com/c/DistroTube/")) , ("M-M1-b", spawn ("surf www.youtube.com/c/DistroTube/"))
, ("M-M1-c", spawn (myTerminal ++ " -e cmus"))
, ("M-M1-e", spawn (myTerminal ++ " -e neomutt")) , ("M-M1-e", spawn (myTerminal ++ " -e neomutt"))
, ("M-M1-f", spawn (myTerminal ++ " -e sh ./.config/vifm/scripts/vifmrun")) , ("M-M1-f", spawn (myTerminal ++ " -e sh ./.config/vifm/scripts/vifmrun"))
, ("M-M1-i", spawn (myTerminal ++ " -e irssi")) , ("M-M1-i", spawn (myTerminal ++ " -e irssi"))
, ("M-M1-j", spawn (myTerminal ++ " -e joplin")) , ("M-M1-j", spawn (myTerminal ++ " -e joplin"))
, ("M-M1-l", spawn (myTerminal ++ " -e lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss gopher://distro.tube")) , ("M-M1-l", spawn (myTerminal ++ " -e lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss gopher://distro.tube"))
, ("M-M1-m", spawn (myTerminal ++ " -e toot curses")) , ("M-M1-m", spawn (myTerminal ++ " -e mocp"))
, ("M-M1-n", spawn (myTerminal ++ " -e newsboat")) , ("M-M1-n", spawn (myTerminal ++ " -e newsboat"))
, ("M-M1-p", spawn (myTerminal ++ " -e pianobar")) , ("M-M1-p", spawn (myTerminal ++ " -e pianobar"))
, ("M-M1-r", spawn (myTerminal ++ " -e rtv")) , ("M-M1-r", spawn (myTerminal ++ " -e rtv"))
, ("M-M1-t", spawn (myTerminal ++ " -e toot curses"))
, ("M-M1-w", spawn (myTerminal ++ " -e wopr report.xml")) , ("M-M1-w", spawn (myTerminal ++ " -e wopr report.xml"))
, ("M-M1-y", spawn (myTerminal ++ " -e youtube-viewer")) , ("M-M1-y", spawn (myTerminal ++ " -e youtube-viewer"))
@@ -426,38 +433,35 @@ myManageHook = composeAll
-- module adds a configurable amount of space around windows. -- module adds a configurable amount of space around windows.
mySpacing :: Integer -> l a -> XMonad.Layout.LayoutModifier.ModifiedLayout Spacing l a mySpacing :: Integer -> l a -> XMonad.Layout.LayoutModifier.ModifiedLayout Spacing l a
mySpacing i = spacingRaw False (Border i i i i) True (Border i i i i) True mySpacing i = spacingRaw False (Border i i i i) True (Border i i i i) True
-- This is a variation of the above except no borders are applied
-- Below is a variation of the above except no borders are applied
-- if fewer than two windows. So a single window has no gaps. -- if fewer than two windows. So a single window has no gaps.
mySpacing' :: Integer -> l a -> XMonad.Layout.LayoutModifier.ModifiedLayout Spacing l a
mySpacing' i = spacingRaw True (Border i i i i) True (Border i i i i) True mySpacing' i = spacingRaw True (Border i i i i) True (Border i i i i) True
-- The layouts that I use
tall = renamed [Replace "tall"] tall = renamed [Replace "tall"]
$ limitWindows 12 $ limitWindows 12
$ mySpacing 8 $ mySpacing 8
$ ResizableTall 1 (3/100) (1/2) [] $ ResizableTall 1 (3/100) (1/2) []
monocle = renamed [Replace "monocle"] monocle = renamed [Replace "monocle"]
$ limitWindows 20 $ limitWindows 20
$ Full $ Full
floats = renamed [Replace "floats"] floats = renamed [Replace "floats"]
$ limitWindows 20 $ limitWindows 20
$ simplestFloat $ simplestFloat
grid = renamed [Replace "grid"] grid = renamed [Replace "grid"]
$ limitWindows 12 $ limitWindows 12
$ mySpacing 8 $ mySpacing 8
$ mkToggle (single MIRROR) $ mkToggle (single MIRROR)
$ Grid (16/10) $ Grid (16/10)
spirals = renamed [Replace "spirals"] spirals = renamed [Replace "spirals"]
$ mySpacing' 8 $ mySpacing' 8
$ spiral (6/7) $ spiral (6/7)
threeCol = renamed [Replace "threeCol"] threeCol = renamed [Replace "threeCol"]
$ limitWindows 7 $ limitWindows 7
$ mySpacing' 4 $ mySpacing' 4
$ ThreeCol 1 (3/100) (1/2) $ ThreeCol 1 (3/100) (1/2)
threeRow = renamed [Replace "threeRow"] threeRow = renamed [Replace "threeRow"]
$ limitWindows 7 $ limitWindows 7
$ mySpacing' 4 $ mySpacing' 4
@@ -465,22 +469,35 @@ threeRow = renamed [Replace "threeRow"]
-- So we are applying Mirror to the ThreeCol layout. -- So we are applying Mirror to the ThreeCol layout.
$ Mirror $ Mirror
$ ThreeCol 1 (3/100) (1/2) $ ThreeCol 1 (3/100) (1/2)
tabs = renamed [Replace "tabs"]
-- I cannot add spacing to this layout because it will
-- add spacing between window and tabs which looks bad.
$ tabbed shrinkText myTabConfig
where
myTabConfig = def { fontName = "xft:Mononoki Nerd Font:regular:pixelsize=11"
, activeColor = "#292d3e"
, inactiveColor = "#3e445e"
, activeBorderColor = "#292d3e"
, inactiveBorderColor = "#292d3e"
, activeTextColor = "#ffffff"
, inactiveTextColor = "#d0d0d0"
}
-- The layout hook
myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts floats $ myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts floats $
mkToggle (NBFULL ?? NOBORDERS ?? EOT) $ myDefaultLayout mkToggle (NBFULL ?? NOBORDERS ?? EOT) $ myDefaultLayout
where where
myDefaultLayout = tall ||| noBorders monocle ||| floats ||| grid ||| spirals ||| threeCol ||| threeRow myDefaultLayout = tall ||| noBorders monocle ||| floats ||| grid ||| noBorders tabs ||| spirals ||| threeCol ||| threeRow
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- SCRATCHPADS -- SCRATCHPADS
------------------------------------------------------------------------ ------------------------------------------------------------------------
myScratchPads :: [NamedScratchpad] myScratchPads :: [NamedScratchpad]
myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm
, NS "cmus" spawnCmus findCmus manageCmus , NS "mocp" spawnCmus findCmus manageCmus
] ]
where where
spawnTerm = myTerminal ++ " -n scratchpad" spawnTerm = myTerminal ++ " -n scratchpad"
findTerm = resource =? "scratchpad" findTerm = resource =? "scratchpad"
manageTerm = customFloating $ W.RationalRect l t w h manageTerm = customFloating $ W.RationalRect l t w h
where where
@@ -488,8 +505,8 @@ myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm
w = 0.9 w = 0.9
t = 0.95 -h t = 0.95 -h
l = 0.95 -w l = 0.95 -w
spawnCmus = myTerminal ++ " -n cmus 'cmus'" spawnCmus = myTerminal ++ " -n mocp 'mocp'"
findCmus = resource =? "cmus" findCmus = resource =? "mocp"
manageCmus = customFloating $ W.RationalRect l t w h manageCmus = customFloating $ W.RationalRect l t w h
where where
h = 0.9 h = 0.9
@@ -507,8 +524,16 @@ main = do
xmproc1 <- spawnPipe "xmobar -x 1 /home/dt/.config/xmobar/xmobarrc2" xmproc1 <- spawnPipe "xmobar -x 1 /home/dt/.config/xmobar/xmobarrc2"
xmproc2 <- spawnPipe "xmobar -x 2 /home/dt/.config/xmobar/xmobarrc1" xmproc2 <- spawnPipe "xmobar -x 2 /home/dt/.config/xmobar/xmobarrc1"
-- the xmonad, ya know...what the WM is named after! -- the xmonad, ya know...what the WM is named after!
xmonad $ ewmh desktopConfig xmonad $ ewmh def
{ manageHook = ( isFullscreen --> doFullFloat ) <+> myManageHook <+> manageHook desktopConfig <+> manageDocks { manageHook = ( isFullscreen --> doFullFloat ) <+> myManageHook <+> manageDocks
-- Run xmonad commands from command line with "xmonadctl command". Commands include:
-- shrink, expand, next-layout, default-layout, restart-wm, xterm, kill, refresh, run,
-- focus-up, focus-down, swap-up, swap-down, swap-master, sink, quit-wm. You can run
-- "xmonadctl 0" to generate full list of commands written to ~/.xsession-errors.
, handleEventHook = serverModeEventHookCmd
<+> serverModeEventHook
<+> serverModeEventHookF "XMONAD_PRINT" (io . putStrLn)
<+> docksEventHook
, modMask = myModMask , modMask = myModMask
, terminal = myTerminal , terminal = myTerminal
, startupHook = myStartupHook , startupHook = myStartupHook