feat: add ghostty
This commit is contained in:
parent
80f92962a2
commit
ffab7cedc4
6 changed files with 183 additions and 18 deletions
35
modules/programs/ghostty.nix
Normal file
35
modules/programs/ghostty.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.ghostty;
|
||||
format = pkgs.formats.keyValue {
|
||||
listsAsDuplicateKeys = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.programs.ghostty.enable = mkEnableOption "Ghostty";
|
||||
options.my.programs.ghostty.package = (mkPackageOption pkgs "Ghostty" { }) // {
|
||||
inherit (inputs.ghostty.packages.${pkgs.system}) default;
|
||||
};
|
||||
options.my.programs.ghostty.settings = mkOption {
|
||||
inherit (format) type;
|
||||
description = ''
|
||||
Configuration written to {file}`$XDG_CONFIG_HOME/ghostty/config`.
|
||||
'';
|
||||
default = { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
my.terminal.package = cfg.package;
|
||||
home-manager.users.moritz = {
|
||||
home.packages = [ cfg.package ];
|
||||
xdg.configFile."ghostty/config".source = format.generate "ghostty-config" cfg.settings;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ in
|
|||
map = {
|
||||
normal = {
|
||||
"Super Q" = "close";
|
||||
"Super Return" = "spawn kitty";
|
||||
"Super Return" = "spawn '${config.my.terminal.package}'";
|
||||
"Super R" = ''spawn 'exec $(tofi-run --fuzzy-match=true)' '';
|
||||
"Super W" = ''spawn "pkill -USR1 waybar"'';
|
||||
"Super+Shift R" = "spawn ~/.config/river/init";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue