Skip to content

Commit

Permalink
add position option for hyprpanel
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherhadi committed Oct 21, 2024
1 parent 7af05cf commit 1ac07c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions home/system/hyprpanel/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ let

floating = config.var.theme.bar.floating;
transparent = config.var.theme.bar.transparent;
position = config.var.theme.bar.position;

location = config.var.location;
username = config.var.username;
Expand Down Expand Up @@ -112,9 +113,13 @@ in {
"theme.bar.buttons.workspaces.active": "${accent}",
"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_bottom": "0px",
"theme.bar.border_radius": "${toString rounding}px",
"bar.launcher.icon": "",
Expand Down Expand Up @@ -232,7 +237,8 @@ in {
"theme.bar.menus.menu.media.card.color": "${background-alt}",
"theme.bar.menus.menu.media.card.tint": 90,
"bar.customModules.updates.pollingInterval": 1440000,
"bar.media.show_active_only": true
"bar.media.show_active_only": true,
"theme.bar.location": "${position}"
}
'';
};
Expand Down
1 change: 1 addition & 0 deletions hosts/laptop/variables.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
fetch = "nerdfetch"; # "nerdfetch" | "neofetch" | "pfetch" | "none"

bar = {
position = "top"; # "top" | "bottom"
transparent = true;
transparentButtons = false;
floating = true;
Expand Down

0 comments on commit 1ac07c3

Please sign in to comment.