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

View file

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

View file

@ -109,7 +109,7 @@ in
"${key_mod}+${key_mod_misc}+Tab" = "workspace next";
"${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";
"Alt+F4" = "kill";