mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
311 lines
8.0 KiB
Nix
311 lines
8.0 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
imports = [
|
|
./swaync.nix
|
|
./swayosd.nix
|
|
];
|
|
|
|
wayland.windowManager.hyprland.settings.exec-once = ["waybar" "${pkgs.networkmanagerapplet}/bin/nm-applet" "${pkgs.blueman}/bin/blueman-applet"];
|
|
|
|
programs.waybar = {
|
|
enable = true;
|
|
systemd.enable = true;
|
|
settings.mainBar = {
|
|
spacing = 5;
|
|
margin-bottom = -11;
|
|
|
|
modules-left = ["hyprland/workspaces" "hyprland/window"];
|
|
modules-center = ["cava"];
|
|
modules-right = [
|
|
"group/extras"
|
|
"pulseaudio"
|
|
"battery"
|
|
"custom/notification"
|
|
"clock"
|
|
];
|
|
|
|
battery = {
|
|
states = {critical = 20;};
|
|
format = "{icon}";
|
|
format-icons = {
|
|
default = ["" "" "" "" "" "" "" "" "" ""];
|
|
charging = ["" "" "" "" "" "" "" "" "" ""];
|
|
};
|
|
format-full = "";
|
|
on-click = "powermode-toggle";
|
|
on-click-right = ''${pkgs.swayosd}/bin/swayosd-client --custom-message="Powermode is set to $(powerprofilesctl get)" --custom-icon="emblem-default"'';
|
|
};
|
|
|
|
cava = {
|
|
framerate = 240;
|
|
bars = 20;
|
|
bar_delimiter = 0;
|
|
stereo = true;
|
|
input_delay = 4;
|
|
sleep_timer = 2;
|
|
hide_on_silence = true;
|
|
lower_cutoff_freq = 100;
|
|
higher_cutoff_freq = 8000;
|
|
format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"];
|
|
};
|
|
|
|
clock = {
|
|
timezone = "Europe/Paris";
|
|
tooltip-format = "<span>{calendar}</span>";
|
|
calendar = {
|
|
mode = "month";
|
|
format = {
|
|
today = "<span color='#e7bbe4'><b>{}</b></span>";
|
|
days = "<span color='#cdd6f4'><b>{}</b></span>";
|
|
weekdays = "<span color='#7cd37c'><b>{}</b></span>";
|
|
months = "<b>{}</b>";
|
|
};
|
|
};
|
|
interval = 60;
|
|
max-length = 25;
|
|
on-click = "brave --profile-directory=Default --app-id=ojibjkjikcpjonjjngfkegflhmffeemk"; # Proton Calendar
|
|
};
|
|
|
|
"custom/arrow-toggle" = {
|
|
format = " {icon} ";
|
|
format-icons = {default = "";};
|
|
tooltip = false;
|
|
};
|
|
|
|
"custom/notification" = {
|
|
tooltip = false;
|
|
format = "{icon} {}";
|
|
format-icons = {
|
|
notification = "";
|
|
none = "";
|
|
dnd-notification = "";
|
|
dnd-none = "";
|
|
inhibited-notification = "";
|
|
inhibited-none = "";
|
|
dnd-inhibited-notification = "";
|
|
dnd-inhibited-none = "";
|
|
};
|
|
return-type = "json";
|
|
exec-if = "which swaync-client";
|
|
exec = "swaync-client -swb";
|
|
on-click = "swaync-client -t";
|
|
escape = true;
|
|
};
|
|
|
|
"group/extras" = {
|
|
orientation = "inherit";
|
|
drawer = {
|
|
transition-duration = 300;
|
|
transitition-left-to-right = false;
|
|
};
|
|
modules = ["custom/arrow-toggle" "tray"];
|
|
};
|
|
|
|
"hyprland/window" = {
|
|
format = "{}";
|
|
rewrite = {"^(.*?)[[:space:]]*[-—|].*?$" = "$1";};
|
|
icon = true;
|
|
icon-size = 20;
|
|
max-length = 30;
|
|
};
|
|
|
|
"hyprland/workspaces" = {
|
|
format = "{icon}";
|
|
format-active = " {icon} ";
|
|
all-outputs = true;
|
|
};
|
|
|
|
network = {
|
|
format = "{ifname}";
|
|
format-wifi = "{icon} {essid}";
|
|
format-ethernet = " Ethernet";
|
|
format-disconnected = " Disconnected ";
|
|
tooltip-format = "{ipaddr} {bandwidthUpBits} {bandwidthDownBits}";
|
|
format-linked = " {ifname} (No IP)";
|
|
format-icons = ["" "" "" "" ""];
|
|
on-click = "kitty --class nmtui-float-term nmtui";
|
|
};
|
|
|
|
pulseaudio = {
|
|
format = "{icon}";
|
|
format-muted = "";
|
|
format-icons = ["" "" ""];
|
|
on-click = "sound-toggle";
|
|
scroll-step = 1;
|
|
};
|
|
|
|
tray = {spacing = 10;};
|
|
};
|
|
|
|
style = ''
|
|
window#waybar {
|
|
background-color: transparent;
|
|
}
|
|
|
|
#workspaces{
|
|
background-color: transparent;
|
|
margin-top: 10px;
|
|
margin-bottom: 10px;
|
|
margin-right: 10px;
|
|
margin-left: 25px;
|
|
}
|
|
#workspaces button{
|
|
background-color: #${config.lib.stylix.colors.base05};
|
|
color: #${config.lib.stylix.colors.base00};
|
|
box-shadow: rgba(0, 0, 0, 0.116) 2 2 5 2px;
|
|
border-radius: 15px;
|
|
margin-right: 10px;
|
|
padding-top: 4px;
|
|
padding-bottom: 2px;
|
|
padding-right: 10px;
|
|
font-weight: bolder;
|
|
}
|
|
|
|
.modules-left #workspaces button {
|
|
border-bottom: 0px;
|
|
}
|
|
|
|
#workspaces button.active{
|
|
padding-right: 20px;
|
|
box-shadow: rgba(0, 0, 0, 0.288) 2 2 5 2px;
|
|
text-shadow: 0 0 5px rgba(0, 0, 0, 0.377);
|
|
padding-left: 20px;
|
|
background: #${config.lib.stylix.colors.base0D};
|
|
color: #${config.lib.stylix.colors.base05};
|
|
}
|
|
|
|
.modules-left #workspaces button.focused,
|
|
.modules-left #workspaces button.active {
|
|
border-bottom: 0px;
|
|
}
|
|
|
|
#window {
|
|
color: #${config.theme.textColorOnWallpaper};
|
|
}
|
|
|
|
#clock,
|
|
#battery,
|
|
#network,
|
|
#pulseaudio,
|
|
#tray,
|
|
#cava,
|
|
#custom-notification,
|
|
#mpd {
|
|
padding: 0 10px;
|
|
border-radius: 15px;
|
|
background-color: #${config.lib.stylix.colors.base05};
|
|
color: #${config.lib.stylix.colors.base00};
|
|
box-shadow: rgba(0, 0, 0, 0.116) 2 2 5 2px;
|
|
margin-top: 10px;
|
|
margin-bottom: 10px;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
#cava{
|
|
background: #${config.lib.stylix.colors.base0D};
|
|
color: #${config.lib.stylix.colors.base05};
|
|
text-shadow: 0 0 5px rgba(0, 0, 0, 0.377);
|
|
font-weight: 900;
|
|
padding-top: 0px;
|
|
margin-left: 10px;
|
|
}
|
|
|
|
#pulseaudio,
|
|
#pulseaudio.muted{
|
|
color: #${config.lib.stylix.colors.base0D};
|
|
font-size: 20px;
|
|
font-weight: bolder;
|
|
padding-left: 14px;
|
|
padding-right: 15px;
|
|
border-radius: 15px;
|
|
}
|
|
|
|
#clock {
|
|
background: #${config.lib.stylix.colors.base0D};
|
|
color: #${config.lib.stylix.colors.base05};
|
|
margin-right: 25px;
|
|
background-size: 300% 300%;
|
|
text-shadow: 0 0 5px rgba(0, 0, 0, 0.377);
|
|
font-size: 15px;
|
|
padding-top: 5px;
|
|
padding-right: 21px;
|
|
font-weight: bolder;
|
|
padding-left: 20px
|
|
}
|
|
|
|
#battery {
|
|
color: #86a381;
|
|
font-size: 17px;
|
|
padding-left: 15px;
|
|
padding-right: 15px;
|
|
border-radius: 15px;
|
|
}
|
|
|
|
@keyframes blink {
|
|
to {
|
|
background-color: #f9e2af;
|
|
color:#96804e;
|
|
}
|
|
}
|
|
|
|
#battery.critical:not(.charging) {
|
|
background-color: #f38ba8;
|
|
color:#bf5673;
|
|
animation-name: blink;
|
|
animation-duration: 0.5s;
|
|
animation-timing-function: linear;
|
|
animation-iteration-count: infinite;
|
|
animation-direction: alternate;
|
|
}
|
|
|
|
#network{
|
|
color:#000;
|
|
}
|
|
|
|
#network.disabled{
|
|
background-color: #45475a;
|
|
}
|
|
|
|
#network.disconnected{
|
|
background: rgb(243,139,168);
|
|
color: #fff;
|
|
font-weight: bolder;
|
|
}
|
|
|
|
#network.linked, #network.wifi{
|
|
background-color: #a6e3a1 ;
|
|
}
|
|
|
|
#network.ethernet{
|
|
background-color:#f9e2af ;
|
|
}
|
|
|
|
#tray {
|
|
background-color: #1c1816;
|
|
}
|
|
|
|
#tray > .passive {
|
|
-gtk-icon-effect: dim;
|
|
}
|
|
|
|
#custom-arrow-toggle {
|
|
font-size: 16px;
|
|
color: #516079;
|
|
opacity: 1;
|
|
transition: opacity 0.2s ease-in-out;
|
|
}
|
|
|
|
#extras:hover #custom-arrow-toggle {
|
|
opacity: 0;
|
|
}
|
|
|
|
#extras:hover {
|
|
background-color: transparent;
|
|
}
|
|
'';
|
|
};
|
|
}
|