Initial commit

This commit is contained in:
Mats Rauhala 2021-11-16 19:08:47 +02:00
commit 83dabdb793
3 changed files with 122 additions and 0 deletions

73
flake.nix Normal file
View File

@ -0,0 +1,73 @@
{
description = "A very basic flake";
outputs = { self, nixpkgs }: {
nixosModule = { config, lib, pkgs, ... }:
with lib;
let cfg = config.programs.myUrxvt;
in
{
options = {
programs.myUrxvt = {
enable = mkEnableOption "Enable urxvt";
};
};
config = mkIf cfg.enable {
programs.urxvt = {
enable = true;
fonts = [ "xft:Iosevka:size=11" ];
iso14755 = false;
scroll = {
bar.enable = false;
lines = 4000;
keepPosition = true;
};
extraConfig = {
"pointerBlank" = true;
# 15.9.2020
# I added the urxvt-resize-font extension here. There's the new module
# that takes a configuration in the form of 'urxvt-plugins' as seen
# below. It just fetches the resources into a location where urxvt can
# understand them. The extension is fetched to a file defined by the LHS
# of the attribute.
#
# So for example in this case into 'resize-font'. And this needs to match
# the entry in perl-ext-common and in the keysym lines.
"perl-ext-common" = "default,matcher,searchable-scrollback,resize-font";
"keysym.C-minus" = "resize-font:smaller";
"keysym.C-plus" = "resize-font:bigger";
"keysym.C-equal" = "resize-font:reset";
"keysym.C-question" = "resize-font:show";
};
};
home.file =
let
files = mapAttrs' mkFile plugins;
mkFile = with builtins; name: value: { name = ".urxvt/ext/${name}"; value = {text = readFile "${value}";};};
plugins = with builtins; {
resize-font = with builtins; (pkgs.fetchFromGitHub {
owner = "simmel";
repo = "urxvt-resize-font";
inherit (fromJSON (readFile ./plugins/urxvt-resize-font.json)) sha256 rev;
}) + "/resize-font";
};
in files;
xresources = {
properties = {
"Xcursor.theme" = "oxy-white";
"Xft*antialias" = true;
"Xft*dpi" = 96;
"Xft*hinting" = true;
"Xft*hintstyle" = "hintfull";
"Xft*rgba" = "rgb";
"dzen2.font" = "xft:Iosevka:pixelsize=13";
};
extraConfig = builtins.readFile ./theme;
};
};
};
};
}

View File

@ -0,0 +1,10 @@
{
"url": "https://github.com/simmel/urxvt-resize-font",
"rev": "b5935806f159594f516da9b4c88bf1f3e5225cfd",
"date": "2020-07-27T14:05:12+02:00",
"path": "/nix/store/xnkrj72vz314rb94s3scy4mqyxg79dah-urxvt-resize-font",
"sha256": "1km4vs3a55nda3fdm01c8n53hvq2gs4ac5rddmp80ajcfdmx5ya3",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

39
theme Normal file
View File

@ -0,0 +1,39 @@
! XTerm
! XTerm*background: #000010
! XTerm*foreground: #ffffff
! XTerm*color0: #000000
! XTerm*color1: #9e1828
! XTerm*color2: #aece92
! XTerm*color3: #968a38
! XTerm*color4: #414171
! XTerm*color5: #963c59
! XTerm*color6: #418179
! XTerm*color7: #bebebe
! XTerm*color8: #666666
! XTerm*color9: #cf6171
! XTerm*color10: #c5f779
! XTerm*color11: #fff796
! XTerm*color12: #4186be
! XTerm*color13: #cf9ebe
! XTerm*color14: #71bebe
! XTerm*color15: #ffffff
! XTerm*cursorColor: magenta
*background: #3f3f3f
*foreground: #dcdccc
*color0: #1E2320
*color1: #705050
*color2: #60b48a
*color3: #dfaf8f
*color4: #506070
*color5: #dc8cc3
*color6: #8cd0d3
*color7: #dcdccc
*color8: #709080
*color9: #dca3a3
*color10: #c3bf9f
*color11: #f0dfaf
*color12: #94bff3
*color13: #ec93d3
*color14: #93e0e3
*color15: #ffffff