some niri and waybar tweaks

This commit is contained in:
Matt Nish-Lapidus 2025-02-11 12:46:32 -05:00
parent b4c0daf345
commit 3e1a2d075f
7 changed files with 149 additions and 94 deletions

54
flake.lock generated
View file

@ -69,11 +69,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1739207663, "lastModified": 1739266093,
"narHash": "sha256-H0Z/Uxh1EIoZRzpXgezQPekp3ccFd/WdUVinILVnM+Y=", "narHash": "sha256-Xs9Lvwh3mXARVY0DEgwN6pdPxueUmV/w8xUA5gR1m4M=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "66b6a800edf6c6ef58d021b81ab7e6a10ae34834", "rev": "20e2333eb7184318ddfa0c9269a8e509b6de85d6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -323,11 +323,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1739198052, "lastModified": 1739287084,
"narHash": "sha256-fvAgCGK2phagbKv2S4YH4AIM566TKasfWMqYl3c3mPQ=", "narHash": "sha256-CtRNJsqsXIArJV+AKWZVBMO8PD1FQB69br+WMtTJEgI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b0bd29bb4b8df265b13bbb4a6639afa74faaa831", "rev": "8f351726c5841d86854e7fa6003ea472352f5208",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -649,11 +649,11 @@
}, },
"locked": { "locked": {
"dir": "nix", "dir": "nix",
"lastModified": 1738565510, "lastModified": 1739117194,
"narHash": "sha256-xmr17yq6/wlcF/69GkRlKKkWAUC8ZjPeZMIuHdJnpfk=", "narHash": "sha256-2TVzGZFBLFnDXyvNP/dqQMNefdp6UtAQCTsIJSTJ448=",
"owner": "kmonad", "owner": "kmonad",
"repo": "kmonad", "repo": "kmonad",
"rev": "7784e590405429f5105d9d038cbe13f887160805", "rev": "21ad4d354e2ac6befb9679f12299942f318923ee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -712,11 +712,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1739206396, "lastModified": 1739274409,
"narHash": "sha256-dfU3l47sxFQbqLe5R9um//V5hplv/MhSwsZJR7JzBrg=", "narHash": "sha256-3FcN9tdRvU6U5DMaMYmXhqNermMn/E/fYXjYLSGjmGc=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "9f15e7ace2dea798ce3490d2f723095ad4cce0d4", "rev": "9d12c75d0956f3abcbd3e8084f5c5f6e4ce2b2c2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -745,11 +745,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1739201373, "lastModified": 1739269331,
"narHash": "sha256-6upEicgdJH3JaS1oXS+wsgLToU14XL8/aOyL2KcS3KY=", "narHash": "sha256-6l7NMhvbgUOQpv6KVK9PI7YGa2s+M+4L0sIv9CAsH3k=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "20769b4c2f843566880f020f117e7bde36edc332", "rev": "7b18ff8870c2610b3d532afef81a387a7a3f21d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1195,11 +1195,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738291974, "lastModified": 1739262228,
"narHash": "sha256-wkwYJc8cKmmQWUloyS9KwttBnja2ONRuJQDEsmef320=", "narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "4c1251904d8a08c86ac6bc0d72cc09975e89aef7", "rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1373,11 +1373,11 @@
}, },
"locked": { "locked": {
"dir": "nix", "dir": "nix",
"lastModified": 1739213592, "lastModified": 1739250321,
"narHash": "sha256-/KPhlBr2a3Be6X72H3oOubQBDIF21+ViU9czwEhL1A8=", "narHash": "sha256-MDmCkHp2BS1pS6LmQu2jQy+cFd9Aj/IORKE6zPEqGZY=",
"owner": "wez", "owner": "wez",
"repo": "wezterm", "repo": "wezterm",
"rev": "52c1ca749552af4d8a2f18ec10fe8f14b6622519", "rev": "3eb95c4668cad1ecb9c556c46a16303bee4d13a6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1407,11 +1407,11 @@
"xwayland-satellite-unstable": { "xwayland-satellite-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737837494, "lastModified": 1739246919,
"narHash": "sha256-wIMowP8Juas4ZwMRcpc+58sZ0kKTDu8fm13THPmv/F8=", "narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
"owner": "Supreeeme", "owner": "Supreeeme",
"repo": "xwayland-satellite", "repo": "xwayland-satellite",
"rev": "3944c9a0e40e5629f16ad023bbc90dac80d35a0f", "rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1429,11 +1429,11 @@
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1739209832, "lastModified": 1739275518,
"narHash": "sha256-HIguPyqa25pNd9sZr9V4Hc+9LtrLri8EtEXdMu1kgQM=", "narHash": "sha256-jcNiDYYDeQzVS5TIayo5mf3aMq1p8rOIcJgF1e3oCW8=",
"owner": "sxyazi", "owner": "sxyazi",
"repo": "yazi", "repo": "yazi",
"rev": "498623191a86b31cba990c963e22508db14a51ee", "rev": "a4dde6a8484c06b25013433433374186bbb81971",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -16,6 +16,7 @@
music music
langs langs
emacs emacs
swaync
]; ];
home = { home = {

View file

@ -1,6 +1,7 @@
(defwidget bar [] (defwidget bar []
(centerbox :orientation "h" (centerbox :orientation "h"
(workspaces) (time)
(workspaces)
(music) (music)
(sidestuff))) (sidestuff)))
@ -15,7 +16,7 @@
(metric :label "💾" (metric :label "💾"
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)} :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:onchange "") :onchange "")
time)) ))
(defwidget workspaces [] (defwidget workspaces []
(box :class "workspaces" (box :class "workspaces"
@ -55,9 +56,6 @@
(deflisten music :initial "" (deflisten music :initial ""
"playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true") "playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true")
(defpoll volume :interval "1s"
"scripts/getvol")
(defpoll time :interval "10s" (defpoll time :interval "10s"
"date '+%H:%M %b %d, %Y'") "date '+%H:%M %b %d, %Y'")
@ -66,8 +64,7 @@
:windowtype "dock" :windowtype "dock"
:geometry (geometry :x "0%" :geometry (geometry :x "0%"
:y "0%" :y "0%"
:width "90%" :width "99%"
:height "10px" :height "10px"
:anchor "top center") :anchor "top center")
:reserve (struts :side "top" :distance "4%")
(bar)) (bar))

View file

@ -61,9 +61,9 @@
}, },
"network": { "network": {
"format-wifi": "", "format-wifi": "",
"format-ethernet": "", "format-ethernet": "",
"format-disconnected": "!", "format-disconnected": "󰱟",
"tooltip-format": "{essid} {ifname}" "tooltip-format": "{essid} {ifname}",
"max-length": 50, "max-length": 50,
"on-click": "$HOME/.local/bin/wezlauncher nmtui", "on-click": "$HOME/.local/bin/wezlauncher nmtui",
}, },
@ -92,16 +92,15 @@
"format-paused": "{status_icon} <i>{dynamic}</i>", "format-paused": "{status_icon} <i>{dynamic}</i>",
"dynamic-len": 75, "dynamic-len": 75,
"player-icons": { "player-icons": {
"default": "", "default": "",
}, },
"status-icons": { "status-icons": {
"paused": "" "paused": ""
}, },
}, },
"wlr/taskbar": { "wlr/taskbar": {
"format": "{icon}", "format": "{icon}",
"icon-size": 20, "icon-size": 20,
"icon-theme": "Numix-Circle",
"tooltip-format": "{title}", "tooltip-format": "{title}",
"on-click": "activate", "on-click": "activate",
"app_ids-mapping": { "app_ids-mapping": {

View file

@ -31,16 +31,13 @@
soundconverter soundconverter
wmctrl wmctrl
# colloid-icon-theme
bibata-cursors
adwaita-qt
godot_4 godot_4
gdtoolkit_4 gdtoolkit_4
sane-airscan sane-airscan
xsane xsane
# bitwarden-cli nix-config.pkgs-stable.bitwarden-cli
bitwarden-desktop bitwarden-desktop
tailscale tailscale
trayscale trayscale
@ -80,7 +77,7 @@
switcheroo switcheroo
# blender nix-config.pkgs-stable.blender
davinci-resolve-studio davinci-resolve-studio
steam steam
processing processing
@ -131,10 +128,27 @@
name = pkgs.rice.cursor.name; name = pkgs.rice.cursor.name;
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
}; };
theme = {
name = "Colloid-Dark";
package = pkgs.colloid-gtk-theme.override {
tweaks = [ "normal" "nord" ];
themeVariants = [ "grey" ];
};
};
iconTheme = {
name = "Colloid";
package = nix-config.pkgs-stable.colloid-icon-theme;
};
}; };
qt = { qt = {
enable = true; enable = true;
platformTheme.name = "gtk3";
style = {
package = pkgs.adwaita-qt;
name = "adwaita-dark";
};
}; };
fonts = { fonts = {
@ -151,51 +165,11 @@
]; ];
}; };
services.swaync = {
enable = true;
settings = {
positionX = "right";
positionY = "top";
layer = "overlay";
control-center-layer = "top";
layer-shell = true;
cssPriority = "application";
control-center-margin-top = 0;
control-center-margin-bottom = 0;
control-center-margin-right = 0;
control-center-margin-left = 0;
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 64;
notification-body-image-height = 100;
notification-body-image-width = 200;
};
style =
''
.notification-row {
outline: none;
}
.notification-row:focus,
.notification-row:hover {
background: @noti-bg-focus;
}
.notification {
border-radius: 12px;
margin: 6px 12px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7),
0 2px 6px 2px rgba(0, 0, 0, 0.3);
padding: 0;
}
'';
};
programs = { programs = {
eww = { # eww = {
enable = true; # enable = true;
configDir = ../../homes/emenel/dotfiles/dot_config/eww; # configDir = ../../homes/emenel/dotfiles/dot_config/eww;
}; # };
firefox.enable = true; firefox.enable = true;
}; };

