Skip to content

Instantly share code, notes, and snippets.

@ardumont
Last active April 4, 2020 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ardumont/9edc136916852c7671bbe4bcf552a597 to your computer and use it in GitHub Desktop.
Save ardumont/9edc136916852c7671bbe4bcf552a597 to your computer and use it in GitHub Desktop.
# default session will start xmonad
xsession = {
enable = true;
windowManager = {
xmonad = {
enable = true;
enableContribAndExtras = true;
extraPackages = self: [
self.xmobar self.xmonad-contrib
];
# ~/.xmonad/xmonad.hs is not managed by home-manager
# It is installed through ardumont/dot-xmonad for now
config = null;
};
};
# startup initialization (user services, keyboard mapping, etc...)
initExtra = with pkgs; ''
# On some machine, somehow, this ends up polluting shells (ubuntu
# 18.04 comes to mind)
unset LD_PRELOAD QT4_IM_MODULE QT_ACCESSIBILITY QT_IM_MODULE \
QT_QPA_PLATFORMTHEME
# Set a default pointer.
${xorg.xsetroot}/bin/xsetroot -cursor_name left_ptr
# Turn off beeps.
${xorg.xset}/bin/xset -b
# Quicker blanking of screen.
${xorg.xset}/bin/xset dpms 120 360 800
# set the keyboard repeat rate
${xorg.xset}/bin/xset r rate 200 60
export GTK_IM_MODULE=xim
# before starting xmonad, we want a correct X db and a running urxvt daemon
[ -e ~/.Xresources ] && ${xorg.xrdb}/bin/xrdb -merge ~/.Xresources
[ -e ~/.Xdefaults ] && ${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
# fix graphical libraries (awt, swt, etc...) in stumpwm/xmonad (exotic wm)
export _JAVA_AWT_WM_NONREPARENTING=1
${wmname}/bin/wmname "LG3D"
export AWT_TOOLKIT=MToolkit
# Layout per host divergence possible
[ -e $LAYOUT_FILE_PER_HOST ] && ${zsh}/bin/zsh $LAYOUT_FILE_PER_HOST
${pkgs.trayer}/bin/trayer --edge top \
--align right \
--SetDockType true \
--SetPartialStrut true \
--expand true \
--width 15 \
--height 21 \
--transparent true \
--tint 0x000000 &
# start needed services
systemctl --user start setxkbmap.service
systemctl --user start syndaemon.service
systemctl --user start emacs.service
systemctl --user start xscreensaver.service
'';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment