desktop/niri: move to hostName id, change waybar

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-04-15 19:49:08 +03:00
parent 02bc6fce53
commit de6ce28912

View File

@ -10,15 +10,15 @@
inherit (config.lib.stylix) colors; inherit (config.lib.stylix) colors;
inherit (config.stylix) cursor; inherit (config.stylix) cursor;
inherit (osConfig.module.stylix) theme; inherit (osConfig.module.stylix) theme;
inherit (osConfig.networking) hostId; inherit (osConfig.networking) hostName;
cfg = config.desktop.niri; cfg = config.desktop.niri;
keyboard = keyboard =
if hostId == "eldrid" if hostName == "eldrid"
then "chromeos" then "chromeos"
else "platform"; else "platform";
xdgPics = xdgPics =
config.xdg.userDirs.pictures; config.xdg.userDirs.pictures;
ifLaptop = mkIf (hostId != "c7f6c4a1"); ifLaptop = mkIf (hostName != "dunamis");
# TODO: make terminal depent on thing outside a module # TODO: make terminal depent on thing outside a module
terminal = getExe pkgs.ghostty; terminal = getExe pkgs.ghostty;
launcher = getExe pkgs.fuzzel; launcher = getExe pkgs.fuzzel;
@ -270,6 +270,7 @@ in {
terminal = terminal + " -e"; terminal = terminal + " -e";
fields = "filename,name,generic,keywords,categories,exec"; fields = "filename,name,generic,keywords,categories,exec";
dpi-aware = false; dpi-aware = false;
width = 20;
horizontal-pad = 12; horizontal-pad = 12;
vertical-pad = 12; vertical-pad = 12;
show-actions = true; show-actions = true;
@ -375,7 +376,7 @@ in {
xkb { xkb {
layout "us,ua" layout "us,ua"
${ ${
if hostId == "c7f6c4a1" if (hostName == "dunamis" || hostName == "legion")
then "// variant \"colemak_dh_ortho,\"" then "// variant \"colemak_dh_ortho,\""
else "variant \"colemak_dh_ortho,\"" else "variant \"colemak_dh_ortho,\""
} }
@ -416,7 +417,11 @@ in {
variable-refresh-rate variable-refresh-rate
} }
output "Philips Consumer Electronics Company 27M2N5500 UK02418033254" { output "Philips Consumer Electronics Company 27M2N5500 UK02418033254" {
mode "2560x1440@180.000" mode "2560x1440@${
if hostName == "legion"
then "144.001"
else "180.000"
}"
variable-refresh-rate variable-refresh-rate
position x=0 y=0 position x=0 y=0
scale 1.33 scale 1.33
@ -641,7 +646,7 @@ in {
settings = { settings = {
bar-0 = { bar-0 = {
# layer = "top"; # layer = "top";
position = "bottom"; position = "top";
height = 24; height = 24;
spacing = 4; spacing = 4;
# margin-left = 63; # margin-left = 63;
@ -652,16 +657,15 @@ in {
"niri/workspaces" "niri/workspaces"
"wlr/taskbar" "wlr/taskbar"
]; ];
modules-center = ["mpris"]; modules-center = ["clock"];
modules-right = [ modules-right = [
"wireplumber"
(ifLaptop "group/laptop") (ifLaptop "group/laptop")
"wireplumber"
"tray" "tray"
"privacy" "privacy"
(ifLaptop "power-profiles-daemon") (ifLaptop "power-profiles-daemon")
"idle_inhibitor" "idle_inhibitor"
"custom/notification" "custom/notification"
"clock"
]; ];
"niri/workspaces" = { "niri/workspaces" = {
format = "{index}"; format = "{index}";
@ -725,11 +729,11 @@ in {
}; };
"tray" = { "tray" = {
icon-size = 16; icon-size = 16;
spacing = 4; spacing = 6;
}; };
"clock" = { "clock" = {
interval = 1; interval = 1;
format = "{:%H:%M}"; format = "{:%H:%M:%S}";
tooltip-format = "{:%d.%m.%Y}"; tooltip-format = "{:%d.%m.%Y}";
}; };
battery = { battery = {
@ -891,25 +895,24 @@ in {
#backlight, #backlight,
#workspaces, #workspaces,
#taskbar, #taskbar,
#taskbar button,
#language, #language,
#clock, #clock,
#battery, #battery,
#backlight, #backlight,
#wireplumber, #wireplumber,
#workspaces button,
#custom-separator { #custom-separator {
padding: 0 0.3em; padding: 0 0.3em;
} }
#privacy,
#tray button,
#privacy-item,
#idle_inhibitor,
#custom-notification, #custom-notification,
#idle_inhibitor,
#power-profiles-daemon, #power-profiles-daemon,
#workspaces button { #privacy,
padding: 0 0.3em; #privacy-item,
} #tray button {
#taskbar button { padding: 0 0.4em;
padding: 0 0.1em; margin: 0 0.2em;
} }
#workspaces button.active { #workspaces button.active {
color: @base0D; color: @base0D;