View file

@ -15,6 +15,7 @@ in {
{ command = ["clipse" "-listen"]; } { command = ["clipse" "-listen"]; }
{ command = ["swayosd-server"]; } { command = ["swayosd-server"]; }
{ command = ["waybar"]; } { command = ["waybar"]; }
# { command = ["eww" "daemon"]; }
{ command = [ "systemctl" "--user" "restart" "hypridle.service" "xwayland-satellite.service" ]; } { command = [ "systemctl" "--user" "restart" "hypridle.service" "xwayland-satellite.service" ]; }
]; ];
@ -165,12 +166,19 @@ in {
}; };
} }
# Open the Firefox picture-in-picture player as floating by default. { # Open the Firefox picture-in-picture player as floating by default.
{ # This app-id regular expression will work for both: # This app-id regular expression will work for both:
# host Firefox (app-id is "firefox") # host Firefox (app-id is "firefox")
# Flatpak Firefox (app-id is "org.mozilla.firefox") # Flatpak Firefox (app-id is "org.mozilla.firefox")
matches = [ { app-id= "r#\"firefox$\"# title=\"^Picture-in-Picture$\""; } ]; matches = [ { app-id= "r#\"firefox$\"# title=\"^Picture-in-Picture$\""; } ];
open-floating = true; } open-floating = true;
}
{ matches = [ { app-id="Renoise"; }
{ app-id="Bitwig"; }
{ app-id="labwc"; }];
open-maximized = true;
}
]; ];
switch-events = with config.lib.niri.actions; { switch-events = with config.lib.niri.actions; {
@ -273,8 +281,8 @@ in {
"Mod+Page_Up".action = focus-workspace-up; "Mod+Page_Up".action = focus-workspace-up;
"Mod+U".action = focus-workspace-down; "Mod+U".action = focus-workspace-down;
"Mod+I".action = focus-workspace-up; "Mod+I".action = focus-workspace-up;
"Mod+Alt+Down".action = move-column-to-workspace-down; "Mod+Ctrl+Page_Down".action = move-column-to-workspace-down;
"Mod+Alt+Up".action = move-column-to-workspace-up; "Mod+Ctrl+Page_Up".action = move-column-to-workspace-up;
"Mod+Ctrl+U".action = move-column-to-workspace-down; "Mod+Ctrl+U".action = move-column-to-workspace-down;
"Mod+Ctrl+I".action = move-column-to-workspace-up; "Mod+Ctrl+I".action = move-column-to-workspace-up;

76
modules/home/swaync.nix Normal file
View file

@ -0,0 +1,76 @@
{ config, lib, pkgs, ... }:
{
services.swaync = {
enable = true;
settings = {
positionX = "right";
positionY = "top";
layer = "overlay";
control-center-layer = "top";
layer-shell = true;
cssPriority = "application";
control-center-margin-top = 0;
control-center-margin-bottom = 0;
control-center-margin-right = 0;
control-center-margin-left = 0;
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 64;
notification-body-image-height = 100;
notification-body-image-width = 200;
image-visibility = "when-available";
widgets = [
"inhibitors"
"dnd"
"notifications"
];
widget-config = {
inhibitors = {
"text" = "Inhibitors";
"button-text" = "Clear All";
"clear-all-button" = true;
};
title = {
"text" = "Notifications";
"clear-all-button" = false;
"button-text" = "Clear All";
};
dnd = {
"text" = "Do Not Disturb";
};
label = {
"max-lines" = 5;
"text" = "Label Text";
};
};
};
style =
''
.control-center {
background: #111111;
border-radius: 6px;
padding: 6px;
border: 2px solid #34548a;
}
.notification-row {
outline: none;
}
.notification-row:focus,
.notification-row:hover {
background: @noti-bg-focus;
}
.notification {
border-radius: 6px;
margin: 6px 12px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7),
0 2px 6px 2px rgba(0, 0, 0, 0.3);
padding: 0;
}
'';
};
}