Switch to alacritty just for fun

This commit is contained in:
Alexander Bantyev 2020-08-04 15:11:45 +03:00
parent d4369f1013
commit b83e7b24f7
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
7 changed files with 64 additions and 76 deletions

View File

@ -7,8 +7,8 @@ with import ../support.nix { inherit lib config; }; {
config = rec {
defaultApplications = {
term = {
cmd = "${pkgs.konsole}/bin/konsole";
desktop = "konsole";
cmd = "${pkgs.alacritty}/bin/alacritty";
desktop = "alacritty";
};
editor = {
cmd = toString (pkgs.writeTextFile {

View File

@ -0,0 +1,42 @@
{ config, pkgs, lib, ... }:
let thm = config.themes.colors;
in {
home-manager.users.balsoft.programs.alacritty = {
enable = true;
settings = {
font = rec {
normal.family = "IBM Plex Mono";
size = 11;
bold = { style = "Bold"; };
};
window.padding = {
x = 2;
y = 2;
};
shell.program = "${pkgs.zsh}/bin/zsh";
cursor.style = "Beam";
colors = {
primary = {
background = thm.bg;
foreground = thm.fg;
};
cursor = {
text = thm.alt;
cursor = thm.fg;
};
normal = {
black = thm.bg;
inherit (thm) red green yellow blue cyan;
magenta = thm.purple;
white = thm.fg;
};
};
};
};
}

View File

@ -1,51 +0,0 @@
{ pkgs, lib, config, ... }:
with (import ../../support.nix { inherit lib config; }); {
home-manager.users.balsoft.xdg.dataFile = {
"konsole/Default.profile".text = genIni {
Appearance.ColorScheme = "generated";
"Cursor Options".CursorShape = 1;
General = {
Command = "zsh";
Name = "Default";
Parent = "FALLBACK/";
};
Scrolling = {
HistoryMode = 2;
ScrollBarPosition = 2;
};
"Terminal Features".BlinkingCursorEnabled = true;
};
"konsole/generated.colorscheme".text = genIni {
General = {
Description = "generated";
Opacity = 1;
Wallpaper = "";
};
Background.Color = thmDec.bg;
BackgroundIntense.Color = thmDec.bg;
Foreground.Color = thmDec.fg;
Color0.Color = thmDec.dark;
Color0Intense.Color = thmDec.alt;
Color1.Color = thmDec.red;
Color2.Color = thmDec.green;
Color3.Color = thmDec.yellow;
Color4.Color = thmDec.blue;
Color5.Color = thmDec.purple;
Color6.Color = thmDec.cyan;
Color7.Color = thmDec.fg;
};
};
home-manager.users.balsoft.xdg.configFile."konsolerc.home".text = genIni {
"Desktop Entry".DefaultProfile = "Default.profile";
KonsoleWindow = {
SaveGeometryOnExit = false;
ShowMenuBarByDefault = false;
UseSingleInstance = true;
};
};
home-manager.users.balsoft.home.activation.konsole = {
data = "$DRY_RUN_CMD cp -f ~/.config/konsolerc.home ~/.config/konsolerc";
before = [ ];
after = [ "linkGeneration" ];
};
}

View File

@ -0,0 +1,19 @@
{ pkgs, config, lib, ... }:
with import ../../support.nix { inherit lib config; }; {
nixpkgs.overlays = [
(self: super: {
spectral = super.spectral.overrideAttrs (oldAttrs: {
prePatch = ''
sed -i \
-e s/#303030/${config.themes.colors.bg}/ \
-e s/#009DC2/${config.themes.colors.alt}/ \
-e s/#673AB7/${config.themes.colors.alt}/ \
-e s/#4285F4/${config.themes.colors.gray}/ \
-e s/#242424/${config.themes.colors.bg}/ \
-e 's/"#ff2b00", "#ff5500", "#ff8000", "#ffaa00", "#ffd500", "#ffff00", "#d4ff00", "#aaff00", "#80ff00", "#55ff00", "#2bff00", "#00ff00", "#00ff2b", "#00ff55", "#00ff80", "#00ffaa", "#00ffd5", "#00ffff", "#00d4ff", "#00aaff", "#007fff", "#0055ff", "#002bff", "#0000ff", "#2a00ff", "#5500ff", "#7f00ff", "#aa00ff", "#d400ff", "#ff00ff", "#ff00d4", "#ff00aa", "#ff0080", "#ff0055", "#ff002b", "#ff0000"/"${config.themes.colors.alt}"/' \
$(find . -name "*.qml")
'';
});
})
];
}

View File

@ -3,7 +3,7 @@ device:
imports = [
./applications/packages.nix
./applications/emacs
./applications/konsole.nix
./applications/alacritty.nix
./applications/sylpheed.nix
./applications/weechat.nix
./applications/okular.nix

View File

@ -55,28 +55,6 @@
}
'';
};
# systemd.services.mautrix-telegram = {
# description = "A bridge between telegram and matrix";
# requires = [ "matrix-synapse.service" ];
# path = with pkgs; [ coreutils mautrix-telegram ];
# serviceConfig = {
# Restart = "always";
# RestartSec = 1;
# };
# wantedBy = [ "network-online.target" ];
# script = ''
# mkdir -p /var/lib/mautrix-telegram
# cp -r ${pkgs.mautrix-telegram}/* /var/lib/mautrix-telegram
# cd /var/lib/mautrix-telegram
# alembic upgrade head || echo "update failed"
# sleep 5
# cp ${
# builtins.toFile "config.yaml"
# (builtins.toJSON config.secrets.matrix.mautrix-telegram.config)
# } ./config.yaml
# timeout 900 mautrix-telegram
# '';
# };
services.mautrix-telegram = {
enable = true;

Binary file not shown.