added brightness slider and battery monitor to laptop version of sidebar
This commit is contained in:
@@ -90,7 +90,6 @@
|
|||||||
stylix.nixosModules.stylix
|
stylix.nixosModules.stylix
|
||||||
nixvim.nixosModules.nixvim
|
nixvim.nixosModules.nixvim
|
||||||
nur.nixosModules.nur
|
nur.nixosModules.nur
|
||||||
nixvim.nixosModules.nixvim
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ host,
|
|||||||
# secondary monitor will have a vertical bar on the left side
|
# secondary monitor will have a vertical bar on the left side
|
||||||
# Can contain more info with two bars
|
# Can contain more info with two bars
|
||||||
let
|
let
|
||||||
|
desktop = (host == "oganesson");
|
||||||
workspaces = {
|
workspaces = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
format-icons = {
|
format-icons = {
|
||||||
@@ -21,14 +22,14 @@ let
|
|||||||
"5" = "五";
|
"5" = "五";
|
||||||
"6" = "六";
|
"6" = "六";
|
||||||
};
|
};
|
||||||
persistent-workspaces = if (host == "oganesson") then {
|
persistent-workspaces = if desktop then {
|
||||||
"HDMI-A-1" = [ 1 2 3 ];
|
"HDMI-A-1" = [ 1 2 3 ];
|
||||||
"DP-1" = [ 4 5 6 ];
|
"DP-1" = [ 4 5 6 ];
|
||||||
} else {
|
} else {
|
||||||
"eDP-1" = [ 1 2 3 4 ];
|
"eDP-1" = [ 1 2 3 4 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
monitors = if (host == "oganesson") then [
|
monitors = if desktop then [
|
||||||
"DP-1"
|
"DP-1"
|
||||||
"HDMI-A-1"
|
"HDMI-A-1"
|
||||||
] else [
|
] else [
|
||||||
@@ -44,7 +45,7 @@ in
|
|||||||
name = "mainBar";
|
name = "mainBar";
|
||||||
margin-left = 8;
|
margin-left = 8;
|
||||||
margin-top = 5;
|
margin-top = 5;
|
||||||
margin-right = 8;
|
margin-right = if desktop then 8 else 5;
|
||||||
mode = "dock";
|
mode = "dock";
|
||||||
|
|
||||||
modules-left = [
|
modules-left = [
|
||||||
@@ -168,7 +169,7 @@ in
|
|||||||
|
|
||||||
programs.waybar.settings.sideBar = {
|
programs.waybar.settings.sideBar = {
|
||||||
layer = "bottom";
|
layer = "bottom";
|
||||||
output = if (host == "oganesson") then builtins.elemAt monitors 1 else "";
|
output = if desktop then builtins.elemAt monitors 1 else builtins.elemAt monitors 0;
|
||||||
position = "right";
|
position = "right";
|
||||||
margin-top = 8;
|
margin-top = 8;
|
||||||
margin-right = 5;
|
margin-right = 5;
|
||||||
@@ -176,8 +177,11 @@ in
|
|||||||
name = "sideBar";
|
name = "sideBar";
|
||||||
mode = "dock";
|
mode = "dock";
|
||||||
|
|
||||||
modules-left = [
|
modules-left = if desktop then [
|
||||||
"hyprland/workspaces"
|
"hyprland/workspaces"
|
||||||
|
] else [
|
||||||
|
"group/brightness"
|
||||||
|
"battery"
|
||||||
];
|
];
|
||||||
modules-center = [
|
modules-center = [
|
||||||
];
|
];
|
||||||
@@ -223,5 +227,35 @@ in
|
|||||||
tooltip-format-disconnected = "Disconnected";
|
tooltip-format-disconnected = "Disconnected";
|
||||||
on-click = "hyprctl dispatch exec '[float;size 40% 55%] kitty nmtui'";
|
on-click = "hyprctl dispatch exec '[float;size 40% 55%] kitty nmtui'";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
battery = {
|
||||||
|
bat = "BAT1";
|
||||||
|
interval = 1;
|
||||||
|
tooltip-format = "{capacity}%\nTil empty: {time}";
|
||||||
|
tooltip-format-charging = "{capacity}%\nTil full: {time}";
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = [
|
||||||
|
"" "" "" "" "" "" "" "" ""
|
||||||
|
];
|
||||||
|
format-charging = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
"group/brightness" = {
|
||||||
|
orientation = "vertical";
|
||||||
|
modules = [
|
||||||
|
"backlight"
|
||||||
|
"backlight/slider"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
backlight = {
|
||||||
|
format = "";
|
||||||
|
tooltip = "{percentage}%";
|
||||||
|
};
|
||||||
|
"backlight/slider" = {
|
||||||
|
min = 10;
|
||||||
|
max = 100;
|
||||||
|
orientation = "vertical";
|
||||||
|
rotate = 180;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,12 +146,14 @@ in
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#backlight-slider slider,
|
||||||
#pulseaudio-slider slider {
|
#pulseaudio-slider slider {
|
||||||
background: #${colors.color4};
|
background: #${colors.color4};
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#backlight-slider trough,
|
||||||
#pulseaudio-slider trough {
|
#pulseaudio-slider trough {
|
||||||
min-width: 9px;
|
min-width: 9px;
|
||||||
min-height: 90px;
|
min-height: 90px;
|
||||||
@@ -159,6 +161,7 @@ in
|
|||||||
background: #343434;
|
background: #343434;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#backlight-slider highlight,
|
||||||
#pulseaudio-slider highlight {
|
#pulseaudio-slider highlight {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background-color: #2096C0;
|
background-color: #2096C0;
|
||||||
@@ -172,5 +175,27 @@ in
|
|||||||
margin: 3px;
|
margin: 3px;
|
||||||
padding: 5px 0 5px 6px;
|
padding: 5px 0 5px 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#brightness {
|
||||||
|
background: #${bg.dark};
|
||||||
|
border-radius: 20px;
|
||||||
|
margin: 3px;
|
||||||
|
padding: 10px 0px 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backlight {
|
||||||
|
color: #${colors.color2};
|
||||||
|
font-size: 18px;
|
||||||
|
padding: 0 4px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
color: #${colors.color4};
|
||||||
|
font-size: 20px;
|
||||||
|
background: #${bg.dark};
|
||||||
|
border-radius: 20px;
|
||||||
|
margin: 3px;
|
||||||
|
padding: 5px 0 5px 0px;
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user