everforest and titlebar fix

This commit is contained in:
atagen 2023-05-21 21:07:49 +10:00
parent 707157c0fe
commit d20d3d8310
5 changed files with 78 additions and 29 deletions

View file

@ -93,8 +93,8 @@ in {
gtk-theme.name
fonts.sans.name
icons.name
palette-shex.bright.yellow
palette-shex.bright.black
palette-shex.util.fg
palette-shex.normal.black
(builtins.toString borders.thickness)
(builtins.toString borders.rounding)
]
@ -324,7 +324,7 @@ in {
programs.helix = {
enable = true;
settings = {
theme = "kanagawa";
theme = "everforest_dark";
editor.lsp.display-messages = true;
};
};

View file

@ -1,10 +1,18 @@
#!/usr/bin/env bash
limit=128
socat -u UNIX-CLIENT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock STDOUT |
while read line; do
if [[ "$line" == activewindow\>\>* ]]; then
windowtitle="$(echo $line | cut -d',' -f 2)"
echo '{"title": "'$windowtitle'"}'
windowtitle="$(printf $line | cut -d',' -f 2)"
apptitle="$(printf $line | cut -d',' -f 1 | cut -d'>' -f 3)"
combined="$windowtitle - $apptitle"
if [[ "${#combined}" -lt $limit ]]; then
printf '{"title": "'$combined'"}'
else
clipto=$((limit-${#apptitle}))
printf '{"title": "'"${windowtitle:0:$clipto} - $apptitle"'"}'
fi
fi
done

View file

@ -1,8 +1,8 @@
{pkgs, ...}: {
hyprland-system76-scheduler-integration = pkgs.callPackage ./hyprland-system76-scheduler-integration.nix {};
culr = pkgs.callPackage ./culr.nix {};
kanagawa-theme = pkgs.callPackage ./kanagawa-theme.nix {};
kanagawa-icons = pkgs.callPackage ./kanagawa-icons.nix {};
everforest-theme = pkgs.callPackage ./everforst-theme.nix {};
# kanagawa-icons = pkgs.callPackage ./kanagawa-icons.nix {};
# gruvbox-kvantum = pkgs.callPackage ./gruvbox-kvantum.nix {};
# gruvbox-gtk-theme = pkgs.callPackage ./gruvbox-gtk-theme.nix {};
# system76-scheduler = pkgs.callPackage ./system76-scheduler.nix {};

35
pkgs/everforst-theme.nix Normal file
View file

@ -0,0 +1,35 @@
{
stdenv,
fetchFromGitHub,
lib,
gnome-themes-extra,
gtk-engine-murrine,
gtk_engines,
}:
stdenv.mkDerivation rec {
pname = "everforest-gtk-theme";
version = "unstable-2023-03-20";
src = fetchFromGitHub {
owner = "Fausto-Korpsvart";
repo = "Everforest-GTK-Theme";
rev = "8481714cf9ed5148694f1916ceba8fe21e14937b";
sha256 = "sha256-NO12ku8wnW/qMHKxi5TL/dqBxH0+cZbe+fU0iicb9JU=";
};
buildInputs = [
gnome-themes-extra # adwaita engine for Gtk2
gtk_engines # pixmap engine for Gtk2
];
propagatedUserEnvPkgs = [
gtk-engine-murrine # murrine engine for Gtk2
];
installPhase = ''
runHook preInstall
mkdir -p $out/share/themes
cp -a themes/Everforest-Dark-B $out/share/themes/Everforest-Dark
runHook postInstall
'';
}

View file

@ -1,11 +1,12 @@
final: prev:
with prev.lib.nix-rice; let
theme = kitty-themes.parseTheme (
builtins.fetchurl {
url = "https://github.com/rebelot/kanagawa.nvim/blob/master/extras/kanagawa.conf?raw=true";
sha256 = "1r95lkq24a2ygrjv1mkqfrksgfvnyc16xrsldw04phnsa555x51l";
}
);
# theme = kitty-themes.parseTheme (
# builtins.fetchurl {
# url = "https://github.com/rebelot/kanagawa.nvim/blob/master/extras/kanagawa.conf?raw=true";
# sha256 = "1r95lkq24a2ygrjv1mkqfrksgfvnyc16xrsldw04phnsa555x51l";
# }
# );
theme = kitty-themes.getThemeByName "everforest_dark_hard";
in rec {
rice = {
palette =
@ -23,17 +24,23 @@ in rec {
white = theme.color7;
};
bright =
palette.defaultPalette
palette.brighten 15 normal
// {
black = theme.color8;
red = theme.color9;
green = theme.color10;
yellow = theme.color11;
blue = theme.color12;
magenta = theme.color13;
cyan = theme.color14;
white = theme.color15;
};
# bright =
# palette.defaultPalette
# // {
# black = theme.color8;
# red = theme.color9;
# green = theme.color10;
# yellow = theme.color11;
# blue = theme.color12;
# magenta = theme.color13;
# cyan = theme.color14;
# white = theme.color15;
# };
util =
palette.defaultPalette
// {
@ -78,19 +85,18 @@ in rec {
};
icons = rec {
name = "Kanagawa";
package = final.kanagawa-icons;
name = "Papirus-Dark";
package = final.papirus-icon-theme;
pkgs = with final; [
package
papirus-icon-theme
material-icons
material-design-icons
# material-icons
# material-design-icons
];
};
gtk-theme = {
name = "Kanagawa";
package = final.kanagawa-theme;
name = "Everforest-Dark";
package = final.everforest-theme;
};
@ -101,8 +107,8 @@ in rec {
bg = {
image = prev.fetchurl {
url = "https://upload.wikimedia.org/wikipedia/commons/0/0a/The_Great_Wave_off_Kanagawa.jpg";
sha256 = "sha256-RKhIar3wMwo/5rWG5AdQbnOP4HX+C138Q5YeNY/acgY=";
url = "https://github.com/Apeiros-46B/everforest-walls/blob/main/close_up/circuit_1.png?raw=true";
sha256 = "sha256-5V9XlJtC8n3zZueg5y/pWW1Oz75YPcEydLU/E/+z+2k=";
};
};
}; # /rice