You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.9 KiB
86 lines
2.9 KiB
/** Main entry point for the home-manager module configuration
|
|
*
|
|
* For some reason, access to the config.libkookie.* option tree
|
|
* is not possible here, but instead needs to be deferred to an
|
|
* imported expression. For that reason, this file only contains
|
|
* key allocations, and no actual configuration content.
|
|
*/
|
|
|
|
{ config, lib, pkgs, home-manager, ... } @ args:
|
|
|
|
let cfg = config.libkookie.ui.i3;
|
|
in
|
|
{
|
|
# FIXME: this is required because libkookie-i3-scrcap does not work
|
|
# in an i3 keybinding!
|
|
home.packages = [
|
|
pkgs.gnome3.gnome-screenshot
|
|
|
|
# Additional Thunar dependencies to make my life easier
|
|
pkgs.unzip
|
|
] ++ (with pkgs.xfce; [
|
|
thunar-archive-plugin
|
|
thunar-volman
|
|
thunar
|
|
]);
|
|
|
|
xsession.windowManager.i3 =
|
|
let config = (import ./config.nix args);
|
|
in
|
|
{
|
|
enable = true;
|
|
package = if cfg.window-spacing then pkgs.i3-gaps else pkgs.i3;
|
|
inherit config;
|
|
|
|
# TODO: move this into the config module?
|
|
|
|
extraConfig = with pkgs;
|
|
let
|
|
fehCommand = "${feh}/bin/feh --bg-fill ${cfg.wallpaper}";
|
|
in
|
|
''
|
|
# Setup compositor
|
|
exec_always --no-startup-id "${coreutils}/bin/pkill picom; ${picom}/bin/picom --config ~/.config/i3/picom.conf"
|
|
|
|
# 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}/bin/setxkbmap -layout us -variant altgr-intl -option caps:hyper"
|
|
exec ${xcape}/bin/xcape -e "#66=Escape" -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 none
|
|
client.focused #4c7899 #285577 #ffffff #F73E5F #666666
|
|
'' + (if cfg.window-spacing then
|
|
''
|
|
# These settings are for i3-gaps
|
|
for_window [class=".*"] border pixel 3
|
|
gaps inner 20
|
|
''
|
|
else
|
|
"");
|
|
};
|
|
|
|
xdg.configFile."i3/picom.conf" = (import ./picom.nix args);
|
|
|
|
xdg.configFile."i3/i3status.conf" = (import ./i3status.nix args);
|
|
}
|
|
|