Skip to content

Instantly share code, notes, and snippets.

@mcfiredrill
Created September 10, 2023 18:21
Show Gist options
  • Save mcfiredrill/f797472a6264a7b27ed336dd1de094a1 to your computer and use it in GitHub Desktop.
Save mcfiredrill/f797472a6264a7b27ed336dd1de094a1 to your computer and use it in GitHub Desktop.
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Spiral
--import XMonad.Layout.Circle
--import XMonad.Layout.Roledex
import XMonad.Util.Ungrab
import XMonad.Util.SpawnOnce (spawnOnce)
import XMonad.Util.Run(spawnPipe)
--import XMonad.Util.EZConfig(additionalKeysP)
import System.IO
import qualified Data.Map as M
myLayouts = avoidStruts $ layoutHook def ||| spiral (6/7)
--myStatusBar = "/usr/local/bin/status.sh | /usr/local/bin/dzen2 -l 10 -u"
myStatusBar = "bin/status.sh | /usr/local/bin/dzen2"
-- the -y option is total hax and doesnt always work :(
-- try adjusting +/- a few values if it appears at the top
myWorkspaceBar = "/usr/bin/dzen2 -dock -fg white -bg '#41d069' -fn 'BigBlueTermPlus Nerd Font Mono:size=14'"
myDzenPP h = def {
ppOutput = hPutStrLn h
, ppCurrent = dzenColor "gray" "#660066" . wrap "<" ">"
, ppSep = " "
, ppWsSep = " "
, ppTitle = dzenColor "#660066" "" . wrap "< " " >"
}
myWorkspaces = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
myStartupHook :: X ()
myStartupHook = do
spawnOnce "feh --bg-fill --no-fehbg ~/Downloads/500円寄付.jpg"
spawnOnce "xmodmap ~/.Xmodmap"
spawnOnce ".screenlayout/dokkaebi.sh"
myKeys x =
[ ((modMask x .|. shiftMask, xK_n), spawn "mpc next")
, ((modMask x .|. shiftMask, xK_p), spawn "mpc prev")
, ((modMask x .|. shiftMask, xK_semicolon), spawn "mpc toggle")
, ((modMask x .|. shiftMask, xK_s), spawn "mpc stop")
, ((modMask x .|. shiftMask, xK_z), spawn "mpc random")
, ((modMask x, xK_c), spawn "chromium")
]
keyMap x = M.union (M.fromList (myKeys x)) (keys def x)
main = do
--dzen <- spawnPipe myStatusBar
workspaceBar <- spawnPipe myWorkspaceBar
xmonad $ def {
terminal = "kitty"
, modMask = mod4Mask
, borderWidth = 4
, normalBorderColor = "#cccccc"
, focusedBorderColor = "#41d069"
, startupHook = myStartupHook
--, layoutHook = avoidStruts $ layoutHook defaultConfig
, manageHook = manageHook def <+> manageDocks
, layoutHook = myLayouts
, workspaces = myWorkspaces
, logHook = dynamicLogWithPP $ myDzenPP workspaceBar
, keys = keyMap
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment