about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--modules/user/aszlig/profiles/workstation/default.nix3
-rw-r--r--pkgs/aszlig/vim/default.nix15
2 files changed, 15 insertions, 3 deletions
diff --git a/modules/user/aszlig/profiles/workstation/default.nix b/modules/user/aszlig/profiles/workstation/default.nix
index 24105ab1..d8f18f9f 100644
--- a/modules/user/aszlig/profiles/workstation/default.nix
+++ b/modules/user/aszlig/profiles/workstation/default.nix
@@ -171,7 +171,8 @@ in {
         displayManager.defaultSession = "none+i3";
         displayManager.sessionCommands = ''
           ${pkgs.xorg.xrdb}/bin/xrdb "${pkgs.writeText "xrdb.config" ''
-            XTerm*termName:            xterm-256color
+            XTerm*termName:            xterm-direct
+            XTerm*directColor:         true
             XTerm*faceName:            MxPlus IBM VGA 8x16
             XTerm*faceSize:            12
             XTerm*renderFont:          true
diff --git a/pkgs/aszlig/vim/default.nix b/pkgs/aszlig/vim/default.nix
index cd1c6064..65e8209c 100644
--- a/pkgs/aszlig/vim/default.nix
+++ b/pkgs/aszlig/vim/default.nix
@@ -618,6 +618,7 @@ let
     filetype plugin indent on
     syntax on
     colorscheme elflord
+    set termguicolors
 
     ${functions}
 
@@ -652,8 +653,18 @@ let
     )
   '';
 
-in lib.overrideDerivation vim (o: {
-  postInstall = (o.postInstall or "") + ''
+in lib.overrideDerivation vim (drv: {
+  # Fix elflord color theme to use the 16 color terminal colors in GUI mode as
+  # well for consistence. Also, I'm already used to the colors and I don't for
+  # example like the "Statement" guifg color.
+  patchPhase = (drv.patchPhase or "") + ''
+    sed -i -e '
+      /^hi Normal/c hi Normal guifg=#bebebe guibg=black
+      s/ctermfg=\([^ ]*\)\(.*guifg=\)[^ ]*/ctermfg=\1\2\1/
+    ' runtime/colors/elflord.vim
+  '';
+
+  postInstall = (drv.postInstall or "") + ''
     export vimdir="$(echo "$out/share/vim/vim"[0-9]*)"
     ${lib.concatStrings (lib.mapAttrsToList installPlugin plugins)}
     ln -sf "${vimrc}" "$out/share/vim/vimrc"