diff --git a/VERSION b/VERSION index ef9226d3..7f09e8ce 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.11.2 \ No newline at end of file +8.11.3 \ No newline at end of file diff --git a/config/xmonad/.envrc b/config/xmonad/.envrc index 1db3ad65..6a6ca7fb 100644 --- a/config/xmonad/.envrc +++ b/config/xmonad/.envrc @@ -1,4 +1,6 @@ watch_file \ + ../flake.nix \ + ../flake.lock \ emacs.el \ package.yaml use flake "$(git rev-parse --show-toplevel)#xmonad" diff --git a/config/xmonad/emacs.el b/config/xmonad/emacs.el index 782e50cd..940f765f 100644 --- a/config/xmonad/emacs.el +++ b/config/xmonad/emacs.el @@ -18,7 +18,7 @@ (global-set-key (kbd "C-x C-k") 'kill-this-buffer) (global-set-key (kbd "s-u") 'revert-buffer) -(set-face-attribute 'default nil :family "Iosevka Nerd Font" :height 110) +(set-face-attribute 'default nil :family "Iosevka Nerd Font Mono" :height 110) (eval-when-compile (require 'use-package)) diff --git a/config/xmonad/package.yaml b/config/xmonad/package.yaml index deaff4d3..2aa16d8a 100644 --- a/config/xmonad/package.yaml +++ b/config/xmonad/package.yaml @@ -1,5 +1,5 @@ name: my-xmonad -version: 0.1.0.0 +version: 0.1.0.1 synopsis: My XMonad config author: Eric Bailey maintainer: eric@ericb.me diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs index ed1543e6..0cafa815 100644 --- a/config/xmonad/xmonad.hs +++ b/config/xmonad/xmonad.hs @@ -8,34 +8,41 @@ import Data.List (intercalate) import Data.Map (Map) import qualified Data.Map as M import Data.Maybe (catMaybes) -import XMonad hiding ((|||)) -import XMonad.Actions.CycleWS (WSType (EmptyWS, NonEmptyWS), doTo, moveTo) -import XMonad.Actions.Navigation2D -import XMonad.Actions.RotSlaves -import XMonad.Actions.Warp -import XMonad.Hooks.DynamicLog -import XMonad.Hooks.EwmhDesktops +import XMonad +import XMonad.Actions.CycleWS (WSType (Not), doTo, emptyWS, moveTo) +import XMonad.Actions.Navigation2D (navigation2DP, windowGo, windowSwap) +import XMonad.Actions.RotSlaves (rotSlavesDown, rotSlavesUp) +import XMonad.Actions.Warp (warpToWindow) +import XMonad.Hooks.DynamicLog (PP (..), shorten, statusBar, wrap, xmobarColor) +import XMonad.Hooks.EwmhDesktops (ewmh) import XMonad.Hooks.ManageDocks -import XMonad.Layout.BinarySpacePartition + ( AvoidStruts, + Direction1D (..), + Direction2D, + avoidStruts, + docks, + ) +import XMonad.Hooks.StatusBar (defToggleStrutsKey) +import XMonad.Layout.BinarySpacePartition (emptyBSP) import XMonad.Layout.Decoration (ModifiedLayout) -import XMonad.Layout.LayoutCombinators (JumpToLayout (..), (|||)) -import XMonad.Layout.NoBorders -import XMonad.Layout.TwoPane +import XMonad.Layout.NoBorders (noBorders) +import XMonad.Layout.TwoPane (TwoPane (TwoPane)) import qualified XMonad.StackSet as W -import XMonad.Util.EZConfig +import XMonad.Util.EZConfig (mkKeymap) import XMonad.Util.NamedScratchpad -import XMonad.Util.Scratchpad -import XMonad.Util.WorkspaceCompare (getSortByIndex) + ( NamedScratchpad (NS), + customFloating, + namedScratchpadAction, + scratchpadWorkspaceTag, + ) +import XMonad.Util.Scratchpad (scratchpadManageHook) +import XMonad.Util.WorkspaceCompare (filterOutWs, getSortByIndex) main :: IO () main = xmonad =<< myXmobar myConfig myXmobar :: LayoutClass l Window => XConfig l -> IO (XConfig (ModifiedLayout AvoidStruts l)) -myXmobar = statusBar "xmobar" myPP toggleStrutsKey - --- https://hackage.haskell.org/package/xmonad-contrib-0.16/docs/src/XMonad.Hooks.DynamicLog.html#toggleStrutsKey -toggleStrutsKey :: XConfig t -> (KeyMask, KeySym) -toggleStrutsKey XConfig {modMask = modm} = (modm, xK_b) +myXmobar = statusBar "xmobar" myPP defToggleStrutsKey myConfig = navigation2DP @@ -43,11 +50,11 @@ myConfig = ("", "", "", "") [("M-", bringMouse windowGo), ("M-S-", windowSwap)] False + . docks $ ewmh def { borderWidth = 0, focusFollowsMouse = True, - handleEventHook = handleEventHook def <+> docksEventHook, keys = myKeys, layoutHook = myLayout, -- TODO: namedScratchpadManageHook scratchpads, @@ -87,7 +94,7 @@ myPP = "BSP" -> "🐚" layout -> layout, ppSep = " ", - ppSort = (. namedScratchpadFilterOutWorkspace) <$> ppSort def, + ppSort = (. filterOutWs [scratchpadWorkspaceTag]) <$> ppSort def, ppTitle = xmobarColor "#fdf6e3" "" . shorten 80, ppUrgent = xmobarColor "#ff605a" "" } @@ -136,7 +143,7 @@ myKeys cfg = ("", spawn "flameshot gui"), ("M-S--", namedScratchpadAction scratchpads "emacs"), ("M--", namedScratchpadAction scratchpads "kitty"), - ("M-", getXMonadDataDir >>= spawn . wrap "i3lock --raw 3840x2400:rgb --image " "/skyrim.raw"), + ("M-", asks (cfgDir . directories) >>= spawn . wrap "i3lock --raw 3840x2400:rgb --image " "/skyrim.raw"), ("M-", spawn "dunstctl close"), ("M-M1-", spawn "dunstctl close-all"), ("M-M1-b", spawn "rofi-bluetooth"), @@ -163,11 +170,11 @@ myKeys cfg = ("M1-", spawn "rofi -modi combi,window -show combi -combi-modi run,drun"), ("C-M-M1-x", spawn "xmonad --restart"), ("C-M-M1-c", spawn "systemctl --user restart picom.service"), - ("C-M-", moveTo Prev NonEmptyWS), - ("C-M-", moveTo Next NonEmptyWS), - ("C-M-M1-", shiftAndMoveTo Prev EmptyWS), - ("C-M-M1-", shiftAndMoveTo Next EmptyWS), - ("C-M-M1-f", shiftAndMoveTo Next EmptyWS) + ("C-M-", moveTo Prev (Not emptyWS)), + ("C-M-", moveTo Next (Not emptyWS)), + ("C-M-M1-", shiftAndMoveTo Prev emptyWS), + ("C-M-M1-", shiftAndMoveTo Next emptyWS), + ("C-M-M1-f", shiftAndMoveTo Next emptyWS) ] ++ [ ( intercalate "-" (catMaybes [Just "M", maybeShift, Just key]), windows (f workspace) diff --git a/flake.nix b/flake.nix index b3d3f0ee..f32428be 100644 --- a/flake.nix +++ b/flake.nix @@ -243,6 +243,12 @@ haskellPackages.pointfree pre-commit rnix-lsp + xorg.libX11 + xorg.libXScrnSaver + xorg.libXext + xorg.libXft + xorg.libXinerama + xorg.libXrandr ] ++ myXMonad.env.nativeBuildInputs; }; }; diff --git a/src/flake.nw b/src/flake.nw index d09c82d3..58b8324f 100644 --- a/src/flake.nw +++ b/src/flake.nw @@ -252,6 +252,12 @@ xmonad = haskellPackages.pointfree pre-commit rnix-lsp + xorg.libX11 + xorg.libXScrnSaver + xorg.libXext + xorg.libXft + xorg.libXinerama + xorg.libXrandr ] ++ myXMonad.env.nativeBuildInputs; }; @