Add dim colours to qmltermwidget
This commit is contained in:
parent
4bca58e145
commit
e52dcef401
@ -635,11 +635,11 @@
|
||||
"nixpkgs-regression": "nixpkgs-regression"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1676450680,
|
||||
"narHash": "sha256-wOd+EPkY6VpxeIf+bCuV2lHleSoK0hI/hTsvJ6Ntf6Q=",
|
||||
"owner": "nixos",
|
||||
"lastModified": 1676289739,
|
||||
"narHash": "sha256-bF7At5pQq1ggxwbYRSAgB36p+dzwDVpHpggl/xcWvaA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nix",
|
||||
"rev": "601849b95afc3d173ea34ff5dba6353f9b71b495",
|
||||
"rev": "c205d10c669137da90c176669838a6c6d9158939",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
25
lib.nix
25
lib.nix
@ -49,11 +49,36 @@ lib: rec {
|
||||
F = f;
|
||||
};
|
||||
|
||||
dec2hexDigits = lib.mapAttrs' (lib.flip lib.nameValuePair)
|
||||
(builtins.mapAttrs (_: toString) hex2decDigits);
|
||||
|
||||
doubleDigitHexToDec = hex:
|
||||
16 * hex2decDigits."${builtins.substring 0 1 hex}"
|
||||
+ hex2decDigits."${builtins.substring 1 2 hex}";
|
||||
|
||||
decToHex = n: dec2hexDigits.${toString (builtins.div n 16)} + dec2hexDigits.${toString (builtins.mod n 16)};
|
||||
|
||||
thmDec = builtins.mapAttrs (name: color: colorHex2Dec color);
|
||||
thmHash = builtins.mapAttrs (name: color: "#${color}");
|
||||
|
||||
triplet2RGB = lst: {
|
||||
r = builtins.elemAt lst 0;
|
||||
g = builtins.elemAt lst 1;
|
||||
b = builtins.elemAt lst 2;
|
||||
};
|
||||
|
||||
hex2RGB = color: triplet2RGB (map doubleDigitHexToDec (splitHex color));
|
||||
dec2RGB = color: triplet2RGB (map (builtins.fromJSON) (lib.splitString "," color));
|
||||
|
||||
RGB2hex = { r, g, b }: decToHex r + decToHex g + decToHex b;
|
||||
RGB2dec = { r, g, b }: lib.concatMapStringsSep "," toString [ r g b ];
|
||||
|
||||
mulRGB = factor: builtins.mapAttrs (_: x: builtins.floor (x * factor));
|
||||
|
||||
mulHex = factor: color: RGB2hex (mulRGB factor (hex2RGB color));
|
||||
|
||||
mulDec = factor: color: RGB2dec (mulRGB factor (dec2RGB color));
|
||||
|
||||
colorHex2Dec = color:
|
||||
builtins.concatStringsSep ","
|
||||
(map (x: toString (doubleDigitHexToDec x)) (splitHex color));
|
||||
|
@ -21,6 +21,7 @@
|
||||
helix
|
||||
angelfish
|
||||
nix
|
||||
qmlkonsole
|
||||
|
||||
kdeconnect
|
||||
cursor
|
||||
|
50
overlay.nix
50
overlay.nix
@ -139,11 +139,49 @@ in rec {
|
||||
|
||||
helix = inputs.helix.packages.${final.system}.default;
|
||||
|
||||
plasma5Packages = prev.plasma5Packages.overrideScope' (final': _: {
|
||||
qmlkonsole = final'.callPackage (final.fetchurl {
|
||||
url =
|
||||
"https://raw.githubusercontent.com/NixOS/nixpkgs/551245d6c4636862f91ba4a0e94b8120b7e8d4d4/pkgs/applications/plasma-mobile/qmlkonsole.nix";
|
||||
sha256 = "04vy12x0wjhr1c77dlhvghmlkb6aaq5dfqg1fwc5p6ma9nxqdwic";
|
||||
}) { };
|
||||
plasma5Packages = prev.plasma5Packages.overrideScope' (final': prev': {
|
||||
qmltermwidget = prev'.qmltermwidget.overrideAttrs (_: {
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "balsoft";
|
||||
repo = "qmltermwidget";
|
||||
rev = "39911727b7ce70a100aad84c1cdae9ab0ead1d6b";
|
||||
hash = "sha256-Y+e9WjkXl38tbJq5D2BH0wJ0157yBiQ3vfRYO6rwnoU=";
|
||||
};
|
||||
patches = [ ];
|
||||
});
|
||||
|
||||
qmlkonsole = final'.callPackage ({ lib, mkDerivation, cmake
|
||||
, extra-cmake-modules, kconfig, ki18n, kirigami-addons, kirigami2
|
||||
, kcoreaddons, qtquickcontrols2, kwindowsystem, qmltermwidget }:
|
||||
|
||||
mkDerivation {
|
||||
pname = "qmlkonsole";
|
||||
|
||||
inherit ((final.callPackage
|
||||
"${inputs.nixpkgs}/pkgs/applications/plasma-mobile/srcs.nix" {
|
||||
mirror = "mirror://kde";
|
||||
}).qmlkonsole)
|
||||
version src;
|
||||
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules ];
|
||||
|
||||
buildInputs = [
|
||||
kconfig
|
||||
ki18n
|
||||
kirigami-addons
|
||||
kirigami2
|
||||
qtquickcontrols2
|
||||
kcoreaddons
|
||||
kwindowsystem
|
||||
qmltermwidget
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Terminal app for Plasma Mobile";
|
||||
homepage = "https://invent.kde.org/plasma-mobile/qmlkonsole";
|
||||
license = with licenses; [ gpl2Plus gpl3Plus cc0 ];
|
||||
maintainers = with maintainers; [ balsoft ];
|
||||
};
|
||||
}) { };
|
||||
});
|
||||
}
|
||||
|
@ -7,8 +7,6 @@
|
||||
home-manager.users.balsoft = {
|
||||
xdg.configFile.angelfishrc.text = pkgs.lib.generators.toGitINI {
|
||||
NavigationBar = {
|
||||
navBarBack = true;
|
||||
navBarForward = true;
|
||||
navBarReload = true;
|
||||
};
|
||||
};
|
||||
|
142
profiles/applications/qmlkonsole.nix
Normal file
142
profiles/applications/qmlkonsole.nix
Normal file
@ -0,0 +1,142 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
environment.systemPackages = [ pkgs.plasma5Packages.qmlkonsole ];
|
||||
defaultApplications.term = {
|
||||
cmd = "${pkgs.plasma5Packages.qmlkonsole}/bin/qmlkonsole";
|
||||
desktop = "org.kde.qmlkonsole";
|
||||
};
|
||||
environment.variables.COLORSCHEMES_DIRS = pkgs.writeTextFile {
|
||||
name = "qmlkonsole-generated-theme";
|
||||
destination = "/Generated.colorscheme";
|
||||
text = with pkgs.my-lib;
|
||||
with (thmDec config.themes.colors);
|
||||
let dim = mulDec 0.66;
|
||||
in lib.generators.toGitINI {
|
||||
General.Description = "Generated Color Scheme";
|
||||
Background = {
|
||||
Bold = false;
|
||||
Color = base00;
|
||||
};
|
||||
BackgroundIntense = {
|
||||
Bold = false;
|
||||
Color = base03;
|
||||
};
|
||||
Color0 = {
|
||||
Bold = false;
|
||||
Color = base00;
|
||||
};
|
||||
Color1 = {
|
||||
Bold = false;
|
||||
Color = base08;
|
||||
};
|
||||
Color2 = {
|
||||
Bold = false;
|
||||
Color = base0B;
|
||||
};
|
||||
Color3 = {
|
||||
Bold = false;
|
||||
Color = base0A;
|
||||
};
|
||||
Color4 = {
|
||||
Bold = false;
|
||||
Color = base0D;
|
||||
};
|
||||
Color5 = {
|
||||
Bold = false;
|
||||
Color = base0E;
|
||||
};
|
||||
Color6 = {
|
||||
Bold = false;
|
||||
Color = base0C;
|
||||
};
|
||||
Color7 = {
|
||||
Bold = false;
|
||||
Color = base07;
|
||||
};
|
||||
Foreground = {
|
||||
Bold = false;
|
||||
Color = base05;
|
||||
};
|
||||
Color0Faint = {
|
||||
Bold = false;
|
||||
Color = dim base00;
|
||||
};
|
||||
Color1Faint = {
|
||||
Bold = false;
|
||||
Color = dim base08;
|
||||
};
|
||||
Color2Faint = {
|
||||
Bold = false;
|
||||
Color = dim base0B;
|
||||
};
|
||||
Color3Faint = {
|
||||
Bold = false;
|
||||
Color = dim base0A;
|
||||
};
|
||||
Color4Faint = {
|
||||
Bold = false;
|
||||
Color = dim base0D;
|
||||
};
|
||||
Color5Faint = {
|
||||
Bold = false;
|
||||
Color = dim base0E;
|
||||
};
|
||||
Color6Faint = {
|
||||
Bold = false;
|
||||
Color = dim base0C;
|
||||
};
|
||||
Color7Faint = {
|
||||
Bold = false;
|
||||
Color = dim base07;
|
||||
};
|
||||
ForegroundFaint = {
|
||||
Bold = false;
|
||||
Color = dim base05;
|
||||
};
|
||||
Color0Intense = {
|
||||
Bold = false;
|
||||
Color = base00;
|
||||
};
|
||||
Color1Intense = {
|
||||
Bold = false;
|
||||
Color = base08;
|
||||
};
|
||||
Color2Intense = {
|
||||
Bold = false;
|
||||
Color = base0B;
|
||||
};
|
||||
Color3Intense = {
|
||||
Bold = false;
|
||||
Color = base0A;
|
||||
};
|
||||
Color4Intense = {
|
||||
Bold = false;
|
||||
Color = base0D;
|
||||
};
|
||||
Color5Intense = {
|
||||
Bold = false;
|
||||
Color = base0E;
|
||||
};
|
||||
Color6Intense = {
|
||||
Bold = false;
|
||||
Color = base0C;
|
||||
};
|
||||
Color7Intense = {
|
||||
Bold = false;
|
||||
Color = base07;
|
||||
};
|
||||
ForegroundIntense = {
|
||||
Bold = false;
|
||||
Color = base05;
|
||||
};
|
||||
};
|
||||
};
|
||||
home-manager.users.balsoft = {
|
||||
xdg.configFile.qmlkonsolerc.text = lib.generators.toGitINI {
|
||||
General = {
|
||||
colorScheme = "Generated";
|
||||
fontFamily = config.themes.fonts.mono.family;
|
||||
fontSize = config.themes.fonts.mono.size;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -8,16 +8,11 @@
|
||||
|
||||
optimise.automatic = true;
|
||||
|
||||
extraOptions = ''
|
||||
builders-use-substitutes = true
|
||||
# Enable flakes
|
||||
experimental-features = nix-command flakes
|
||||
# Prevent Nix from fetching the registry every time
|
||||
flake-registry = ${inputs.flake-registry}/flake-registry.json
|
||||
'';
|
||||
|
||||
settings = {
|
||||
use-xdg-base-directories = true;
|
||||
builders-use-substitutes = true;
|
||||
flake-registry = "${inputs.flake-registry}/flake-registry.json";
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
trusted-users = [ "root" "balsoft" "@wheel" ];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
|
@ -25,6 +25,12 @@
|
||||
powerManagement.enable = true;
|
||||
|
||||
home-manager.users.balsoft = {
|
||||
home.activation.removeGtkRc = {
|
||||
data = "rm $HOME/.gtkrc-2.0";
|
||||
before = [ "checkLinkTargets" ];
|
||||
after = [];
|
||||
};
|
||||
|
||||
xdg.configFile."autostart/org_kde_powerdevil.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
DBusActivatable=true
|
||||
|
@ -156,7 +156,7 @@
|
||||
if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then
|
||||
# The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE
|
||||
# ornaments defined above.
|
||||
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=238
|
||||
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=8
|
||||
# Start filler from the edge of the screen if there are no left segments on the first line.
|
||||
typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'
|
||||
# End filler on the edge of the screen if there are no right segments on the first line.
|
||||
|
Loading…
Reference in New Issue
Block a user