add some streamlining

This commit is contained in:
alisceon 2026-03-18 11:01:18 +01:00
parent 0db4955f41
commit 3b4ea9be2a
3 changed files with 38 additions and 37 deletions

12
flake.lock generated
View file

@ -356,11 +356,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773821291, "lastModified": 1773827767,
"narHash": "sha256-iHmzt6YBzcBAj+Z+A0Fcb1gyPzRJjwFZI1vngUrjxtY=", "narHash": "sha256-RnBwsFyZMLtLg3Hscsn3t6t8s7tzZCUzjd7iC8hsTks=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "73c085b7083facfc4eece5487d6b5093b7922cf8", "rev": "d3e5ece3f6f9f8c3f319e9cbf39dbb274051652d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -377,11 +377,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773821291, "lastModified": 1773827767,
"narHash": "sha256-iHmzt6YBzcBAj+Z+A0Fcb1gyPzRJjwFZI1vngUrjxtY=", "narHash": "sha256-RnBwsFyZMLtLg3Hscsn3t6t8s7tzZCUzjd7iC8hsTks=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "73c085b7083facfc4eece5487d6b5093b7922cf8", "rev": "d3e5ece3f6f9f8c3f319e9cbf39dbb274051652d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,7 +1,8 @@
{ pkgs, ... }: { pkgs, repoRoot, ... }:
let let
commands = import ../../../lib/commands.nix { inherit pkgs; }; commands = import ../../../lib/commands.nix { inherit pkgs; };
inherit (commands) uwsm term; inherit (commands) uwsm term;
height = 20;
in in
{ {
programs.waybar = { programs.waybar = {
@ -13,20 +14,30 @@ in
settings.mainBar = { settings.mainBar = {
layer = "bottom"; layer = "bottom";
position = "top"; position = "top";
height = 28; height = height;
spacing = 0; spacing = 0;
modules-left = [ "sway/workspaces" ]; modules-left = [ "sway/workspaces" ];
modules-center = [ "sway/window" ]; modules-center = [ "sway/window" ];
modules-right = [ modules-right = [
"tray" "tray"
"idle_inhibitor"
"network"
"bluetooth"
"pulseaudio"
"battery" "battery"
"sway/language" "group/system"
"clock"
]; ];
"group/system" = {
"orientation" = "inherit";
"drawer"= {
"transition-duration" = 100;
"transition-left-to-right" = false;
};
"modules" = [
"clock"
"sway/language"
"network"
"bluetooth"
"pulseaudio"
"idle_inhibitor"
];
};
"sway/workspaces" = { "sway/workspaces" = {
on-click = "activate"; on-click = "activate";
sort-by-number = true; sort-by-number = true;
@ -34,7 +45,7 @@ in
}; };
"sway/window".max-length = 64; "sway/window".max-length = 64;
tray = { tray = {
icon-size = 24; icon-size = height;
spacing = 8; spacing = 8;
}; };
idle_inhibitor = { idle_inhibitor = {
@ -46,7 +57,7 @@ in
}; };
}; };
"sway/language" = { "sway/language" = {
format = "| {flag}"; format = "| {short}";
tooltip-format = "{long}"; tooltip-format = "{long}";
}; };
clock = { clock = {
@ -57,39 +68,29 @@ in
}; };
battery = { battery = {
interval = 60; interval = 60;
format = "| {icon}{capacity}%"; format = "| {capacity}%";
format-charging = "| {icon}{capacity}%"; format-charging = "| ch:{capacity}%";
format-plugged = "| {icon}🔌{capacity}%";
states = {
critical = 10;
warning = 20;
good = 100;
full = 100;
over = 101;
};
format-icons = [ "🪫" "🪫" "🔋" "🔋" "🔋" ];
}; };
network = { network = {
tooltip-format = "{ifname} = {ipaddr}/{cidr}"; tooltip-format = "{ifname} = {ipaddr}/{cidr}";
format-wifi = "| "; format-wifi = "| w:{ipaddr}";
format-ethernet = "| "; format-ethernet = "| e:{ipaddr}";
format-linked = "| 🔗"; format-linked = "| l:{ipaddr}";
format-disconnected = "| 💥"; format-disconnected = "| d";
interval = 15; interval = 15;
on-click = "${uwsm} ${term} -e nmtui"; on-click = "${uwsm} ${term} -e nmtui";
}; };
bluetooth = { bluetooth = {
format-connected = "| "; format = "| bt:{num_connections}";
format-on = "| ";
format-disabled = ""; format-disabled = "";
format-no-controller = ""; format-no-controller = "";
interval = 15; interval = 15;
on-click = "${uwsm} ${term} -e bluetui"; on-click = "${uwsm} ${term} -e bluetui";
}; };
pulseaudio = { pulseaudio = {
format = "| 🔊{volume}%"; format = "| snd{volume}%";
format-muted = "| 🔈0%"; format-muted = "| snd:-";
format-bluetooth = "| 🎧{volume}%"; format-bluetooth = "| snd(bt):{volume}%";
on-click = "${uwsm} pavucontrol"; on-click = "${uwsm} pavucontrol";
}; };
}; };

View file

@ -109,7 +109,7 @@ in
"${key_mod}+${key_mod_misc}+Tab" = "workspace next"; "${key_mod}+${key_mod_misc}+Tab" = "workspace next";
"${key_mod}+${key_mod_misc}+Shift+Tab" = "workspace prev"; "${key_mod}+${key_mod_misc}+Shift+Tab" = "workspace prev";
"Mod4+space" = "exec ${notify} -t 2000 \"$(${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/toggle_xkb.xsh)\""; "${key_mod}+space" = "exec ${notify} -t 2000 \"$(${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/toggle_xkb.xsh)\"";
"${key_mod}+Shift+q" = "kill"; "${key_mod}+Shift+q" = "kill";
"Alt+F4" = "kill"; "Alt+F4" = "kill";