My Nix Configuration

[home.wayland] Update configuration

pyrox.dev 480dbc95 9d61c9c4

verified
Changed files
+58 -44
modules
-1
modules/home/wayland/keybindings.nix
···
"${mod}+d" = "${menu}";
"${mod}+Shift+F" = "exec MOZ_DISABLE_RDD_SANDBOX=1 firefox";
"${mod}+Return" = "exec ${term}";
-
# "${mod}+Shift+Return" = "exec ${pkgs.wezterm}/bin/wezterm";
"${mod}+x" = "exec wlogout";
"${mod}+s" = null;
"${mod}+w" = null;
+4 -4
modules/home/wayland/sway.nix
···
};
config = {
terminal = lib.getExe pkgs.ghostty;
-
menu = "exec ${term} --class=py.floating --window-height=15 --window-width=10 --font-size=16 -e ${pkgs.sway-launcher-desktop}/bin/sway-launcher-desktop";
+
menu = "exec ${term} --class=py.floating --window-height=20 --window-width=12 --font-size=14 -e ${pkgs.sway-launcher-desktop}/bin/sway-launcher-desktop";
modifier = "Mod4";
bars = [ { command = "true"; } ];
focus = {
···
size = 12.0;
};
gaps = {
-
inner = 4;
-
outer = 4;
-
smartBorders = "off";
+
inner = 1;
+
outer = 1;
+
smartBorders = "on";
smartGaps = false;
};
input = {
+13 -11
modules/home/wayland/waybar-style.css
···
}
#window {
-
padding: 0 10px;
+
padding: 0 4px;
+
}
+
+
.modules-center {
+
padding-right: 20px;
}
window#waybar {
···
#workspaces button {
padding: 0 8px;
color: @text;
-
border: 2px solid @subtext0;
-
border-radius: 10px;
+
border-bottom: 2px solid @subtext0;
+
border-radius: 0px;
min-width: 25px;
margin-right: 8px;
}
···
}
#workspaces button.focused {
-
border: 3px solid @mauve;
+
border-bottom: 3px solid @mauve;
+
font-weight: bold;
}
#workspaces button.urgent {
-
background-color: @red;
+
border: 2px solid @red;
}
#workspaces button:hover {
-
box-shadow: inherit;
border-color: @blue;
color: @blue;
}
···
color: @text;
}
-
#tray:hover,
#mode:hover,
#battery:hover,
#temperature:hover,
···
#idle_inhibitor:hover,
#sway-language:hover,
#backlight:hover {
-
padding: 2px 8px;
-
margin: 2px 5px;
+
background-color: @subtext1;
color: @base;
-
background-color: @subtext1;
}
#clock {
···
color: @red;
}
-
#battery.charging {
+
#battery.charging,
+
#battery.full {
color: @green;
}
+41 -28
modules/home/wayland/waybar.nix
···
pkgs,
lib,
config,
-
inputs,
-
system,
...
}:
let
···
"sway/workspaces"
"sway/mode"
];
-
modules-center = [ "custom/media" ];
+
modules-center = [ "mpris" ];
modules-right = [
"idle_inhibitor"
"wireplumber"
···
format = "{icon}";
};
"idle_inhibitor" = {
-
format = "{icon}";
+
format = "{icon} ";
format-icons = {
"activated" = "";
"deactivated" = "";
···
};
"clock" = {
tooltip-format = "<tt><small>{calendar}</small></tt>";
-
format = "{:%H:%M:%S}  ";
+
format = " {:%H:%M:%S}";
format-alt = "{%d %b %Y}";
interval = 1;
+
calendar = {
+
format = {
+
today = "<span color='#89b4fa'><b><u>{}</u></b></span>";
+
};
+
};
};
"cpu" = {
-
format = "{usage}% ";
+
format = " {usage}%";
interval = 5;
tooltip = false;
};
"memory" = {
-
format = "{}% ";
+
format = " {}%";
};
"temperature" = {
critical-threshold = 80;
-
format = "{temperatureC}°C {icon}";
+
format = "{icon} {temperatureC}°C";
format-icons = [
""
""
···
];
};
"backlight" = {
-
format = "{percent}% {icon}";
+
format = "{icon} {percent}%";
format-icons = [
"󰃚"
"󰃛"
···
};
"battery" = {
states = {
-
good = 80;
+
good = 65;
warning = 30;
critical = 15;
};
-
format = "{capacity}% {icon}";
-
format-charging = "{capacity}% 󰂄";
-
format-plugged = "{capacity}% ";
-
format-alt = "{time} {icon}";
+
full-at = 80;
+
format = "{icon} {capacity}%";
+
format-charging = "󰂄 {capacity}%";
+
format-plugged = " {capacity}%";
+
format-alt = "{icon} {time}";
format-icons = [
"󰂎"
"󰁺"
···
];
};
"network" = {
-
format-wifi = "{essid} <big></big>";
-
format-ethernet = "{ifname}: {ipaddr}/{cidr} 󰈀";
-
format-linked = "{ifname} (No IP) 󰄡";
-
format-disconnected = "Disconnected! ⚠";
+
format-wifi = "<big></big> {essid}";
+
format-ethernet = "󰈀 {ifname}: {ipaddr}/{cidr}";
+
format-linked = "󰄡 {ifname} (No IP)";
+
format-disconnected = "⚠ Disconnected!";
format-alt = "{ifname}: {ipaddr}/{cidr}";
on-click = lib.getExe pkgs.networkmanagerapplet;
};
"wireplumber" = {
-
format = "{volume}% {icon}";
+
format = "{icon} {volume}%";
format-muted = "󰝟";
format-icons = [
""
""
""
];
+
states = {
+
low = 15;
+
med = 40;
+
high = 60;
+
};
+
scroll-step = 5;
on-click = lib.getExe pkgs.pwvucontrol;
};
-
"custom/media" = {
-
format = "{icon}{}";
-
return-type = "json";
-
format-icons = {
-
Paused = " ";
-
Playing = " ";
+
mpris = {
+
format = "{status_icon} {dynamic}";
+
format-paused = "{status_icon} <i>{dynamic}</i>";
+
dynamic-order = [
+
"artist" "title"
+
];
+
status-icons = {
+
playing = "";
+
paused = "";
};
-
max-length = 70;
-
exec = ''${lib.getExe pkgs.playerctl} -a metadata --format '{"text": "{{playerName}}: {{artist}} - {{markup_escape(title)}}", "tooltip": "{{playerName}} : {{markup_escape(title)}}", "alt": "{{status}}", "class": "{{status}}"}' -F'';
-
on-click = "${lib.getExe pkgs.playerctl} play-pause";
+
player-icons = {
+
firefox = "󰈹";
+
};
};
};
};