diff options
author | Adrian Kummerlaender | 2018-10-22 21:24:54 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2018-10-22 21:24:54 +0200 |
commit | 88b964b93ec04b5922573c70dcdebeddee506053 (patch) | |
tree | deb5d08e1ebc9a41bf7f6eda61b3fb6a34e64a5c /gui/conf | |
parent | 20c2d19f08a5e8ed626ab05426c6ab52f100a109 (diff) | |
download | nixos_home-88b964b93ec04b5922573c70dcdebeddee506053.tar nixos_home-88b964b93ec04b5922573c70dcdebeddee506053.tar.gz nixos_home-88b964b93ec04b5922573c70dcdebeddee506053.tar.bz2 nixos_home-88b964b93ec04b5922573c70dcdebeddee506053.tar.lz nixos_home-88b964b93ec04b5922573c70dcdebeddee506053.tar.xz nixos_home-88b964b93ec04b5922573c70dcdebeddee506053.tar.zst nixos_home-88b964b93ec04b5922573c70dcdebeddee506053.zip |
Add support for HUD-like video display in XMonad
i.e. manages a window titled "hud" using the Monitor layout
Diffstat (limited to 'gui/conf')
-rw-r--r-- | gui/conf/xmonad.hs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index 3b0d7be..317cbf0 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -17,6 +17,8 @@ import XMonad.Layout.MultiToggle import XMonad.Layout.MultiToggle.Instances import XMonad.Layout.Renamed (Rename(..), renamed) import XMonad.Layout.LayoutCombinators +import XMonad.Layout.LayoutModifier +import XMonad.Layout.Monitor import XMonad.Util.Themes import XMonad.Util.NamedScratchpad @@ -49,8 +51,9 @@ customTabTheme = (theme xmonadTheme) , activeBorderColor = "#909636" , inactiveBorderColor = "#161616" } -availableLayouts = id +customLayoutHook host = id . smartBorders + . ModifiedLayout (hudMonitor host) . mkToggle (single NBFULL) $ tabs ||| tiles ||| two ||| frame where @@ -96,6 +99,13 @@ scratchpads host = , NS "messaging" "telegram-desktop" ((className =? "TelegramDesktop") <&&> (title /=? "Media viewer")) (customFloating $ hideScreenBorder host sideBarRight) ] +hudMonitor host = monitor + { prop = Title "hud" + , XMonad.Layout.Monitor.name = "hud" + , rect = Rectangle ((screenWidthOn host) - 350) ((screenHeightOn host) - 250) 300 200 + , opacity = 0.8 + , persistent = True } + windowBringerDmenuConfig = def { menuCommand = "rofi" , menuArgs = [ "-p", "win", "-dmenu", "-i" ] } @@ -179,7 +189,7 @@ customEventHook = do handleEventHook def fullscreenEventHook -customManageHook host = composeOne +customManageHook host = manageMonitor (hudMonitor host) <+> composeOne [ hasRole "GtkFileChooserDialog" -?> doRectFloat $ hideScreenBorder host dropDown , isParaviewDialog -?> doRectFloat $ hideScreenBorder host dropDown , isTelegramMediaViewer -?> doFullFloat @@ -210,7 +220,7 @@ main = do , handleEventHook = customEventHook , manageHook = customManageHook host , logHook = customLogHook - , layoutHook = availableLayouts } + , layoutHook = customLayoutHook host } `additionalKeys` [ ((noModMask, xK_Menu) , namedScratchpadAction (scratchpads host) "terminal") ] |