Compare commits
4 commits
d9a911e195
...
master
Author | SHA1 | Date | |
---|---|---|---|
e270c0bcd7 | |||
85d2be8e21 | |||
f8447a82d4 | |||
0ed1e989f9 |
1 changed files with 55 additions and 28 deletions
65
xmonad.hs
65
xmonad.hs
|
@ -1,12 +1,30 @@
|
||||||
--IMPORTS
|
-- xmonad.hs
|
||||||
|
-- xmonad example config file.
|
||||||
|
--
|
||||||
|
-- A template showing all available configuration hooks,
|
||||||
|
-- and how to override the defaults in your own xmonad.hs conf file.
|
||||||
|
--
|
||||||
|
-- Normally, you'd only override those defaults you care about.
|
||||||
|
--
|
||||||
|
|
||||||
import XMonad
|
import XMonad
|
||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
import System.Exit
|
import System.Exit
|
||||||
|
import Graphics.X11.ExtraTypes.XF86
|
||||||
|
import XMonad.Hooks.DynamicLog
|
||||||
import XMonad.Util.SpawnOnce
|
import XMonad.Util.SpawnOnce
|
||||||
import XMonad.Util.Run
|
import XMonad.Util.Run
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Hooks.DynamicLog
|
import XMonad.Hooks.EwmhDesktops
|
||||||
|
import XMonad.Layout.Gaps
|
||||||
|
import XMonad.Layout.Spacing
|
||||||
|
import XMonad.Layout.MultiToggle
|
||||||
|
import XMonad.Layout.NoBorders
|
||||||
|
import XMonad.Layout.ThreeColumns
|
||||||
|
import XMonad.Layout.NoBorders
|
||||||
|
import XMonad.Layout.MultiToggle.Instances
|
||||||
|
import XMonad.Layout.Grid
|
||||||
|
import XMonad.Layout.Spiral
|
||||||
|
|
||||||
import qualified XMonad.StackSet as W
|
import qualified XMonad.StackSet as W
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
@ -59,12 +77,15 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
-- launch a terminal
|
-- launch a terminal
|
||||||
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
|
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
|
||||||
|
|
||||||
-- launch dmenu
|
-- launch rofi
|
||||||
, ((modm, xK_p ), spawn "dmenu_run")
|
, ((modm .|. shiftMask, xK_d ), spawn "rofi -show drun")
|
||||||
|
|
||||||
-- launch gmrun
|
-- launch gmrun
|
||||||
, ((modm .|. shiftMask, xK_p ), spawn "gmrun")
|
, ((modm .|. shiftMask, xK_p ), spawn "gmrun")
|
||||||
|
|
||||||
|
-- launch firefox
|
||||||
|
, ((modm .|. shiftMask, xK_f ), spawn "firefox")
|
||||||
|
|
||||||
-- close focused window
|
-- close focused window
|
||||||
, ((modm .|. shiftMask, xK_q ), kill)
|
, ((modm .|. shiftMask, xK_q ), kill)
|
||||||
|
|
||||||
|
@ -120,10 +141,10 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
-- , ((modm , xK_b ), sendMessage ToggleStruts)
|
-- , ((modm , xK_b ), sendMessage ToggleStruts)
|
||||||
|
|
||||||
-- Quit xmonad
|
-- Quit xmonad
|
||||||
-- ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
|
, ((modm, xK_x ), spawn "wlogout")
|
||||||
|
|
||||||
-- Restart xmonad
|
-- Restart xmonad
|
||||||
, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
|
, ((modm , xK_q ), spawn "killall xmobar; xmonad --recompile; xmonad --restart")
|
||||||
|
|
||||||
-- Run xmessage with a summary of the default keybindings (useful for beginners)
|
-- Run xmessage with a summary of the default keybindings (useful for beginners)
|
||||||
, ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -"))
|
, ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -"))
|
||||||
|
@ -178,19 +199,16 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
-- The available layouts. Note that each layout is separated by |||,
|
-- The available layouts. Note that each layout is separated by |||,
|
||||||
-- which denotes layout choice.
|
-- which denotes layout choice.
|
||||||
--
|
--
|
||||||
myLayout = avoidStruts (tiled ||| Mirror tiled ||| Full)
|
myLayout = spacingRaw True (Border 0 5 5 5) True (Border 5 5 5 5) True $ gaps [(U,5), (D,5), (R,5), (L,5)]
|
||||||
|
$ avoidStruts
|
||||||
|
$ mkToggle (NBFULL ?? EOT)
|
||||||
|
$ smartBorders
|
||||||
|
$ tiled ||| Grid ||| spiral (6/7) ||| ThreeColMid 1 (3/100) (1/2) ||| noBorders Full
|
||||||
where
|
where
|
||||||
-- default tiling algorithm partitions the screen into two panes
|
|
||||||
tiled = Tall nmaster delta ratio
|
tiled = Tall nmaster delta ratio
|
||||||
|
|
||||||
-- The default number of windows in the master pane
|
|
||||||
nmaster = 1
|
nmaster = 1
|
||||||
|
|
||||||
-- Default proportion of screen occupied by master pane
|
|
||||||
ratio = 1/2
|
|
||||||
|
|
||||||
-- Percent of screen to increment by when resizing panes
|
|
||||||
delta = 3/100
|
delta = 3/100
|
||||||
|
ratio = 1/2
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Window rules:
|
-- Window rules:
|
||||||
|
@ -222,7 +240,7 @@ myManageHook = composeAll
|
||||||
-- return (All True) if the default handler is to be run afterwards. To
|
-- return (All True) if the default handler is to be run afterwards. To
|
||||||
-- combine event hooks use mappend or mconcat from Data.Monoid.
|
-- combine event hooks use mappend or mconcat from Data.Monoid.
|
||||||
--
|
--
|
||||||
myEventHook = mempty
|
myEventHook = fullscreenEventHook
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Status bars and logging
|
-- Status bars and logging
|
||||||
|
@ -243,17 +261,26 @@ myLogHook = return ()
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
spawnOnce "nitrogen --restore &"
|
spawnOnce "nitrogen --restore &"
|
||||||
spawnOnce "picom &"
|
spawnOnce "picom &"
|
||||||
|
spawnOnce "trayer --edge bottom --align left --widthtype request --heighttype request --SetDockType true --transparent true --alpha 255 --SetPartialStrut false --expand true &"
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
-- Command to launch the bar.
|
||||||
|
myBar = "xmobar"
|
||||||
|
|
||||||
|
-- Custom PP, configure it as you like. It determines what is being written to the bar.
|
||||||
|
myPP = xmobarPP { ppCurrent = xmobarColor "#429942" "" . wrap "<" ">" }
|
||||||
|
|
||||||
|
-- Key binding to toggle the gap for the bar.
|
||||||
|
toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask, xK_b)
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
-- Now run xmonad with all the defaults we set up.
|
-- Now run xmonad with all the defaults we set up.
|
||||||
|
|
||||||
-- Run xmonad with the settings you specify. No need to modify this.
|
-- Run xmonad with the settings you specify. No need to modify this.
|
||||||
--
|
--
|
||||||
main = do
|
main = do
|
||||||
xmproc <- spawnPipe "xmobar /home/mx/.config/xmobar/xmobarrc"
|
xmonad =<< statusBar myBar myPP toggleStrutsKey (ewmh defaults) { handleEventHook =
|
||||||
|
handleEventHook def <+> fullscreenEventHook }
|
||||||
xmonad defaults
|
|
||||||
|
|
||||||
-- A structure containing your configuration settings, overriding
|
-- A structure containing your configuration settings, overriding
|
||||||
-- fields in the default config. Any you don't override, will
|
-- fields in the default config. Any you don't override, will
|
||||||
|
|
Loading…
Reference in a new issue