Update stylix scheme and refactor Hyprland configuration with new waybar setup
This commit is contained in:
parent
04019415bd
commit
93f7e78540
@ -9,7 +9,7 @@ let
|
||||
schemesFile = import ./schemes.nix {
|
||||
inherit pkgs inputs;
|
||||
};
|
||||
scheme = schemesFile.schemes.paul3;
|
||||
scheme = schemesFile.schemes.febroary;
|
||||
cfg = config.my.stylix;
|
||||
gnomeEnabled = config.services.xserver.desktopManager.gnome.enable;
|
||||
in
|
||||
|
||||
@ -4,33 +4,9 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
# misc
|
||||
mod = "SUPER";
|
||||
# waybar
|
||||
inherit (config.lib.stylix) colors;
|
||||
net-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
generic-percent-icons = [
|
||||
"▁"
|
||||
"▂"
|
||||
"▃"
|
||||
"▄"
|
||||
"▅"
|
||||
"▆"
|
||||
"▇"
|
||||
"█"
|
||||
];
|
||||
temp-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
waybarConfig = import ./waybar-config.nix { inherit pkgs config; };
|
||||
waybarStyle = import ./waybar-style.nix { inherit config; };
|
||||
in
|
||||
{
|
||||
programs.hyprland.enable = true;
|
||||
@ -41,12 +17,6 @@ in
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
};
|
||||
users.users.jawz.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
# Wayland utilities
|
||||
@ -59,6 +29,8 @@ in
|
||||
swaylock-effects # screen locker
|
||||
yazi # file manager
|
||||
imv # images
|
||||
|
||||
playerctl # media player control
|
||||
;
|
||||
};
|
||||
home-manager.users.jawz = {
|
||||
@ -72,108 +44,8 @@ in
|
||||
width = "30%";
|
||||
};
|
||||
};
|
||||
waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings.main-bar = {
|
||||
layer = "top";
|
||||
tray.spacing = 5;
|
||||
clock.format = "{:%H:%M %F}";
|
||||
modules-left = [
|
||||
"niri/workspaces"
|
||||
"custom/sep"
|
||||
"niri/window"
|
||||
];
|
||||
modules-center = [
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"cpu"
|
||||
"temperature"
|
||||
"memory"
|
||||
"backlight"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"custom/recorder"
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
"hyprland/window".icon = true;
|
||||
"niri/window".icon = true;
|
||||
"niri/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
active = "";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
cava = {
|
||||
format-icons = generic-percent-icons;
|
||||
bars = 14;
|
||||
method = "pulse";
|
||||
framerate = 20;
|
||||
bar_delimiter = 0;
|
||||
stereo = false;
|
||||
};
|
||||
network = {
|
||||
format = "{icon} {ipaddr}";
|
||||
format-icons = net-icons;
|
||||
};
|
||||
# pulseaudio = {
|
||||
# format = "{icon} {volume}%";
|
||||
# format-muted = "vol: muted";
|
||||
# format-icons.default = audio-icons;
|
||||
# on-click = "pavucontrol";
|
||||
# scroll-step = 1;
|
||||
# };
|
||||
cpu = {
|
||||
interval = 1;
|
||||
format = " {icon}";
|
||||
format-icons = generic-percent-icons;
|
||||
tooltip-format = "usage: {usage}%\nload: {load}";
|
||||
};
|
||||
memory = {
|
||||
interval = 1;
|
||||
format = " {icon}";
|
||||
format-icons = generic-percent-icons;
|
||||
tooltip-format = "{used} GiB / {total} GiB \n{percentage}%";
|
||||
};
|
||||
temperature = {
|
||||
interval = 1;
|
||||
critical-threshold = 80;
|
||||
format = "{temperatureC}°C";
|
||||
format-icons = temp-icons;
|
||||
};
|
||||
mpris = {
|
||||
format = "{status_icon} {dynamic}";
|
||||
dynamic-len = 60;
|
||||
interval = 5;
|
||||
status-icons = {
|
||||
paused = "";
|
||||
playing = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
font-family: "${config.stylix.fonts.monospace.name}";
|
||||
font-size: ${toString config.stylix.fonts.sizes.desktop}pt;
|
||||
color: #${colors.base04};
|
||||
}
|
||||
window#waybar {
|
||||
background: #${colors.base00};
|
||||
}
|
||||
.module {
|
||||
background: #${colors.base00};
|
||||
margin: 0px 5px 0px 5px;
|
||||
padding: 0px 0px 0px 5px;
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 0px;
|
||||
border-bottom: 0px none transparent;
|
||||
}
|
||||
'';
|
||||
waybar = waybarConfig.programs.waybar // {
|
||||
style = waybarStyle;
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
@ -185,6 +57,11 @@ in
|
||||
border_size = 3;
|
||||
layout = "dwindle";
|
||||
};
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
force_default_wallpaper = 0;
|
||||
};
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
|
||||
112
environments/waybar-config.nix
Normal file
112
environments/waybar-config.nix
Normal file
@ -0,0 +1,112 @@
|
||||
_: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings.main-bar = {
|
||||
layer = "top";
|
||||
height = 20;
|
||||
tray.spacing = 5;
|
||||
clock = {
|
||||
format = "{:%a %b %d %I:%M %p}";
|
||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"custom/separator"
|
||||
"temperature#cpu"
|
||||
"custom/gpu-temp"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"mpris"
|
||||
"wireplumber"
|
||||
"wireplumber#microphone"
|
||||
];
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
on-scroll-up = "hyprctl dispatch workspace e-1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e+1";
|
||||
persistent-workspaces."*" = 10; # Show 5 workspaces on all monitors
|
||||
};
|
||||
"custom/separator" = {
|
||||
format = "|";
|
||||
tooltip = false;
|
||||
};
|
||||
cava = {
|
||||
bars = 14;
|
||||
method = "pulse";
|
||||
framerate = 20;
|
||||
bar_delimiter = 0;
|
||||
stereo = false;
|
||||
format-icons.default = [
|
||||
"▁"
|
||||
"▂"
|
||||
"▃"
|
||||
"▄"
|
||||
"▅"
|
||||
"▆"
|
||||
"▇"
|
||||
"█"
|
||||
];
|
||||
};
|
||||
"temperature#cpu" = {
|
||||
interval = 2;
|
||||
format = " {temperatureC}°C";
|
||||
critical-threshold = 80;
|
||||
hwmon-path = "/sys/class/hwmon/hwmon1/temp1_input";
|
||||
tooltip-format = "CPU: {temperatureC}°C";
|
||||
};
|
||||
"custom/gpu-temp" = {
|
||||
exec = "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits";
|
||||
format = " {}°C";
|
||||
interval = 2;
|
||||
tooltip-format = "GPU: {}°C";
|
||||
};
|
||||
mpris = {
|
||||
interval = 2;
|
||||
format = "{player_icon} {dynamic}";
|
||||
format-paused = "{status_icon} {dynamic}";
|
||||
dynamic-len = 40;
|
||||
on-click = "playerctl play-pause";
|
||||
on-scroll-up = "playerctl next";
|
||||
on-scroll-down = "playerctl previous";
|
||||
dynamic-order = [
|
||||
"title"
|
||||
"artist"
|
||||
];
|
||||
player-icons = {
|
||||
default = "🎵";
|
||||
firefox = "🦊";
|
||||
librewolf = "🦊";
|
||||
};
|
||||
status-icons = {
|
||||
paused = "";
|
||||
playing = "";
|
||||
};
|
||||
};
|
||||
wireplumber = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = " muted";
|
||||
scroll-step = 5;
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
format-icons.default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
"wireplumber#microphone" = {
|
||||
format = "{format_source}";
|
||||
format-source = " {volume}%";
|
||||
format-source-muted = "";
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
on-scroll-up = "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%+";
|
||||
on-scroll-down = "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%-";
|
||||
tooltip-format = "{source_desc}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
43
environments/waybar-style.nix
Normal file
43
environments/waybar-style.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (config.lib.stylix) colors;
|
||||
in
|
||||
''
|
||||
* {
|
||||
border: none;
|
||||
font-family: "${config.stylix.fonts.monospace.name}";
|
||||
font-size: ${toString config.stylix.fonts.sizes.desktop}pt;
|
||||
color: #${colors.base04};
|
||||
}
|
||||
window#waybar {
|
||||
background: #${colors.base00};
|
||||
min-height: 20px;
|
||||
}
|
||||
.module {
|
||||
background: #${colors.base00};
|
||||
margin: 0px 5px 0px 5px;
|
||||
padding: 8px 8px 8px 8px;
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 2px 8px;
|
||||
margin: 2px;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
color: #${colors.base03};
|
||||
border: none;
|
||||
min-width: 20px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background: #${colors.base02};
|
||||
color: #${colors.base05};
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: #${colors.base01};
|
||||
color: #${colors.base04};
|
||||
}
|
||||
''
|
||||
@ -127,6 +127,7 @@ in
|
||||
services = {
|
||||
flatpak.enable = true;
|
||||
open-webui.enable = true;
|
||||
tailscale.enable = true;
|
||||
scx = {
|
||||
enable = true;
|
||||
scheduler = "scx_lavd";
|
||||
@ -150,6 +151,5 @@ in
|
||||
capSysAdmin = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
tailscale.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user