mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-01 23:45:45 +02:00
waybar: Set position based on variable
This makes it easier to switch between having the bar on the top, bottom, left, or right.
This commit is contained in:
parent
d0b8300bea
commit
277d35ff47
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
opacity = lib.strings.floatToString config.stylix.opacity.terminal;
|
opacity = lib.strings.floatToString config.stylix.opacity.terminal;
|
||||||
|
position = "right";
|
||||||
|
opposite = builtins.replaceStrings ["left" "right" "top" "bottom"] ["right" "left" "bottom" "top"] position;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
@ -10,7 +12,7 @@ in
|
|||||||
settings = {
|
settings = {
|
||||||
mainBar = {
|
mainBar = {
|
||||||
layer = "top";
|
layer = "top";
|
||||||
position = "right";
|
position = position;
|
||||||
width = 45;
|
width = 45;
|
||||||
spacing = 8;
|
spacing = 8;
|
||||||
|
|
||||||
@ -114,7 +116,7 @@ in
|
|||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background: alpha(@base00, ${opacity});
|
background: alpha(@base00, ${opacity});
|
||||||
border-left: 1px solid alpha(@base02, 0.67);
|
border-${opposite}: 1px solid alpha(@base02, 0.67);
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar.fullscreen #workspaces button.active {
|
window#waybar.fullscreen #workspaces button.active {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user