Use the hyprpanel module (ty gemini)

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-05-13 11:24:25 +02:00
parent 29fc2d6a1b
commit a6df02573c

View File

@@ -11,7 +11,7 @@ let
foreground = "#${config.lib.stylix.colors.base05}"; foreground = "#${config.lib.stylix.colors.base05}";
foregroundOnWallpaper = "#${config.theme.textColorOnWallpaper}"; foregroundOnWallpaper = "#${config.theme.textColorOnWallpaper}";
font = "${config.stylix.fonts.serif.name}"; font = "${config.stylix.fonts.serif.name}";
fontSize = "${toString config.stylix.fonts.sizes.desktop}"; fontSizeForHyprpanel = "${toString config.stylix.fonts.sizes.desktop}px";
rounding = config.theme.rounding; rounding = config.theme.rounding;
border-size = config.theme.border-size; border-size = config.theme.border-size;
@@ -21,7 +21,7 @@ let
floating = config.theme.bar.floating; floating = config.theme.bar.floating;
transparent = config.theme.bar.transparent; transparent = config.theme.bar.transparent;
position = config.theme.bar.position; position = config.theme.bar.position; # "top" ou "bottom"
notificationOpacity = 90; notificationOpacity = 90;
@@ -35,6 +35,7 @@ in {
hyprland.enable = true; hyprland.enable = true;
overwrite.enable = true; overwrite.enable = true;
overlay.enable = true; overlay.enable = true;
settings = { settings = {
layout = { layout = {
"bar.layouts" = { "bar.layouts" = {
@@ -53,153 +54,169 @@ in {
}; };
}; };
}; };
theme.font.name = font;
theme.font.size = fontSizeForHyprpanel;
theme.bar.outer_spacing =
if floating && transparent then "0px" else "8px";
theme.bar.buttons.y_margins =
if floating && transparent then "0px" else "8px";
theme.bar.buttons.spacing = "0.3em";
theme.bar.buttons.radius =
(if transparent then toString rounding else toString (rounding - 8))
+ "px";
theme.bar.floating = floating;
theme.bar.buttons.padding_x = "0.8rem";
theme.bar.buttons.padding_y = "0.4rem";
theme.bar.margin_top =
(if position == "top" then toString (gaps-in * 2) else "0") + "px";
theme.bar.margin_bottom =
(if position == "top" then "0" else toString (gaps-in * 2)) + "px";
theme.bar.margin_sides = toString gaps-out + "px";
theme.bar.border_radius = toString rounding + "px";
theme.bar.transparent = transparent;
theme.bar.location = position;
theme.bar.dropdownGap = "4.5em";
theme.bar.menus.shadow =
if transparent then "0 0 0 0" else "0px 0px 3px 1px #16161e";
theme.bar.buttons.style = "default";
theme.bar.buttons.monochrome = true;
theme.bar.menus.monochrome = true;
theme.bar.menus.card_radius = toString rounding + "px";
theme.bar.menus.border.size = toString border-size + "px";
theme.bar.menus.border.radius = toString rounding + "px";
theme.bar.menus.menu.media.card.tint = 90;
bar.launcher.icon = "";
bar.workspaces.show_numbered = false;
bar.workspaces.workspaces = 5;
bar.workspaces.numbered_active_indicator = "color";
bar.workspaces.monitorSpecific = false;
bar.workspaces.applicationIconEmptyWorkspace = "";
bar.workspaces.showApplicationIcons = true;
bar.workspaces.showWsIcons = true;
bar.windowtitle.label = true;
bar.volume.label = false;
bar.network.truncation_size = 12;
bar.bluetooth.label = false;
bar.clock.format = "%a %b %d %I:%M %p";
bar.notifications.show_total = true;
bar.media.show_active_only = true;
bar.customModules.updates.pollingInterval = 1440000;
bar.customModules.cava.showIcon = false;
bar.customModules.cava.stereo = true;
bar.customModules.cava.showActiveOnly = true;
notifications.position = "top right";
notifications.showActionsOnHover = true;
theme.notification.opacity = notificationOpacity;
theme.notification.enableShadow = true;
theme.notification.border_radius = toString rounding + "px";
theme.osd.enable = true;
theme.osd.orientation = "vertical";
theme.osd.location = "left";
theme.osd.radius = toString rounding + "px";
theme.osd.margins = "0px 0px 0px 10px";
theme.osd.muted_zero = true;
menus.clock.weather.location = location;
menus.clock.weather.unit = "metric";
menus.dashboard.powermenu.confirmation = false;
menus.dashboard.powermenu.avatar.image = "~/.face.icon";
menus.dashboard.shortcuts.left.shortcut1.icon = "";
menus.dashboard.shortcuts.left.shortcut1.command = "zen";
menus.dashboard.shortcuts.left.shortcut1.tooltip = "Zen";
menus.dashboard.shortcuts.left.shortcut2.icon = "󰅶";
menus.dashboard.shortcuts.left.shortcut2.command = "caffeine";
menus.dashboard.shortcuts.left.shortcut2.tooltip = "Caffeine";
menus.dashboard.shortcuts.left.shortcut3.icon = "󰖔";
menus.dashboard.shortcuts.left.shortcut3.command = "night-shift";
menus.dashboard.shortcuts.left.shortcut3.tooltip = "Night-shift";
menus.dashboard.shortcuts.left.shortcut4.icon = "";
menus.dashboard.shortcuts.left.shortcut4.command = "menu";
menus.dashboard.shortcuts.left.shortcut4.tooltip = "Search Apps";
menus.dashboard.shortcuts.right.shortcut1.icon = "";
menus.dashboard.shortcuts.right.shortcut1.command = "hyprpicker -a";
menus.dashboard.shortcuts.right.shortcut1.tooltip = "Color Picker";
menus.dashboard.shortcuts.right.shortcut3.icon = "󰄀";
menus.dashboard.shortcuts.right.shortcut3.command =
"screenshot region swappy";
menus.dashboard.shortcuts.right.shortcut3.tooltip = "Screenshot";
menus.power.lowBatteryNotification = true;
wallpaper.enable = false;
}; };
override = { override = {
"theme.font.name" = "${font}"; "theme.bar.buttons.workspaces.hover" = accent-alt;
"theme.font.size" = "${fontSize}px"; "theme.bar.buttons.workspaces.active" = accent;
"theme.bar.outer_spacing" = "theme.bar.buttons.workspaces.available" = accent-alt;
"${if floating && transparent then "0" else "8"}px"; "theme.bar.buttons.workspaces.occupied" = accent-alt;
"theme.bar.buttons.y_margins" =
"${if floating && transparent then "0" else "8"}px";
"theme.bar.buttons.spacing" = "0.3em";
"theme.bar.buttons.radius" = "${
if transparent then toString rounding else toString (rounding - 8)
}px";
"theme.bar.floating" = "${if floating then "true" else "false"}";
"theme.bar.buttons.padding_x" = "0.8rem";
"theme.bar.buttons.padding_y" = "0.4rem";
"theme.bar.buttons.workspaces.hover" = "${accent-alt}";
"theme.bar.buttons.workspaces.active" = "${accent}";
"theme.bar.buttons.workspaces.available" = "${accent-alt}";
"theme.bar.buttons.workspaces.occupied" = "${accent-alt}";
"theme.bar.margin_top" =
"${if position == "top" then toString (gaps-in * 2) else "0"}px";
"theme.bar.margin_bottom" =
"${if position == "top" then "0" else toString (gaps-in * 2)}px";
"theme.bar.margin_sides" = "${toString gaps-out}px";
"theme.bar.border_radius" = "${toString rounding}px";
"bar.launcher.icon" = "";
"theme.bar.transparent" = "${if transparent then "true" else "false"}";
"bar.workspaces.show_numbered" = false;
"bar.workspaces.workspaces" = 5;
"bar.workspaces.hideUnoccupied" = false;
"bar.windowtitle.label" = true;
"bar.volume.label" = false;
"bar.network.truncation_size" = 12;
"bar.bluetooth.label" = false;
"bar.clock.format" = "%a %b %d %I:%M %p";
"bar.notifications.show_total" = true;
"theme.notification.border_radius" = "${toString rounding}px";
"theme.osd.enable" = true;
"theme.osd.orientation" = "vertical";
"theme.osd.location" = "left";
"theme.osd.radius" = "${toString rounding}px";
"theme.osd.margins" = "0px 0px 0px 10px";
"theme.osd.muted_zero" = true;
"menus.clock.weather.location" = "${location}";
"menus.clock.weather.unit" = "metric";
"menus.dashboard.powermenu.confirmation" = false;
"menus.dashboard.powermenu.avatar.image" = "~/.face.icon";
"menus.dashboard.shortcuts.left.shortcut1.icon" = ""; "theme.bar.menus.background" = background;
"menus.dashboard.shortcuts.left.shortcut1.command" = "zen"; "theme.bar.menus.cards" = background-alt;
"menus.dashboard.shortcuts.left.shortcut1.tooltip" = "Zen"; "theme.bar.menus.label" = foreground;
"menus.dashboard.shortcuts.left.shortcut2.icon" = "󰅶"; "theme.bar.menus.text" = foreground;
"menus.dashboard.shortcuts.left.shortcut2.command" = "caffeine"; "theme.bar.menus.border.color" = accent;
"menus.dashboard.shortcuts.left.shortcut2.tooltip" = "Caffeine"; "theme.bar.menus.popover.text" = foreground;
"menus.dashboard.shortcuts.left.shortcut3.icon" = "󰖔"; "theme.bar.menus.popover.background" = background-alt;
"menus.dashboard.shortcuts.left.shortcut3.command" = "night-shift"; "theme.bar.menus.listitems.active" = accent;
"menus.dashboard.shortcuts.left.shortcut3.tooltip" = "Night-shift"; "theme.bar.menus.icons.active" = accent;
"menus.dashboard.shortcuts.left.shortcut4.icon" = ""; "theme.bar.menus.switch.enabled" = accent;
"menus.dashboard.shortcuts.left.shortcut4.command" = "menu"; "theme.bar.menus.check_radio_button.active" = accent;
"menus.dashboard.shortcuts.left.shortcut4.tooltip" = "Search Apps"; "theme.bar.menus.buttons.default" = accent;
"menus.dashboard.shortcuts.right.shortcut1.icon" = ""; "theme.bar.menus.buttons.active" = accent;
"menus.dashboard.shortcuts.right.shortcut1.command" = "hyprpicker -a"; "theme.bar.menus.iconbuttons.active" = accent;
"menus.dashboard.shortcuts.right.shortcut1.tooltip" = "Color Picker"; "theme.bar.menus.progressbar.foreground" = accent;
"menus.dashboard.shortcuts.right.shortcut3.icon" = "󰄀"; "theme.bar.menus.slider.primary" = accent;
"menus.dashboard.shortcuts.right.shortcut3.command" = "theme.bar.menus.tooltip.background" = background-alt;
"screenshot region swappy"; "theme.bar.menus.tooltip.text" = foreground;
"menus.dashboard.shortcuts.right.shortcut3.tooltip" = "Screenshot"; "theme.bar.menus.dropdownmenu.background" = background-alt;
"theme.bar.menus.dropdownmenu.text" = foreground;
"theme.bar.menus.monochrome" = true; "theme.bar.background" = background
"wallpaper.enable" = false; + (if transparentButtons && transparent then "00" else "");
"theme.bar.menus.background" = "${background}";
"theme.bar.menus.cards" = "${background-alt}";
"theme.bar.menus.card_radius" = "${toString rounding}px";
"theme.bar.menus.label" = "${foreground}";
"theme.bar.menus.text" = "${foreground}";
"theme.bar.menus.border.size" = "${toString border-size}px";
"theme.bar.menus.border.color" = "${accent}";
"theme.bar.menus.border.radius" = "${toString rounding}px";
"theme.bar.menus.popover.text" = "${foreground}";
"theme.bar.menus.popover.background" = "${background-alt}";
"theme.bar.menus.listitems.active" = "${accent}";
"theme.bar.menus.icons.active" = "${accent}";
"theme.bar.menus.switch.enabled" = "${accent}";
"theme.bar.menus.check_radio_button.active" = "${accent}";
"theme.bar.menus.buttons.default" = "${accent}";
"theme.bar.menus.buttons.active" = "${accent}";
"theme.bar.menus.iconbuttons.active" = "${accent}";
"theme.bar.menus.progressbar.foreground" = "${accent}";
"theme.bar.menus.slider.primary" = "${accent}";
"theme.bar.menus.tooltip.background" = "${background-alt}";
"theme.bar.menus.tooltip.text" = "${foreground}";
"theme.bar.menus.dropdownmenu.background" = "${background-alt}";
"theme.bar.menus.dropdownmenu.text" = "${foreground}";
"theme.bar.background" = "${background
+ (if transparentButtons && transparent then "00" else "")}";
"theme.bar.buttons.style" = "default";
"theme.bar.buttons.monochrome" = true;
"theme.bar.buttons.text" = if transparent && transparentButtons then "theme.bar.buttons.text" = if transparent && transparentButtons then
"${foregroundOnWallpaper}" foregroundOnWallpaper
else else
"${foreground}"; foreground;
"theme.bar.buttons.background" = "theme.bar.buttons.background" =
"${(if transparent then background else background-alt) (if transparent then background else background-alt)
+ (if transparentButtons then "00" else "")}"; + (if transparentButtons then "00" else "");
"theme.bar.buttons.icon" = "${accent}"; "theme.bar.buttons.icon" = accent;
"theme.bar.buttons.notifications.background" = "${background-alt}";
"theme.bar.buttons.hover" = "${background}"; "theme.bar.buttons.notifications.background" = background-alt;
"theme.bar.buttons.notifications.hover" = "${background}"; "theme.bar.buttons.hover" = background;
"theme.bar.buttons.notifications.total" = "${accent}"; "theme.bar.buttons.notifications.hover" = background;
"theme.bar.buttons.notifications.icon" = "${accent}"; "theme.bar.buttons.notifications.total" = accent;
"theme.osd.bar_color" = "${accent}"; "theme.bar.buttons.notifications.icon" = accent;
"theme.osd.bar_overflow_color" = "${accent-alt}";
"theme.osd.icon" = "${background}"; "theme.osd.bar_color" = accent;
"theme.osd.icon_container" = "${accent}"; "theme.osd.bar_overflow_color" = accent-alt;
"theme.osd.label" = "${accent}"; "theme.osd.icon" = background;
"theme.osd.bar_container" = "${background-alt}"; "theme.osd.icon_container" = accent;
"theme.bar.menus.menu.media.background.color" = "${background-alt}"; "theme.osd.label" = accent;
"theme.bar.menus.menu.media.card.color" = "${background-alt}"; "theme.osd.bar_container" = background-alt;
"theme.bar.menus.menu.media.card.tint" = 90;
"bar.customModules.updates.pollingInterval" = 1440000; "theme.bar.menus.menu.media.background.color" = background-alt;
"bar.media.show_active_only" = true; "theme.bar.menus.menu.media.card.color" = background-alt;
"theme.bar.location" = "${position}";
"bar.workspaces.numbered_active_indicator" = "color"; "theme.notification.background" = background-alt;
"bar.workspaces.monitorSpecific" = false; "theme.notification.actions.background" = accent;
"bar.workspaces.applicationIconEmptyWorkspace" = ""; "theme.notification.actions.text" = foreground;
"bar.workspaces.showApplicationIcons" = true; "theme.notification.label" = accent;
"bar.workspaces.showWsIcons" = true; "theme.notification.border" = background-alt;
"theme.bar.dropdownGap" = "4.5em"; "theme.notification.text" = foreground;
"theme.bar.menus.shadow" = "theme.notification.labelicon" = accent;
"${if transparent then "0 0 0 0" else "0px 0px 3px 1px #16161e"}"; "theme.notification.close_button.background" = background-alt;
"bar.customModules.cava.showIcon" = false;
"bar.customModules.cava.stereo" = true;
"bar.customModules.cava.showActiveOnly" = true;
"menus.power.lowBatteryNotification" = true;
"notifications.position" = "top right";
"notifications.showActionsOnHover" = true;
"theme.notification.enableShadow" = true;
"theme.notification.opacity" = notificationOpacity;
"theme.notification.background" = "${background-alt}";
"theme.notification.actions.background" = "${accent}";
"theme.notification.actions.text" = "${foreground}";
"theme.notification.label" = "${accent}";
"theme.notification.border" = "${background-alt}";
"theme.notification.text" = "${foreground}";
"theme.notification.labelicon" = "${accent}";
"theme.notification.close_button.background" = "${background-alt}";
"theme.notification.close_button.label" = "#f38ba8"; "theme.notification.close_button.label" = "#f38ba8";
}; };
}; };