mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-24 20:10:23 +10:00
Cleaning up my xmonad config.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
-- ____ _____
|
||||||
|
-- | _ \_ _| Derek Taylor (DistroTube)
|
||||||
|
-- | | | || | http://www.youtube.com/c/DistroTube
|
||||||
|
-- | |_| || | http://www.gitlab.com/dwt1/
|
||||||
|
-- |____/ |_|
|
||||||
|
--
|
||||||
|
-- A customized configuration for xmonad window manager (http://www.xmonad.org)
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
---IMPORTS
|
---IMPORTS
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
@@ -5,7 +13,6 @@
|
|||||||
import XMonad
|
import XMonad
|
||||||
import XMonad.Config.Desktop
|
import XMonad.Config.Desktop
|
||||||
import Data.Maybe (isJust)
|
import Data.Maybe (isJust)
|
||||||
import Data.Ratio ((%))
|
|
||||||
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
|
||||||
@@ -71,7 +78,7 @@ import XMonad.Prompt (defaultXPConfig, XPConfig(..), XPPosition(Top), Direction1
|
|||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
myModMask = mod4Mask -- Sets modkey to super/windows key
|
myModMask = mod4Mask -- Sets modkey to super/windows key
|
||||||
myTerminal = "st" -- Sets default terminal
|
myTerminal = "st" -- Sets default terminal
|
||||||
myTextEditor = "editor" -- Sets default text editor
|
myTextEditor = "vim" -- Sets default text editor
|
||||||
myBorderWidth = 2 -- Sets border width for windows
|
myBorderWidth = 2 -- Sets border width for windows
|
||||||
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
|
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
|
||||||
|
|
||||||
@@ -128,15 +135,15 @@ myKeys =
|
|||||||
, ("M-S-a", killAll) -- Kill all the windows on the current workspace
|
, ("M-S-a", killAll) -- Kill all the windows on the current workspace
|
||||||
|
|
||||||
, ("M-<Delete>", withFocused $ windows . W.sink)
|
, ("M-<Delete>", withFocused $ windows . W.sink)
|
||||||
, ("M-S-<Delete>", sinkAll) -- Pushes all floating windows on current workspace back into tiling
|
, ("M-S-<Delete>", sinkAll) -- Pushes floating windows back into tiling
|
||||||
, ("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 the focused window with the next window
|
||||||
, ("M-S-k", windows W.swapUp) -- Swap the focused window with the prev window
|
, ("M-S-k", windows W.swapUp) -- Swap the focused window with the prev window
|
||||||
, ("M-<Backspace>", promote) -- Moves focused window to master window. All others maintain order
|
, ("M-<Backspace>", promote) -- Moves focused window to master, all others maintain order
|
||||||
, ("M1-S-<Tab>", rotSlavesDown) -- Rotate all windows except the master and keep the 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-$", toggleFloatNext)
|
, ("M-$", toggleFloatNext)
|
||||||
@@ -168,10 +175,10 @@ myKeys =
|
|||||||
, ("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 the number of clients in the master pane
|
, ("M-<KP_Multiply>", sendMessage (IncMasterN 1)) -- Increase number of clients in the master pane
|
||||||
, ("M-<KP_Divide>", sendMessage (IncMasterN (-1))) -- Decrease the number of clients in the master pane
|
, ("M-<KP_Divide>", sendMessage (IncMasterN (-1))) -- Decrease number of clients in the master pane
|
||||||
, ("M-S-<KP_Multiply>", increaseLimit) -- Increase the number of windows that can be shown
|
, ("M-S-<KP_Multiply>", increaseLimit) -- Increase number of windows that can be shown
|
||||||
, ("M-S-<KP_Divide>", decreaseLimit) -- Decrease the number of windows that can be shown
|
, ("M-S-<KP_Divide>", decreaseLimit) -- Decrease number of windows that can be shown
|
||||||
|
|
||||||
, ("M-h", sendMessage Shrink)
|
, ("M-h", sendMessage Shrink)
|
||||||
, ("M-l", sendMessage Expand)
|
, ("M-l", sendMessage Expand)
|
||||||
@@ -208,7 +215,7 @@ myKeys =
|
|||||||
, ("M-S-<KP_Right>", spawn (myTerminal ++ " -e youtube-viewer")) -- Keypad 6
|
, ("M-S-<KP_Right>", spawn (myTerminal ++ " -e youtube-viewer")) -- Keypad 6
|
||||||
, ("M-S-<KP_Home>", spawn (myTerminal ++ " -e ncpamixer")) -- Keypad 7
|
, ("M-S-<KP_Home>", spawn (myTerminal ++ " -e ncpamixer")) -- Keypad 7
|
||||||
, ("M-S-<KP_Up>", spawn (myTerminal ++ " -e calcurse")) -- Keypad 8
|
, ("M-S-<KP_Up>", spawn (myTerminal ++ " -e calcurse")) -- Keypad 8
|
||||||
, ("M-S-<KP_Page_Up>", spawn (myTerminal ++ " -e vim /home/dt/.xmonad/xmonad.hs")) -- Keypad 9
|
, ("M-S-<KP_Page_Up>", spawn (myTerminal ++ " -e vim ~/.xmonad/xmonad.hs")) -- Keypad 9
|
||||||
|
|
||||||
-- Command Line Apps (MOD + CTRL + KEYPAD 1-9)
|
-- Command Line Apps (MOD + CTRL + KEYPAD 1-9)
|
||||||
, ("M-C-<KP_End>", spawn (myTerminal ++ " -e htop")) -- Keypad 1
|
, ("M-C-<KP_End>", spawn (myTerminal ++ " -e htop")) -- Keypad 1
|
||||||
@@ -290,7 +297,7 @@ threeCol = renamed [Replace "threeCol"] $ limitWindows 3 $ ThreeCol 1 (3/
|
|||||||
threeRow = renamed [Replace "threeRow"] $ limitWindows 3 $ Mirror $ mkToggle (single MIRROR) zoomRow
|
threeRow = renamed [Replace "threeRow"] $ limitWindows 3 $ Mirror $ mkToggle (single MIRROR) zoomRow
|
||||||
oneBig = renamed [Replace "oneBig"] $ limitWindows 6 $ Mirror $ mkToggle (single MIRROR) $ mkToggle (single REFLECTX) $ mkToggle (single REFLECTY) $ OneBig (5/9) (8/12)
|
oneBig = renamed [Replace "oneBig"] $ limitWindows 6 $ Mirror $ mkToggle (single MIRROR) $ mkToggle (single REFLECTX) $ mkToggle (single REFLECTY) $ OneBig (5/9) (8/12)
|
||||||
monocle = renamed [Replace "monocle"] $ limitWindows 20 $ Full
|
monocle = renamed [Replace "monocle"] $ limitWindows 20 $ Full
|
||||||
space = renamed [Replace "space"] $ limitWindows 4 $ spacing 36 $ Mirror $ mkToggle (single MIRROR) $ mkToggle (single REFLECTX) $ mkToggle (single REFLECTY) $ OneBig (2/3) (2/3)
|
space = renamed [Replace "space"] $ limitWindows 4 $ spacing 12 $ Mirror $ mkToggle (single MIRROR) $ mkToggle (single REFLECTX) $ mkToggle (single REFLECTY) $ OneBig (2/3) (2/3)
|
||||||
floats = renamed [Replace "floats"] $ limitWindows 20 $ simplestFloat
|
floats = renamed [Replace "floats"] $ limitWindows 20 $ simplestFloat
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user