diff --git a/hosts/asus-gl553vd/configuration.nix b/hosts/asus-gl553vd/configuration.nix index 78d4906..efa5a8d 100644 --- a/hosts/asus-gl553vd/configuration.nix +++ b/hosts/asus-gl553vd/configuration.nix @@ -7,15 +7,6 @@ ./users ]; - ################################################################################ - # Window manager - ################################################################################ - - local.window-manager = { - xmonad.enable = false; - river.enable = true; - }; - ################################################################################ # Services ################################################################################ diff --git a/modules/home-manager/configs/window-manager/river/default.nix b/modules/home-manager/configs/window-manager/river/default.nix index 2349a33..9cd9cfb 100644 --- a/modules/home-manager/configs/window-manager/river/default.nix +++ b/modules/home-manager/configs/window-manager/river/default.nix @@ -31,11 +31,17 @@ in background-color = "0x002b36"; border-color-focused = "0x93a1a1"; border-color-unfocused = "0x586e75"; - set-repeat = "50 300"; + + default-attach-mode = "below"; + focus-follows-cursor = "disabled"; + hide-cursor = "when-typing enabled"; + + set-repeat = "35 200"; map.normal = lib.mkMerge (lib.flatten [ { "Alt+Shift Return" = "spawn foot"; + "Alt+Shift B" = "spawn librewolf"; "Alt P" = "spawn dmenu-wl_run"; "Alt Space" = "toggle-fullscreen"; @@ -86,7 +92,11 @@ in ${kb.layout} riverctl default-layout rivertile - rivertile -view-padding 6 -outer-padding 6 & + rivertile \ + -main-location top \ + -view-padding 6 \ + -outer-padding 6 \ + & '' ); }; diff --git a/modules/home-manager/programs/terminals/default.nix b/modules/home-manager/programs/terminals/default.nix index 0b22efd..f54a42f 100644 --- a/modules/home-manager/programs/terminals/default.nix +++ b/modules/home-manager/programs/terminals/default.nix @@ -3,6 +3,7 @@ { imports = [ ./alacritty.nix + ./foot.nix ./wezterm.nix ]; diff --git a/modules/home-manager/programs/terminals/foot.nix b/modules/home-manager/programs/terminals/foot.nix new file mode 100644 index 0000000..c2fa22b --- /dev/null +++ b/modules/home-manager/programs/terminals/foot.nix @@ -0,0 +1,72 @@ +{ lib, pkgs, config, ... }: + +let + cfg = config.local.programs.terminals.foot; + themeCfg = config.local.themes."${config.local.theme.name}"; + + color = col: builtins.substring 1 6 col; +in +{ + options.local.programs.terminals.foot = with lib; { + enable = mkEnableOption "foot"; + fontSize = mkOption { + type = types.number; + default = 11; + description = "Foot font size"; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs.unstable; [ foot ]; + + # See https://codeberg.org/dnkl/foot/src/branch/master/foot.ini + xdg.configFile."foot/foot.ini".text = lib.generators.toINIWithGlobalSection { } { + globalSection = { + pad = "5x5"; + font = "monospace:size=${toString cfg.fontSize}"; + }; + sections = { + colors = lib.mapAttrs (k: color) { + background = themeCfg.window.background; + foreground = themeCfg.window.mainText; + + regular0 = themeCfg.window.regular.color0; + regular1 = themeCfg.window.regular.color1; + regular2 = themeCfg.window.regular.color2; + regular3 = themeCfg.window.regular.color3; + regular4 = themeCfg.window.regular.color4; + regular5 = themeCfg.window.regular.color5; + regular6 = themeCfg.window.regular.color6; + regular7 = themeCfg.window.regular.color7; + + bright0 = themeCfg.window.bold.color8; + bright1 = themeCfg.window.bold.color9; + bright2 = themeCfg.window.bold.color10; + bright3 = themeCfg.window.bold.color11; + bright4 = themeCfg.window.bold.color12; + bright5 = themeCfg.window.bold.color13; + bright6 = themeCfg.window.bold.color14; + bright7 = themeCfg.window.bold.color15; + + dim0 = themeCfg.window.regular.color0; + dim1 = themeCfg.window.regular.color1; + dim2 = themeCfg.window.regular.color2; + dim3 = themeCfg.window.regular.color3; + dim4 = themeCfg.window.regular.color4; + dim5 = themeCfg.window.regular.color5; + dim6 = themeCfg.window.regular.color6; + dim7 = themeCfg.window.regular.color7; + + "16" = themeCfg.window.extended.color16; + "17" = themeCfg.window.extended.color17; + "18" = themeCfg.window.extended.color18; + "19" = themeCfg.window.extended.color19; + + selection-foreground = themeCfg.window.selectionText; + selection-background = themeCfg.window.selection; + }; + }; + }; + }; + +} diff --git a/modules/nixos/configs/lockscreen/waylock.nix b/modules/nixos/configs/lockscreen/waylock.nix index 552f690..114e818 100644 --- a/modules/nixos/configs/lockscreen/waylock.nix +++ b/modules/nixos/configs/lockscreen/waylock.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - cfg = config.local.window-manager.hyprland; + cfg = config.local.lockscreen.waylock; in { options.local.lockscreen.waylock = with lib; { diff --git a/users/jan/default.nix b/users/jan/default.nix index 8a123bc..ecca078 100644 --- a/users/jan/default.nix +++ b/users/jan/default.nix @@ -65,7 +65,10 @@ # Programs ################################################################################ - local.programs.terminals.wezterm.enable = lib.mkDefault true; + local.programs.terminals = { + wezterm.enable = lib.mkDefault config.local.window-manager.xmonad.enable; + foot.enable = lib.mkDefault (!config.local.window-manager.xmonad.enable); + }; local.programs.editors.neovim = { enable = lib.mkDefault true;