mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-20 05:59:51 -07:00
feat: add laptop w/ notch configuration for waybar
This commit is contained in:
parent
43062a22f5
commit
1689f677d0
2 changed files with 387 additions and 365 deletions
|
@ -2,6 +2,7 @@
|
|||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -21,7 +22,12 @@ in
|
|||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ playerctl ];
|
||||
programs.waybar = {
|
||||
programs.waybar =
|
||||
let
|
||||
isDesktop = osConfig.liminalOS.formFactor == "desktop";
|
||||
isLaptop = osConfig.liminalOS.formFactor == "laptop";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings.mainBar = {
|
||||
position = "top";
|
||||
|
@ -31,14 +37,19 @@ in
|
|||
margin-bottom = 0;
|
||||
margin-left = 0;
|
||||
margin-right = 0;
|
||||
modules-left = [
|
||||
modules-left =
|
||||
[
|
||||
"custom/launcher"
|
||||
"custom/playerctl#backward"
|
||||
"custom/playerctl#play"
|
||||
"custom/playerctl#foward"
|
||||
"custom/playerlabel"
|
||||
];
|
||||
modules-center = [
|
||||
]
|
||||
++ (lib.optionals isLaptop [
|
||||
"cava#left"
|
||||
"hyprland/workspaces"
|
||||
]);
|
||||
modules-center = lib.mkIf isDesktop [
|
||||
"cava#left"
|
||||
"hyprland/workspaces"
|
||||
"cava#right"
|
||||
|
@ -60,8 +71,8 @@ in
|
|||
active-only = false;
|
||||
all-outputs = false;
|
||||
disable-scroll = false;
|
||||
on-scroll-up = "${pkgs.hyprnome}/bin/hyprnome --move";
|
||||
on-scroll-down = "${pkgs.hyprnome}/bin/hyprnome --move --previous";
|
||||
on-scroll-down = "${pkgs.hyprnome}/bin/hyprnome --move";
|
||||
on-scroll-up = "${pkgs.hyprnome}/bin/hyprnome --move --previous";
|
||||
format = "{icon}";
|
||||
on-click = "activate";
|
||||
format-icons = {
|
||||
|
@ -263,12 +274,13 @@ in
|
|||
tooltip = "false";
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
style =
|
||||
''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
font-family: GeistMono Nerd Font;
|
||||
font-size: 13px; /* Reduced font size */
|
||||
font-size: 13px;
|
||||
min-height: 0;
|
||||
}
|
||||
window#waybar {
|
||||
|
@ -277,8 +289,8 @@ in
|
|||
|
||||
#cava.left, #cava.right {
|
||||
background: #${palette.base00};
|
||||
margin: 4px; /* Reduced margin */
|
||||
padding: 6px 16px; /* Reduced vertical padding */
|
||||
margin: 4px;
|
||||
padding: 6px 16px;
|
||||
color: #${palette.base00};
|
||||
}
|
||||
#cava.left {
|
||||
|
@ -289,9 +301,6 @@ in
|
|||
}
|
||||
#workspaces {
|
||||
background: #${palette.base00};
|
||||
margin: 4px 5px; /* Reduced vertical margin */
|
||||
padding: 6px 5px; /* Reduced vertical padding */
|
||||
border-radius: 16px;
|
||||
color: #${palette.base00}
|
||||
}
|
||||
#workspaces button {
|
||||
|
@ -324,7 +333,7 @@ in
|
|||
#custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.foward{
|
||||
background: #${palette.base00};
|
||||
font-weight: bold;
|
||||
margin: 4px 0px; /* Reduced vertical margin */
|
||||
margin: 4px 0px;
|
||||
}
|
||||
#tray, #pulseaudio, #network, #battery{
|
||||
color: #${palette.base05};
|
||||
|
@ -336,10 +345,10 @@ in
|
|||
color: #${palette.base05};
|
||||
background: #${palette.base00};
|
||||
border-radius: 0px 0px 0px 40px;
|
||||
padding: 8px 10px 8px 25px; /* Reduced vertical padding */
|
||||
padding: 8px 10px 8px 25px;
|
||||
margin-left: 7px;
|
||||
font-weight: bold;
|
||||
font-size: 14px; /* Reduced font size */
|
||||
font-size: 14px;
|
||||
}
|
||||
#custom-launcher {
|
||||
color: #${palette.base0A};
|
||||
|
@ -347,12 +356,12 @@ in
|
|||
border-radius: 0px 0px 40px 0px;
|
||||
margin: 0px;
|
||||
padding: 0px 35px 0px 15px;
|
||||
font-size: 24px; /* Reduced font size */
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.foward {
|
||||
background: #${palette.base00};
|
||||
font-size: 20px; /* Reduced font size */
|
||||
font-size: 20px;
|
||||
}
|
||||
#custom-playerctl.backward:hover, #custom-playerctl.play:hover, #custom-playerctl.foward:hover{
|
||||
color: #${palette.base05};
|
||||
|
@ -378,7 +387,7 @@ in
|
|||
color: #${palette.base05};
|
||||
padding: 0 20px;
|
||||
border-radius: 24px 10px 24px 10px;
|
||||
margin: 4px 0; /* Reduced vertical margin */
|
||||
margin: 4px 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
#window{
|
||||
|
@ -386,12 +395,26 @@ in
|
|||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
border-radius: 16px;
|
||||
margin-top: 4px; /* Reduced margin */
|
||||
margin-bottom: 4px; /* Reduced margin */
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
'';
|
||||
''
|
||||
+ (lib.optionalString isLaptop ''
|
||||
#workspaces {
|
||||
margin: 4px;
|
||||
padding: 6px 16px;
|
||||
border-radius: 24px 10px 24px 10px;
|
||||
}
|
||||
'')
|
||||
+ (lib.optionalString isDesktop ''
|
||||
#workspaces {
|
||||
margin: 4px 5px;
|
||||
padding: 6px 5px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
'');
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue