xmonad: Remove configuration from home

This commit is contained in:
Alexander Kobjolke 2024-02-16 22:40:04 +01:00
parent 020edd4fc9
commit c936e29aeb
3 changed files with 0 additions and 110 deletions

View file

@ -3,7 +3,6 @@
{
imports = [
./cli.nix
./programs/xmonad
./programs/rofi
./services/polybar
./services/dunst

View file

@ -1,91 +0,0 @@
import XMonad
import XMonad.Util.Ungrab (unGrab)
import XMonad.Layout.ThreeColumns
import XMonad.Layout.Magnifier (magnifiercz')
import XMonad.Hooks.EwmhDesktops
import qualified XMonad.Hooks.ManageDocks as Docks
import qualified XMonad.Util.EZConfig as EZ
import Control.Monad (when)
import Text.Printf (printf)
import System.Posix.Process (executeFile)
import System.Info (arch,os)
import System.Environment (getArgs)
import System.FilePath ((</>))
compiledConfig = printf "xmonad-%s-%s" arch os
compileRestart resume = do
dirs <- asks directories
whenX (recompile dirs True) $ do
when resume writeStateToFile
catchIO
( do
args <- getArgs
executeFile (cacheDir dirs </> compiledConfig) False args Nothing
)
myLayout = Docks.avoidStruts (tiled ||| Mirror tiled ||| Full ||| columns)
where
tiled = Tall nmaster delta ratio
columns = magnifiercz' 1.3 $ 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
main :: IO ()
main = getDirectories >>= launch myConfig
myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ def
{ modMask = mod4Mask -- Use Super instead of Alt
, terminal = "alacritty"
, layoutHook = myLayout
}
`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")
, ("M-b", sendMessage Docks.ToggleStruts)
]
-- myManageHook :: ManageHook
-- myManageHook = composeAll
-- [ className =? "Gimp" --> doFloat
-- , isDialog --> doFloat
-- ]
-- main = xmonad
-- . ewmhFullscreen
-- . ewmh
-- . withEasySB (statusBarProp "xmobar" (pure myXmobarPP)) defToggleStrutsKey
-- $ myConfig
-- myXmobarPP :: PP
-- myXmobarPP = def
-- { ppSep = magenta " • "
-- , ppTitleSanitize = xmobarStrip
-- , ppCurrent = wrap " " "" . xmobarBorder "Top" "#8be9fd" 2
-- , ppHidden = white . wrap " " ""
-- , ppHiddenNoWindows = lowWhite . wrap " " ""
-- , ppUrgent = red . wrap (yellow "!") (yellow "!")
-- , ppOrder = \[ws, l, _, wins] -> [ws, l, wins]
-- , ppExtras = [logTitles formatFocused formatUnfocused]
-- }
-- where
-- formatFocused = wrap (white "[") (white "]") . magenta . ppWindow
-- formatUnfocused = wrap (lowWhite "[") (lowWhite "]") . blue . ppWindow
-- -- | Windows should have *some* title, which should not not exceed a
-- -- sane length.
-- ppWindow :: String -> String
-- ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30
-- blue, lowWhite, magenta, red, white, yellow :: String -> String
-- magenta = xmobarColor "#ff79c6" ""
-- blue = xmobarColor "#bd93f9" ""
-- white = xmobarColor "#f8f8f2" ""
-- yellow = xmobarColor "#f1fa8c" ""
-- red = xmobarColor "#ff5555" ""
-- lowWhite = xmobarColor "#bbbbbb" ""

View file

@ -1,18 +0,0 @@
{ config, lib, pkgs, ... }:
{
config.services = {
upower.enable = true;
xserver = {
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
config = ./config.hs;
extraPackages = hp: [ hp.dbus hp.monad-logger hp.xmonad-contrib ];
};
};
};
config.systemd.services.upower.enable = true;
}