diff options
Diffstat (limited to 'dot_xmonad')
-rw-r--r-- | dot_xmonad/executable_build | 13 | ||||
-rw-r--r-- | dot_xmonad/xmonad-config.cabal | 13 | ||||
-rw-r--r-- | dot_xmonad/xmonad.hs.tmpl (renamed from dot_xmonad/xmonad.hs) | 4 |
3 files changed, 28 insertions, 2 deletions
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 diff --git a/dot_xmonad/xmonad.hs b/dot_xmonad/xmonad.hs.tmpl index ed227f6..ac70ae8 100644 --- a/dot_xmonad/xmonad.hs +++ b/dot_xmonad/xmonad.hs.tmpl @@ -58,7 +58,7 @@ import XMonad.StackSet (shiftMaster, greedyView, shift) myMod = mod4Mask -- windows key myCtrl = controlMask -myTerminal = "urxvtc" +myTerminal = {{ if (eq .chezmoi.os "linux") }}"urxvtc"{{ else }}"xterm"{{ end }} -- Mouse bindings: default actions bound to mouse events myMouseBindings (XConfig {XMonad.modMask = modMask}) = fromList $ @@ -97,7 +97,7 @@ mykeys _ = [ , ((myMod, xK_F6), spawn "sleep 0.5 && ${HOME}/bin/icd && ${HOME}/bin/mice.sh") , ((myMod, xK_Up), spawn "sleep 0.5 && b u") , ((myMod, xK_Down), spawn "sleep 0.5 && b d") - , ((myMod, xK_l), spawn "slock xset dpms force off") + , ((myMod, xK_l), spawn {{ if (eq .chezmoi.os "linux") }}"slock xset dpms force off"{{ else }}"xlock"{{ end }}) , ((myMod .|. myCtrl .|. shiftMask, xK_Right), sendMessage $ Move R) , ((myMod .|. myCtrl .|. shiftMask, xK_Left), sendMessage $ Move L) , ((myMod .|. myCtrl .|. shiftMask, xK_Up), sendMessage $ Move U) |