From 5b7e0db847c46affc207c327835d1efd3b2727de Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 25 Nov 2023 18:08:34 +0100 Subject: Misc updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- xmonad/xmonad-session-rc | 14 ++++++++++++++ xmonad/xmonad.hs.gpp | 10 ++++++++-- xmonad/xmonad.mk | 3 +++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 xmonad/xmonad-session-rc (limited to 'xmonad') diff --git a/xmonad/xmonad-session-rc b/xmonad/xmonad-session-rc new file mode 100644 index 0000000..f61a512 --- /dev/null +++ b/xmonad/xmonad-session-rc @@ -0,0 +1,14 @@ +# -*- shell-script -*- + +if test -z "${default_session}"; then # Guard from inclusion from xinit + + SESSION=xmonad + export DESKTOP_SESSION="$SESSION" + + # Apply package specific settings and run package specific programs + for f in ~/.config/X11/xinit/xinitrc.d/*; do + if test -r "$f"; then + . -- "$f" + fi + done +fi diff --git a/xmonad/xmonad.hs.gpp b/xmonad/xmonad.hs.gpp index 6a9358e..7a6f960 100644 --- a/xmonad/xmonad.hs.gpp +++ b/xmonad/xmonad.hs.gpp @@ -54,12 +54,16 @@ import qualified Data.Map as M $$< + hostname="$(hostname | tr '[[:upper:]]' '[[:lower:]]')" + workspace_1=main - if test "$(hostname | tr '[[:upper:]]' '[[:lower:]]')" = zenith; then + if test "$hostname" = zenith; then workspace_7=chat workspace_8=mail + workspace_9=media + else + workspace_9=off fi - workspace_9=media modmask=mod4Mask # Super_L focus_on_hover=True @@ -163,6 +167,8 @@ $$>fi {-- TODO , (( $${modmask} .|. shiftMask , xK_m), sendMessage RestoreNextMinimizedWin) --} ] +{-- TODO preselect workspace 9 on secondary monitor --} + ---- ==== Layout settings ==== ---- ratios = [ toRational (2/(1 + sqrt 5 :: Double)) -- golden ratio diff --git a/xmonad/xmonad.mk b/xmonad/xmonad.mk index 65acabf..29d52bb 100644 --- a/xmonad/xmonad.mk +++ b/xmonad/xmonad.mk @@ -1,3 +1,6 @@ xmonad.hs: xmonad.hs.gpp xmonad.mk + @touch -- ~/.xmonad/xmonad.hs + @chmod -- +w ~/.xmonad/xmonad.hs gpp -s '$$$$' < xmonad.hs.gpp > ~/.xmonad/xmonad.hs xmonad --recompile + @chmod -- a-w ~/.xmonad/xmonad.hs -- cgit v1.2.3-70-g09d2