@ -29,7 +29,7 @@ in
in
{
enable = true ;
package = pkgs . i3 ;
package = if cfg . window-spacing then pkgs . i3-gaps else pkgs . i3 ;
inherit config ;
# TODO: move this into the config module?
@ -38,39 +38,46 @@ in
let
fehCommand = " ${ feh } / b i n / f e h - - b g - f i l l ${ cfg . wallpaper } " ;
in
''
# Setup compositor
exec_always - - no-startup-id " ${ coreutils } / b i n / p k i l l p i c o m ; ${ picom } / b i n / p i c o m - - c o n f i g ~ / . c o n f i g / i 3 / p i c o m . c o n f "
# Make CAPSLOCK into ESC because it's 2018
#
# Okay actually this is slightly more complicated than that. I'm binding
# CAPSLOCK to HYPER, so that I can use it as a modifier in emacs, but then
# using xcape(1) to also make short CAPSLOCK presses into ESCAPE.
exec_always - - no-startup-id " ${ xorg . xmodmap } / b i n / s e t x k b m a p - l a y o u t u s - v a r i a n t a l t g r - i n t l - o p t i o n c a p s : h y p e r "
exec $ { xcape } /bin/xcape - e " # 6 6 = E s c a p e " - t 150
# Always set a wallpaper
exec_always - - no-startup-id $ { fehCommand }
bar {
status_command $ { i3status } /bin/i3status - c ~/.config/i3/i3status.conf
position bottom
bindsym button4 nop
bindsym button5 nop
colors {
background #0F0F0F
statusline #D5D5D5
''
# Setup compositor
exec_always - - no-startup-id " ${ coreutils } / b i n / p k i l l p i c o m ; ${ picom } / b i n / p i c o m - - c o n f i g ~ / . c o n f i g / i 3 / p i c o m . c o n f "
# Make CAPSLOCK into ESC because it's 2018
#
# Okay actually this is slightly more complicated than that. I'm binding
# CAPSLOCK to HYPER, so that I can use it as a modifier in emacs, but then
# using xcape(1) to also make short CAPSLOCK presses into ESCAPE.
exec_always - - no-startup-id " ${ xorg . xmodmap } / b i n / s e t x k b m a p - l a y o u t u s - v a r i a n t a l t g r - i n t l - o p t i o n c a p s : h y p e r "
exec $ { xcape } /bin/xcape - e " # 6 6 = E s c a p e " - t 150
# Always set a wallpaper
exec_always - - no-startup-id $ { fehCommand }
bar {
status_command $ { i3status } /bin/i3status - c ~/.config/i3/i3status.conf
position top
bindsym button4 nop
bindsym button5 nop
colors {
background #0F0F0F
statusline #D5D5D5
}
}
}
focus_follows_mouse no
# Layout and design settings that should _really_ be in the module
default_border pixel 3
client . focused #4c7899 #285577 #ffffff #F73E5F #666666
'' ;
focus_follows_mouse no
# Layout and design settings that should _really_ be in the module
# default_border none
client . focused #4c7899 #285577 #ffffff #F73E5F #666666
'' + ( i f c f g . w i n d o w - s p a c i n g t h e n
''
# These settings are for i3-gaps
for_window [ class = " . * " ] border pixel 3
gaps inner 20
''
else
" " ) ;
} ;
xdg . configFile . " i 3 / p i c o m . c o n f " = ( import ./picom.nix args ) ;