diff options
| author | quentin@aristote.fr <quentin@aristote.fr> | 2024-07-27 19:26:08 +0200 |
|---|---|---|
| committer | quentin@aristote.fr <quentin@aristote.fr> | 2024-07-27 20:08:55 +0200 |
| commit | 3e25d6f133c5f6071159cae90ea33e726228e095 (patch) | |
| tree | 3dc9c5180d061b68fd6fb786dcf472aad5de9958 /modules/nixos/personal | |
| parent | 3af66997a38c91a4825e5b30e882f32d6c0ea01f (diff) | |
home: bash: set window title
Diffstat (limited to 'modules/nixos/personal')
| -rw-r--r-- | modules/nixos/personal/environment.nix | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/modules/nixos/personal/environment.nix b/modules/nixos/personal/environment.nix index a129353..e4f84e6 100644 --- a/modules/nixos/personal/environment.nix +++ b/modules/nixos/personal/environment.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: - -let cfg = config.personal.environment; +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.personal.environment; in { options.personal.environment = { enable = lib.mkEnableOption "basic environment"; @@ -10,11 +14,17 @@ in { config = lib.mkIf cfg.enable (lib.mkMerge [ { environment = { - systemPackages = with pkgs; [ vim gitMinimal busybox coreutils ]; + systemPackages = with pkgs; [vim gitMinimal busybox coreutils]; variables.EDITOR = "vim"; }; programs.starship.enable = true; + programs.bash.shellInit = '' + function set_win_title(){ + echo -ne "\033]0;$(whoami)@$(hostname --long):$(dirs)\a" + } + starship_precmd_user_func="set_win_title" + ''; } (lib.mkIf cfg.locale.enable { time.timeZone = "Europe/Paris"; |
