mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-20 09:39:39 +01:00
Compare commits
6 Commits
805d8f7ac2
...
3618ecf301
| Author | SHA1 | Date | |
|---|---|---|---|
| 3618ecf301 | |||
| 96ad48d329 | |||
| 41ab4d7698 | |||
| 4665fbc673 | |||
| c2b25b3bf2 | |||
| 005430c902 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -41,6 +41,10 @@ flycheck_*.el
|
|||||||
# projectiles files
|
# projectiles files
|
||||||
.projectile
|
.projectile
|
||||||
|
|
||||||
|
# direnv
|
||||||
|
/.direnv/
|
||||||
|
.direnv
|
||||||
|
|
||||||
# network security
|
# network security
|
||||||
/network-security.data
|
/network-security.data
|
||||||
|
|
||||||
|
|||||||
@ -30,13 +30,50 @@ import XMonad.Layout.Grid
|
|||||||
import XMonad.Layout.Tabbed
|
import XMonad.Layout.Tabbed
|
||||||
import XMonad.Layout.Renamed
|
import XMonad.Layout.Renamed
|
||||||
import XMonad.Layout.ThreeColumns
|
import XMonad.Layout.ThreeColumns
|
||||||
|
import XMonad.Layout.PerWorkspace
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main' :: D.Client -> IO ()
|
main' :: D.Client -> IO ()
|
||||||
main = mkDbusClient >>= main'
|
main = mkDbusClient >>= main'
|
||||||
|
|
||||||
workSpaces = ["code", "web", "misc", "comm"] ++ map show ([5 .. 9] ++ [0])
|
workSpaces = ["code", "web", "misc", "comm"] ++ map show ([5 .. 9] ++ [0])
|
||||||
|
layout :: XMonad.Layout.LayoutModifier.ModifiedLayout
|
||||||
|
SmartBorder
|
||||||
|
(XMonad.Layout.LayoutModifier.ModifiedLayout
|
||||||
|
AvoidStruts
|
||||||
|
(PerWorkspace
|
||||||
|
(Choose
|
||||||
|
(XMonad.Layout.LayoutModifier.ModifiedLayout Rename ThreeCol)
|
||||||
|
(Choose
|
||||||
|
Tall
|
||||||
|
(Choose
|
||||||
|
(Mirror Tall)
|
||||||
|
(Choose
|
||||||
|
Grid
|
||||||
|
(Choose
|
||||||
|
Full
|
||||||
|
(XMonad.Layout.LayoutModifier.ModifiedLayout
|
||||||
|
(XMonad.Layout.Decoration.Decoration
|
||||||
|
TabbedDecoration XMonad.Layout.Decoration.DefaultShrinker)
|
||||||
|
XMonad.Layout.Simplest.Simplest))))))
|
||||||
|
(Choose
|
||||||
|
Tall
|
||||||
|
(Choose
|
||||||
|
(Mirror Tall)
|
||||||
|
(Choose
|
||||||
|
Grid
|
||||||
|
(Choose
|
||||||
|
Full
|
||||||
|
(Choose
|
||||||
|
(XMonad.Layout.LayoutModifier.ModifiedLayout
|
||||||
|
(XMonad.Layout.Decoration.Decoration
|
||||||
|
TabbedDecoration XMonad.Layout.Decoration.DefaultShrinker)
|
||||||
|
XMonad.Layout.Simplest.Simplest)
|
||||||
|
(XMonad.Layout.LayoutModifier.ModifiedLayout
|
||||||
|
Rename ThreeCol))))))))
|
||||||
|
Window
|
||||||
layout = smartBorders $ avoidStruts $
|
layout = smartBorders $ avoidStruts $
|
||||||
|
onWorkspace "comm" (threemid ||| tall ||| Mirror tall ||| Grid ||| Full ||| simpleTabbed) $
|
||||||
(tall ||| Mirror tall ||| Grid ||| Full ||| simpleTabbed ||| threemid)
|
(tall ||| Mirror tall ||| Grid ||| Full ||| simpleTabbed ||| threemid)
|
||||||
where tall = Tall 1 (3/100) (1/2)
|
where tall = Tall 1 (3/100) (1/2)
|
||||||
threemid = renamed [AppendWords "Mid"] $ ThreeColMid 1 (3/100) (1/2)
|
threemid = renamed [AppendWords "Mid"] $ ThreeColMid 1 (3/100) (1/2)
|
||||||
@ -50,9 +87,10 @@ main' dbus = do
|
|||||||
, modMask = mod4Mask -- rebind mod to super key
|
, modMask = mod4Mask -- rebind mod to super key
|
||||||
, keys = keyMap
|
, keys = keyMap
|
||||||
, manageHook = myHookManager
|
, manageHook = myHookManager
|
||||||
, startupHook = do
|
, startupHook = do -- autostart
|
||||||
startupHook def
|
startupHook def
|
||||||
spawn "autorandr -c"
|
spawn "autorandr -c"
|
||||||
|
spawn "keepassxc"
|
||||||
, workspaces = workSpaces
|
, workspaces = workSpaces
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +136,7 @@ keyMap c = mkKeymap c $
|
|||||||
, ("M-S-e" , sendToScreen def 1)
|
, ("M-S-e" , sendToScreen def 1)
|
||||||
, ("M-S-r" , sendToScreen def 2)
|
, ("M-S-r" , sendToScreen def 2)
|
||||||
, ("M-t" , withFocused $ windows . W.sink)
|
, ("M-t" , withFocused $ windows . W.sink)
|
||||||
, ("M-C-l" , spawn "betterlockscreen -l --show-layout -u ~/.background-image.png")
|
, ("M-C-l" , spawn "betterlockscreen -l")
|
||||||
, ("M-S-<Tab>" , spawn keyboardtoggle)
|
, ("M-S-<Tab>" , spawn keyboardtoggle)
|
||||||
] ++
|
] ++
|
||||||
[(m ++ k, windows $ f w)
|
[(m ++ k, windows $ f w)
|
||||||
@ -124,10 +162,24 @@ myHookManager = composeAll [ manageDocks
|
|||||||
, className =? "Element" --> doShift "comm"
|
, className =? "Element" --> doShift "comm"
|
||||||
, className =? "firefox" --> doShift "web"
|
, className =? "firefox" --> doShift "web"
|
||||||
, className =? "thunderbird" --> doShift "comm"
|
, className =? "thunderbird" --> doShift "comm"
|
||||||
|
, className =? "KeePassXC" --> doFloat
|
||||||
|
, (className =? zoomClassName) <&&> shouldFloat <$> title --> doFloat
|
||||||
|
, (className =? zoomClassName) <&&> shouldSink <$> title --> doSink
|
||||||
, isFullscreen --> doFullFloat
|
, isFullscreen --> doFullFloat
|
||||||
, placeHook $ withGaps (32, 32, 32, 32) $ smart (0.5, 0.5)
|
, placeHook $ withGaps (32, 32, 32, 32) $ smart (0.5, 0.5)
|
||||||
, manageHook def
|
, manageHook def
|
||||||
]
|
]
|
||||||
|
where
|
||||||
|
zoomClassName = "zoom"
|
||||||
|
titleTitles =
|
||||||
|
[ "Zoom - Free Account" -- main window
|
||||||
|
, "Zoom - Licensed Account" -- main window
|
||||||
|
, "Zoom" -- meeting window
|
||||||
|
, "Zoom Meeting" -- meeting window shortly after creation
|
||||||
|
]
|
||||||
|
shouldFloat title = title `notElem` titleTitles
|
||||||
|
shouldSink title = title `elem` titleTitles
|
||||||
|
doSink = (ask >>= doF . W.sink) <+> doF W.swapDown
|
||||||
|
|
||||||
polybarHook :: D.Client -> PP
|
polybarHook :: D.Client -> PP
|
||||||
polybarHook dbus =
|
polybarHook dbus =
|
||||||
@ -156,6 +208,7 @@ fadeHook act inact = fadeOutLogHook $ fadeAllBut exceptions act inact
|
|||||||
<||> className =? "Chromium-browser"
|
<||> className =? "Chromium-browser"
|
||||||
<||> className =? "Emacs"
|
<||> className =? "Emacs"
|
||||||
<||> className =? "thunderbird"
|
<||> className =? "thunderbird"
|
||||||
|
<||> className =? "element"
|
||||||
|
|
||||||
fadeAllBut :: Query Bool -> Rational -> Rational -> Query Rational
|
fadeAllBut :: Query Bool -> Rational -> Rational -> Query Rational
|
||||||
fadeAllBut qry amt inact = do isInactive <- isUnfocused
|
fadeAllBut qry amt inact = do isInactive <- isUnfocused
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user