Waybar improvements + app drawer for touchscreen

This commit is contained in:
Aleksandr Lebedev 2025-07-13 17:36:41 +02:00
parent 084dc0c72b
commit af5b392286
6 changed files with 132 additions and 77 deletions

View file

@ -160,7 +160,7 @@ in
comma #run nix run nixpkgs#nix-index to init
llvmPackages_19.clang-tools
clang-tools
gdb
dotnet-sdk_9
csharp-ls

View file

@ -15,7 +15,7 @@
./hyprlock.nix
];
home.packages = with pkgs;[
eww
nwg-drawer
wlogout
brightnessctl
fuzzel

View file

@ -13,12 +13,7 @@ in
#}
#${builtins.readFile "${pkgs.waybar}/etc/xdg/waybar/style.css"}
style = ''
${builtins.readFile ./waybarstyle.css}
* {
font-size: 15px;
}
'';
${builtins.readFile ./waybarstyle.css}'';
settings = [{
height = 36;
layer = "top";
@ -29,9 +24,10 @@ in
"clock"
];
modules-left = [
"custom/drawer"
"wlr/taskbar"
"niri/workspaces"
# "hyprland/window"
"niri/window"
];
modules-right = lib.optional hwconfig.isLaptop "backlight"
++ [
@ -73,6 +69,7 @@ in
tooltip = true;
};
clock = {
format = "{:%a %d | %H:%M}";
format-alt = "{:%d.%m.%Y}";
tooltip-format = "{:%d.%m.%Y | %H:%M}";
};
@ -80,11 +77,18 @@ in
format = "{usage}% ";
tooltip = false;
};
"custom/drawer" = {
format = "<span foreground='white'>󱄅</span>";
tooltip = false;
on-click = ''nwg-drawer -fm "dolphin" -closebtn "right" -nocats -term "kitty" -ovl -wm "niri" -s "${./drawerstyle.css}" '';
};
"niri/language" = {
format = " {}";
format = "{}";
format-en = "EN";
format-ru = "RU";
format-de = "DE";
on-click = "niri msg action switch-layout next";
on-click-right = "niri msg action switch-layout prev";
};
"wlr/taskbar" = {
format = "{icon}";
@ -120,9 +124,9 @@ in
phone = "";
portable = "";
};
format-muted = " {format_source}";
format-muted = " {format_source}";
format-source = " {volume}%";
format-source-muted = "";
format-source-muted = " ";
on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol";
};
"hyprland/submap" = { format = ''<span style="italic">{}</span>''; };
@ -148,16 +152,8 @@ in
};
"custom/power" = {
format = " ";
format = "";
tooltip = false;
#menu = "on-click";
#menu-file = ./power_menu.xml;
#menu-actions = {
# shutdown = "shutdown -h now";
# reboot = "reboot";
# suspend = "systemctl suspend";
# hibernate = "systemctl hibernate";
#};
on-click = "wlogout";
};
@ -165,10 +161,10 @@ in
tooltip = false;
format = "{icon}";
format-icons = {
notification = " <span foreground='red'><small><sup></sup></small></span>";
none = " ";
dnd-notification = " <span foreground='red'><small><sup></sup></small></span>";
dnd-none = " ";
notification = "<span foreground='red'></span>";
none = "";
dnd-notification = "<span foreground='red'></span>";
dnd-none = "";
};
return-type = "json";
exec-if = "which swaync-client";

View file

@ -0,0 +1,47 @@
* {
border: none;
font-family: Font Awesome, Roboto, Arial, sans-serif;
font-size: 16px;
color: #eeeeee;
border-radius: 10px;
}
window {
background-color: rgba(50, 63, 99, 0.718);
color: #eeeeee;
}
/* search entry */
entry {
background-color: rgba(0, 0, 0, 0.2)
}
button, image {
background: none;
border: none
}
button:hover {
background-color: rgba(255, 255, 255, 0.1)
}
/* in case you wanted to give category buttons a different look */
#category-button {
margin: 0 10px 0 10px
}
#pinned-box {
padding-bottom: 5px;
border-bottom: 1px dotted gray
}
#files-box {
padding: 5px;
border: 1px dotted gray;
border-radius: 15px
}
/* math operation result label */
#math-label {
font-weight: bold;
font-size: 16px
}

View file

@ -1,29 +1,29 @@
* {
border: none;
font-family: Font Awesome, Roboto, Arial, sans-serif;
font-size: 13px;
color: #B9826A;/*#ffffff;*/
border-radius: 20px;
font-size: 16px;
color: #B9826A;
border-radius: 10px;
}
window {
/*font-weight: bold;*/
font-weight: bold;
}
window#waybar {
background: transparent;/*rgba(0, 0, 0, 0);*/
background: transparent;
}
/*-----module groups----*/
.modules-right {
background-color: rgba(0,43,51,0.85);
background-color: rgba(0,43,51,0.85);
margin: 2px 10px 0 0;
}
.modules-center {
background-color: rgba(0,43,51,0.85);
background-color: rgba(0,43,51,0.85);
margin: 2px 0 0 0;
}
.modules-left {
margin: 2px 0 0 5px;
background-color: rgba(0,119,179,0.6);
background-color: rgba(0,43,51,0.85);
}
/*-----modules indv----*/
#workspaces button {
@ -32,11 +32,11 @@ window#waybar {
}
#workspaces button:hover {
box-shadow: inherit;
background-color: rgba(0,153,153,1);
background-color: rgba(0,153,153,1);
}
#workspaces button.focused {
background-color: rgba(0,43,51,0.85);
background-color: rgba(0,119,179,0.6);
}
#clock,
@ -49,21 +49,40 @@ window#waybar {
#custom-media,
#tray,
#mode,
#niri-language,
#language,
#custom-power,
#custom-menu,
#custom-battery,
#custom-notification,
#custom-drawer,
#backlight,
#workspaces,
#window,
#taskbar,
#idle_inhibitor {
padding: 0 10px;
margin: 0px 0px;
padding: 0px 5px;
border-right: 1px solid rgba(255,255,255,0.2);
border-radius: 0px;
}
#clock,
#custom-power,
#window {
border-right: none;
}
#custom-drawer {
font-size: 20px;
}
#custom-power,
#custom-drawer,
#custom-notification {
padding: 0px 0.5em 0px 0.3em;
}
#mode {
color: #cc3436;
font-weight: bold;
}
#custom-power {
background-color: rgba(0,119,179,0.6);
border-radius: 100px;
margin: 5px 5px;
padding: 1px 1px 1px 6px;
}
/*-----Indicators----*/
#idle_inhibitor.activated {
color: #2dcc36;
@ -75,7 +94,7 @@ window#waybar {
color: #2dcc36;
}
#battery.warning:not(.charging) {
color: #e6e600;
color: #e6e600;
}
#battery.critical:not(.charging) {
color: #cc3436;
@ -83,10 +102,3 @@ window#waybar {
#temperature.critical {
color: #cc3436;
}
/*-----Colors----*/
/*
*rgba(0,85,102,1),#005566 --> Indigo(dye)
*rgba(0,43,51,1),#002B33 --> Dark Green
*rgba(0,153,153,1),#009999 --> Persian Green
*
*/