Added style config to waybar, removed chscheme.sh because I figured out you can escape vars in bash that use
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
imports =
|
||||
[(import ./gtk.nix)]
|
||||
++ [(import ./spicetify.nix)]
|
||||
++ [(import ./stylix.nix)]
|
||||
++ [(import ./starship.nix)]
|
||||
++ [(import ./userpkgs.nix)]
|
||||
++ [(import ./zshell.nix)]
|
||||
|
||||
19
modules/home/environment/stylix.nix
Normal file
19
modules/home/environment/stylix.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
pkgs,
|
||||
scheme,
|
||||
wallpaper,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = true;
|
||||
targets = {
|
||||
# fzf.enable = true;
|
||||
# kitty.enable = true;
|
||||
# vesktop.enable = true;
|
||||
waybar.enable = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
# Grocery list:
|
||||
@@ -34,6 +33,9 @@ in
|
||||
output = "DP-1";
|
||||
position = "top";
|
||||
name = "mainBar";
|
||||
margin-left = 8;
|
||||
margin-top = 5;
|
||||
margin-right = 8;
|
||||
mode = "dock";
|
||||
|
||||
modules-left = [
|
||||
@@ -41,12 +43,11 @@ in
|
||||
"cava"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/disk-icon"
|
||||
"memory"
|
||||
"cpu"
|
||||
"group/hardware"
|
||||
"clock"
|
||||
"group/powerbtns"
|
||||
];
|
||||
|
||||
@@ -71,11 +72,20 @@ in
|
||||
format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" ];
|
||||
};
|
||||
|
||||
"group/hardware" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"custom/disk-icon"
|
||||
"memory"
|
||||
"cpu"
|
||||
];
|
||||
};
|
||||
|
||||
"custom/disk-icon" = {
|
||||
exec = ''
|
||||
df /dev/disk/by-partlabel/disk-main-home | awk '$6 == "/home" {printf "{\"class\": \"disk-icon\", \"tooltip\": \"/home: %.1fGB / %.1fTB\", \"percentage\": \"%.0f\"}\n", $3 / 1024 / 1024, $2 / 1024 / 1024 / 1024, $5}' | jq --unbuffered --compact-output
|
||||
'';
|
||||
interval = 300;
|
||||
interval = 60;
|
||||
return-type = "json";
|
||||
rotate = 270;
|
||||
format = "{icon}";
|
||||
@@ -92,6 +102,7 @@ in
|
||||
"" "" "" "" "" "" "" "" ""
|
||||
];
|
||||
max-length = 10;
|
||||
tooltip-format = "RAM: {used:0.1f} GB / {total:0.1f} GB";
|
||||
};
|
||||
|
||||
cpu = {
|
||||
@@ -101,6 +112,7 @@ in
|
||||
format-icons = [
|
||||
"" "" "" "" "" "" "" "" ""
|
||||
];
|
||||
tooltip-format = "CPU: {usage:0.1f}%";
|
||||
};
|
||||
|
||||
"custom/power" = {
|
||||
@@ -135,6 +147,10 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "{:%I:%M %p}";
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -144,6 +160,9 @@ in
|
||||
layer = "bottom";
|
||||
output = "HDMI-A-1";
|
||||
position = "right";
|
||||
margin-top = 8;
|
||||
margin-right = 5;
|
||||
margin-bottom = 8;
|
||||
name = "sideBar";
|
||||
mode = "dock";
|
||||
|
||||
@@ -151,12 +170,10 @@ in
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
modules-center = [
|
||||
"tray"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio/slider"
|
||||
"pulseaudio"
|
||||
"network"
|
||||
"group/audio"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = workspaces;
|
||||
@@ -165,6 +182,14 @@ in
|
||||
orientation = "vertical";
|
||||
};
|
||||
|
||||
"group/audio" = {
|
||||
orientation = "vertical";
|
||||
modules = [
|
||||
"pulseaudio/slider"
|
||||
"pulseaudio"
|
||||
];
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon}";
|
||||
format-muted = " ";
|
||||
|
||||
@@ -29,5 +29,148 @@ let
|
||||
in
|
||||
{
|
||||
programs.waybar.style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-size: 16px;
|
||||
font-family: "JetBrains Mono Nerd Font";
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
border-radius: 20px;
|
||||
border: 3px solid #${colors.color7};
|
||||
background: rgba(46,52,64,0.9);
|
||||
margin: 20px;
|
||||
}
|
||||
window#waybar.empty #window {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 3px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background: #${fg.lightester};
|
||||
border-radius: 20px;
|
||||
color: #${bg.darkest};
|
||||
}
|
||||
|
||||
#cava {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px 3px 3px 6px;
|
||||
padding: 0px 15px 0px 15px;
|
||||
color: #${colors.color6};
|
||||
}
|
||||
|
||||
#window {
|
||||
margin: 3px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
padding: 0 15px 0 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#hardware {
|
||||
margin: 3px;
|
||||
padding: 0 10px 0 10px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#custom-disk-icon, #cpu, #memory {
|
||||
margin-bottom: 4px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#custom-disk-icon {
|
||||
color: #${colors.color4};
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: #${colors.color1};
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: #${colors.color3};
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 0 10px 0 10px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#powerbtns {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 0 5px 0 10px;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
color: #${colors.color0};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#custom-logout {
|
||||
color: #${colors.color4};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#custom-reboot {
|
||||
color: #${colors.color2};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#audio {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 5px 0 10px 0;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #${colors.color4};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#pulseaudio-slider slider {
|
||||
background: #${colors.color4};
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#pulseaudio-slider trough {
|
||||
min-width: 9px;
|
||||
min-height: 90px;
|
||||
border-radius: 8px;
|
||||
background: #343434;
|
||||
}
|
||||
|
||||
#pulseaudio-slider highlight {
|
||||
border-radius: 8px;
|
||||
background-color: #2096C0;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: #${colors.color3};
|
||||
font-size: 20px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 5px 0 5px 6px;
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
{
|
||||
pkgs,
|
||||
}:
|
||||
pkgs.writeShellScriptBin "chscheme" (builtins.readFile ./chscheme.sh)
|
||||
|
||||
pkgs.writeShellScriptBin "chscheme" ''
|
||||
/usr/bin/env ls "$(nix-build '<nixpkgs>' -A base16-schemes)"/share/themes | \
|
||||
sed 's/\.yaml//g' | \
|
||||
fzf --preview 'cat $(nix-build "<nixpkgs>" -A base16-schemes)/share/themes/{}.yaml | \
|
||||
while IFS=": " read -r key value; do \
|
||||
if [[ $key =~ base0[0-9A-F] ]]; then \
|
||||
clean_value=$(echo $value | tr -d "\""); \
|
||||
r=$((16#''${clean_value:0:2})); \
|
||||
g=$((16#''${clean_value:2:2})); \
|
||||
b=$((16#''${clean_value:4:2})); \
|
||||
printf "\033[48;2;%d;%d;%dm %-20s %s \033[0m\n" $r $g $b $key $clean_value; \
|
||||
fi; \
|
||||
done' | xargs -I {} sed -i '/base16scheme \=/s/\".*\"/\"{}\"/' "$HOME"/.sysflake/flake.nix && \
|
||||
echo "Successfully changed system color scheme. Rebuild now?" && \
|
||||
select choice in "Yes" "No"; do
|
||||
case $choice in
|
||||
"Yes")
|
||||
rebuild;exit 0;;
|
||||
"No")
|
||||
echo "Exiting...";exit 0;;
|
||||
esac
|
||||
done
|
||||
''
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
/usr/bin/env ls "$(nix-build '<nixpkgs>' -A base16-schemes)"/share/themes | \
|
||||
sed 's/\.yaml//g' | \
|
||||
fzf --preview 'cat $(nix-build "<nixpkgs>" -A base16-schemes)/share/themes/{}.yaml | \
|
||||
while IFS=": " read -r key value; do \
|
||||
if [[ $key =~ base0[0-9A-F] ]]; then \
|
||||
clean_value=$(echo $value | tr -d "\""); \
|
||||
r=$((16#${clean_value:0:2})); \
|
||||
g=$((16#${clean_value:2:2})); \
|
||||
b=$((16#${clean_value:4:2})); \
|
||||
printf "\033[48;2;%d;%d;%dm %-20s %s \033[0m\n" $r $g $b $key $clean_value; \
|
||||
fi; \
|
||||
done' | xargs -I {} sed -i '/base16scheme \=/s/\".*\"/\"{}\"/' "$HOME"/.sysflake/flake.nix && \
|
||||
echo "Successfully changed system color scheme. Rebuild now?" && \
|
||||
select choice in "Yes" "No"; do
|
||||
case $choice in
|
||||
"Yes")
|
||||
rebuild;exit 0;;
|
||||
"No")
|
||||
echo "Exiting...";exit 0;;
|
||||
esac
|
||||
done
|
||||
@@ -3,7 +3,7 @@
|
||||
scheme,
|
||||
wallpaper,
|
||||
...
|
||||
}:
|
||||
}:
|
||||
|
||||
{
|
||||
stylix = {
|
||||
@@ -19,7 +19,6 @@
|
||||
grub.enable = true;
|
||||
gtk.enable = true;
|
||||
nixos-icons.enable = true;
|
||||
nixvim.enable = false;
|
||||
};
|
||||
cursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
|
||||
@@ -4,24 +4,24 @@
|
||||
programs.nixvim = {
|
||||
colorschemes.base16 = {
|
||||
enable = true;
|
||||
colorscheme = {
|
||||
base00 = "#${scheme.base00}";
|
||||
base01 = "#${scheme.base01}";
|
||||
base02 = "#${scheme.base02}";
|
||||
base03 = "#${scheme.base03}";
|
||||
base04 = "#${scheme.base04}";
|
||||
base05 = "#${scheme.base05}";
|
||||
base06 = "#${scheme.base06}";
|
||||
base07 = "#${scheme.base07}";
|
||||
base08 = "#${scheme.base08}";
|
||||
base09 = "#${scheme.base09}";
|
||||
base0A = "#${scheme.base0A}";
|
||||
base0B = "#${scheme.base0B}";
|
||||
base0C = "#${scheme.base0C}";
|
||||
base0D = "#${scheme.base0D}";
|
||||
base0E = "#${scheme.base0E}";
|
||||
base0F = "#${scheme.base0F}";
|
||||
};
|
||||
#colorscheme = {
|
||||
# base00 = "#${scheme.base00}";
|
||||
# base01 = "#${scheme.base01}";
|
||||
# base02 = "#${scheme.base02}";
|
||||
# base03 = "#${scheme.base03}";
|
||||
# base04 = "#${scheme.base04}";
|
||||
# base05 = "#${scheme.base05}";
|
||||
# base06 = "#${scheme.base06}";
|
||||
# base07 = "#${scheme.base07}";
|
||||
# base08 = "#${scheme.base08}";
|
||||
# base09 = "#${scheme.base09}";
|
||||
# base0A = "#${scheme.base0A}";
|
||||
# base0B = "#${scheme.base0B}";
|
||||
# base0C = "#${scheme.base0C}";
|
||||
# base0D = "#${scheme.base0D}";
|
||||
# base0E = "#${scheme.base0E}";
|
||||
# base0F = "#${scheme.base0F}";
|
||||
#};
|
||||
};
|
||||
enable = true;
|
||||
diagnostics.signs = false;
|
||||
|
||||
Reference in New Issue
Block a user