aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2023-01-13 17:24:34 -0500
committerRyan Kavanagh <rak@rak.ac>2023-01-13 17:24:34 -0500
commitc5802cbd7c7276e22b1016318da2d98c79a3e8e0 (patch)
tree2fb01c4c91e090db0879f95b11f5b04b89e655c1
parentopenbsd xidle (diff)
get xmonad working on openbsd
Diffstat (limited to '')
-rw-r--r--.chezmoiignore2
-rw-r--r--dot_xmonad/executable_build13
-rw-r--r--dot_xmonad/xmonad-config.cabal13
3 files changed, 28 insertions, 0 deletions
diff --git a/.chezmoiignore b/.chezmoiignore
index a96780b..87cf0af 100644
--- a/.chezmoiignore
+++ b/.chezmoiignore
@@ -14,6 +14,8 @@ crontab
{{- if ne .chezmoi.os "openbsd" }}
# only install if on openbsd
.urxvt/perl
+.xmonad/build
+.xmonad/xmonad-config.cabal
{{- end }}
# files in home
diff --git a/dot_xmonad/executable_build b/dot_xmonad/executable_build
new file mode 100644
index 0000000..fa37a66
--- /dev/null
+++ b/dot_xmonad/executable_build
@@ -0,0 +1,13 @@
+#!/bin/ksh -eu
+
+output_file="${1}"
+
+if [ "${output_file}" -nt xmonad.hs ] && [ "${output_file}" -nt /usr/local/bin/xmonad ]; then
+ echo "${output_file}" is newer than xmonad.hs
+ exit 0
+fi
+
+cabal v2-install exe:xmonad-config --overwrite-policy=always --install-method=copy
+
+[ -e "${output_file}" ] && mv -f "${output_file}" "${output_file}.old"
+install "${HOME}/.cabal/bin/xmonad-config" "${output_file}"
diff --git a/dot_xmonad/xmonad-config.cabal b/dot_xmonad/xmonad-config.cabal
new file mode 100644
index 0000000..87e58cf
--- /dev/null
+++ b/dot_xmonad/xmonad-config.cabal
@@ -0,0 +1,13 @@
+cabal-version: 2.4
+
+name: xmonad-config
+version: 0.1.0.0
+synopsis: XMonad config
+author: Greg Steuck
+maintainer: xmonad@nest.cx
+
+executable xmonad-config
+ main-is: xmonad.hs
+ build-depends: base, containers, xmonad, xmonad-contrib
+ hs-source-dirs: .
+ default-language: Haskell2010