add position option for hyprpanel

This commit is contained in:
Hadi 2024-10-21 13:16:27 +02:00
parent 7af05cf3b3
commit 1ac07c3ace
2 changed files with 10 additions and 3 deletions

View File

@ -20,6 +20,7 @@ let
floating = config.var.theme.bar.floating; floating = config.var.theme.bar.floating;
transparent = config.var.theme.bar.transparent; transparent = config.var.theme.bar.transparent;
position = config.var.theme.bar.position;
location = config.var.location; location = config.var.location;
username = config.var.username; username = config.var.username;
@ -112,9 +113,13 @@ in {
"theme.bar.buttons.workspaces.active": "${accent}", "theme.bar.buttons.workspaces.active": "${accent}",
"theme.bar.buttons.workspaces.available": "${background}", "theme.bar.buttons.workspaces.available": "${background}",
"theme.bar.margin_top": "${toString (gaps-in * 2)}px", "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.margin_sides": "${toString gaps-out}px",
"theme.bar.margin_bottom": "0px",
"theme.bar.border_radius": "${toString rounding}px", "theme.bar.border_radius": "${toString rounding}px",
"bar.launcher.icon": "", "bar.launcher.icon": "",
@ -232,7 +237,8 @@ in {
"theme.bar.menus.menu.media.card.color": "${background-alt}", "theme.bar.menus.menu.media.card.color": "${background-alt}",
"theme.bar.menus.menu.media.card.tint": 90, "theme.bar.menus.menu.media.card.tint": 90,
"bar.customModules.updates.pollingInterval": 1440000, "bar.customModules.updates.pollingInterval": 1440000,
"bar.media.show_active_only": true "bar.media.show_active_only": true,
"theme.bar.location": "${position}"
} }
''; '';
}; };

View File

@ -34,6 +34,7 @@
fetch = "nerdfetch"; # "nerdfetch" | "neofetch" | "pfetch" | "none" fetch = "nerdfetch"; # "nerdfetch" | "neofetch" | "pfetch" | "none"
bar = { bar = {
position = "top"; # "top" | "bottom"
transparent = true; transparent = true;
transparentButtons = false; transparentButtons = false;
floating = true; floating = true;