From ddeafa09c2a2ccd3801249c9b622fa8de708dc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Mon, 18 Jul 2022 21:48:02 +0200 Subject: [PATCH] add dynamic workspace names --- src/XMonad/Custom/Prompt.hs | 14 ++++++++++++++ src/XMonad/Custom/WorkspaceNames.hs | 11 +++++++++++ xmonad-custom.cabal | 2 ++ 3 files changed, 27 insertions(+) create mode 100644 src/XMonad/Custom/Prompt.hs create mode 100644 src/XMonad/Custom/WorkspaceNames.hs diff --git a/src/XMonad/Custom/Prompt.hs b/src/XMonad/Custom/Prompt.hs new file mode 100644 index 0000000..cccdab9 --- /dev/null +++ b/src/XMonad/Custom/Prompt.hs @@ -0,0 +1,14 @@ +module XMonad.Custom.Prompt (module XMonad.Prompt, myXPConfig) where + +import XMonad.Prompt + +myXPConfig :: XPConfig +myXPConfig = def + { font = "xft:Hack:pixelsize=14" + , bgColor = "#200000" + , fgColor = "#CFCFCF" + , height = 40 + , position = CenteredAt 0.5 0.5 + , promptBorderWidth = 2 + , showCompletionOnTab = True + } diff --git a/src/XMonad/Custom/WorkspaceNames.hs b/src/XMonad/Custom/WorkspaceNames.hs new file mode 100644 index 0000000..9d857c7 --- /dev/null +++ b/src/XMonad/Custom/WorkspaceNames.hs @@ -0,0 +1,11 @@ +module XMonad.Custom.WorkspaceNames (module XMonad.Actions.WorkspaceNames, myWorkspaceNamesKeyBindings) where + +import XMonad +import XMonad.Actions.WorkspaceNames + +import XMonad.Custom.Prompt + +myWorkspaceNamesKeyBindings :: [(String, X ())] +myWorkspaceNamesKeyBindings = [ + ("M-w", renameWorkspace myXPConfig) + ] diff --git a/xmonad-custom.cabal b/xmonad-custom.cabal index 0ed91c6..eb0592e 100644 --- a/xmonad-custom.cabal +++ b/xmonad-custom.cabal @@ -16,9 +16,11 @@ library XMonad.Custom.ProgramWorkspaces XMonad.Custom.UniversitySetup XMonad.Custom.Layout + XMonad.Custom.Prompt XMonad.Custom.Workspaces XMonad.Custom.Modifiers XMonad.Custom.NumberWorkspaces + XMonad.Custom.WorkspaceNames hs-source-dirs: src ghc-options: -funbox-strict-fields -Wall -Wno-unused-do-bind build-depends: base