xmonad: Remove unused layouts
This commit is contained in:
parent
05647a01dd
commit
bc675f00ac
1 changed files with 66 additions and 70 deletions
|
|
@ -1,23 +1,23 @@
|
|||
import XMonad
|
||||
import XMonad.Actions.CycleWS qualified as WS
|
||||
import XMonad.Actions.Navigation2D (navigation2DP, windowGo, windowSwap)
|
||||
import qualified XMonad.Actions.CycleWS as WS
|
||||
import XMonad.Util.Ungrab (unGrab)
|
||||
import XMonad.Layout.ThreeColumns
|
||||
import XMonad.Layout.ToggleLayouts (ToggleLayout(..), toggleLayouts)
|
||||
import XMonad.Hooks.EwmhDesktops
|
||||
import XMonad.Hooks.ManageDocks qualified as Docks
|
||||
import XMonad.Hooks.SetWMName
|
||||
import XMonad.Layout.BinarySpacePartition
|
||||
import XMonad.Layout.BorderResize (borderResize)
|
||||
import XMonad.Hooks.EwmhDesktops
|
||||
import XMonad.Hooks.SetWMName
|
||||
import qualified XMonad.Hooks.ManageDocks as Docks
|
||||
import qualified XMonad.Util.EZConfig as EZ
|
||||
import XMonad.Layout.ThreeColumns
|
||||
import XMonad.Layout.ToggleLayouts (ToggleLayout (..), toggleLayouts)
|
||||
import XMonad.Util.EZConfig qualified as EZ
|
||||
import XMonad.Util.Ungrab (unGrab)
|
||||
|
||||
import Numeric.Natural
|
||||
import Control.Monad (when)
|
||||
import Text.Printf (printf)
|
||||
import System.Posix.Process (executeFile)
|
||||
import System.Info (arch,os)
|
||||
import Numeric.Natural
|
||||
import System.Environment (getArgs)
|
||||
import System.FilePath ((</>))
|
||||
import System.Info (arch, os)
|
||||
import System.Posix.Process (executeFile)
|
||||
import Text.Printf (printf)
|
||||
|
||||
compiledConfig = printf "xmonad-%s-%s" arch os
|
||||
|
||||
|
|
@ -31,14 +31,9 @@ compileRestart resume = do
|
|||
executeFile (cacheDir dirs </> compiledConfig) False args Nothing
|
||||
)
|
||||
|
||||
myLayout = borderResize $ Docks.avoidStruts $ layout
|
||||
myLayout = borderResize $ Docks.avoidStruts layout
|
||||
where
|
||||
layout = (emptyBSP ||| columns ||| tiled ||| Full)
|
||||
tiled = Tall nmaster delta ratio
|
||||
columns = ThreeColMid nmaster delta ratio
|
||||
nmaster = 1 -- default number of windows in the master pane
|
||||
ratio = 1/2 -- default proportion occupied by master pane
|
||||
delta = 3/100 -- percent of screen to increment when resizing
|
||||
layout = emptyBSP ||| Full
|
||||
|
||||
main :: IO ()
|
||||
main = getDirectories >>= launch myConfig
|
||||
|
|
@ -48,7 +43,8 @@ main = getDirectories >>= launch myConfig
|
|||
windowMoveSplit :: Direction2D -> Bool -> X ()
|
||||
windowMoveSplit direction _ = sendMessage $ MoveSplit direction
|
||||
|
||||
data VolumeCommand = ToggleVolume
|
||||
data VolumeCommand
|
||||
= ToggleVolume
|
||||
| LowerVolume Natural
|
||||
| RaiseVolume Natural
|
||||
|
||||
|
|
@ -63,15 +59,19 @@ interpretVolumeCommand command = "amixer -q set Master " <> cmd
|
|||
changeVolume :: VolumeCommand -> X ()
|
||||
changeVolume = spawn . interpretVolumeCommand
|
||||
|
||||
myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ nav $ def
|
||||
myConfig =
|
||||
ewmhFullscreen $
|
||||
ewmh $
|
||||
Docks.docks $
|
||||
nav $
|
||||
def
|
||||
{ modMask = mod4Mask -- Use Super instead of Alt
|
||||
, terminal = "alacritty"
|
||||
, layoutHook = myLayout
|
||||
-- this seems to be necessary to make java gui applications work :(
|
||||
, startupHook = ewmhDesktopsStartup >> setWMName "LG3D"
|
||||
, -- this seems to be necessary to make java gui applications work :(
|
||||
startupHook = ewmhDesktopsStartup >> setWMName "LG3D"
|
||||
}
|
||||
`EZ.additionalKeysP`
|
||||
[ ("M-S-z", spawn "xscreensaver-command -lock")
|
||||
`EZ.additionalKeysP` [ ("M-S-z", spawn "xscreensaver-command -lock")
|
||||
, ("M-S-r", compileRestart True)
|
||||
, ("M-S-q", restart "xmonad" True)
|
||||
, ("M-C-s", unGrab *> spawn "scrot -s")
|
||||
|
|
@ -83,20 +83,17 @@ myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ nav $ def
|
|||
, ("M-l", WS.toggleWS)
|
||||
, ("M-g", WS.prevWS)
|
||||
, ("M-r", WS.nextWS)
|
||||
, -- backlight control
|
||||
|
||||
-- backlight control
|
||||
|
||||
, ("<XF86MonBrightnessDown>", spawn "xbacklight -dec 5")
|
||||
("<XF86MonBrightnessDown>", spawn "xbacklight -dec 5")
|
||||
, ("<XF86MonBrightnessUp>", spawn "xbacklight -inc 5")
|
||||
, ("<F5>", spawn "xbacklight -dec 5")
|
||||
, ("<F6>", spawn "xbacklight -inc 5")
|
||||
, -- volume control
|
||||
|
||||
-- volume control
|
||||
|
||||
, ("<XF86AudioMute>", changeVolume ToggleVolume)
|
||||
("<XF86AudioMute>", changeVolume ToggleVolume)
|
||||
, ("<XF86AudioLowerVolume>", changeVolume $ LowerVolume 5)
|
||||
, ("<XF86AudioRaiseVolume>", changeVolume $ RaiseVolume 5)
|
||||
|
||||
, ("M-a", sendMessage Balance)
|
||||
, ("M-S-a", sendMessage Equalize)
|
||||
, ("M-o", sendMessage Rotate)
|
||||
|
|
@ -107,7 +104,6 @@ myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ nav $ def
|
|||
appLauncher = "rofi -show combi -modes combi -combi-modes window,drun,run,ssh"
|
||||
passLauncher = "rofi-pass"
|
||||
|
||||
|
||||
-- myManageHook :: ManageHook
|
||||
-- myManageHook = composeAll
|
||||
-- [ className =? "Gimp" --> doFloat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue