1

Modules/Niri: Use waypaper with swww backend instead of swaybg

This commit is contained in:
2026-03-21 10:59:19 +01:00
parent 98a3788f4f
commit 0bb481c037
3 changed files with 42 additions and 7 deletions

View File

@ -134,7 +134,7 @@ in {
nr = "nix run"; nr = "nix run";
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra"; # env var for wayland ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra"; # env var for wayland
sy = "sudo -E -u ${username} yazi"; sy = "sudo -u ${username} yazi";
} }
# Abbrs only available if package is installed # Abbrs only available if package is installed

View File

@ -77,6 +77,40 @@ in {
file = { file = {
# Link theme for flatpak # Link theme for flatpak
".themes/${config.gtk.theme.name}".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}"; ".themes/${config.gtk.theme.name}".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}";
".config/waypaper/config.ini".text = lib.generators.toINI {} {
Settings = {
use_xdg_state = true;
# Those are contained in the statefile (.local/state/waypaper/state.ini):
# backend = "swww";
# folder = "~/NixFlake/wallpapers";
# monitors = "All";
# wallpaper =
language = "en";
show_path_in_tooltip = true;
fill = "fill";
sort = "name";
color = "#ffffff";
subfolders = false;
all_subfolders = false;
show_hidden = false;
show_gifs_only = false;
zen_mode = false;
number_of_columns = 3;
swww_transition_type = "wipe";
swww_transition_step = 90;
swww_transition_angle = 30;
swww_transition_duration = 1;
swww_transition_fps = 60;
mpvpaper_sound = false;
# mpvpaper_options = "";
# post_command =
# stylesheet = /home/christoph/.config/waypaper/style.css
# keybindings = ~/.config/waypaper/keybindings.ini
};
};
}; };
sessionVariables = { sessionVariables = {
@ -96,7 +130,7 @@ in {
xwayland-satellite xwayland-satellite
# ncpamixer # Audio control # ncpamixer # Audio control
wiremix # Audio control wiremix # Audio control
swaybg swww
waypaper waypaper
# GTK apps (look good and work well with xdg portals) # GTK apps (look good and work well with xdg portals)
@ -367,7 +401,7 @@ in {
spawn-at-startup = [ spawn-at-startup = [
{argv = ["ashell" "-c" "${config.paths.dotfiles}/ashell/config.toml"];} {argv = ["ashell" "-c" "${config.paths.dotfiles}/ashell/config.toml"];}
{argv = ["waypaper" "--backend" "swaybg" "--fill" "fill" "--monitor" "All" "--folder" "${config.paths.nixflake}/wallpapers" "--restore"];} {argv = ["waypaper" "--restore"];}
{argv = ["kitty" "--hold" "fastfetch"];} {argv = ["kitty" "--hold" "fastfetch"];}
{argv = ["fcitx5"];} {argv = ["fcitx5"];}
@ -601,12 +635,12 @@ in {
hotkey-overlay = {title = "Edit the NixFlake.";}; hotkey-overlay = {title = "Edit the NixFlake.";};
}; };
"Mod+W" = { "Mod+W" = {
action = spawn "waypaper" "--backend" "swaybg" "--fill" "fill"; action = spawn "waypaper";
hotkey-overlay = {title = "Open wallpaper chooser.";}; hotkey-overlay = {title = "Open wallpaper chooser.";};
}; };
"Mod+Shift+W" = { "Mod+Shift+W" = {
action = spawn "waypaper" "--backend" "swaybg" "--fill" "fill" "--monitor" "All"; action = spawn "waypaper" "--random";
hotkey-overlay = {title = "Switch wallpaper.";}; hotkey-overlay = {title = "Select random wallpaper.";};
}; };
"Mod+A" = { "Mod+A" = {

View File

@ -97,6 +97,7 @@ in {
# which leads to /home not being unmounted correctly during shutdown... # which leads to /home not being unmounted correctly during shutdown...
]; ];
# TODO: I need something that lists stale folders in /persist (folders that are no longer mounted into the system)
directories = [ directories = [
# Home directory # Home directory
(mkUDir "Downloads" m755) (mkUDir "Downloads" m755)
@ -168,7 +169,6 @@ in {
# (mkUDir ".config/unity3d" m755) # Unity # (mkUDir ".config/unity3d" m755) # Unity
# (mkUDir ".config/unityhub" m755) # Unity # (mkUDir ".config/unityhub" m755) # Unity
(mkUDir ".config/vlc" m755) (mkUDir ".config/vlc" m755)
(mkUDir ".config/waypaper" m755)
(mkUDir ".config/Zeal" m755) (mkUDir ".config/Zeal" m755)
(mkUDir ".config/zed" m755) (mkUDir ".config/zed" m755)
@ -203,6 +203,7 @@ in {
(mkUDir ".local/state/lazygit" m755) (mkUDir ".local/state/lazygit" m755)
(mkUDir ".local/state/nix" m755) (mkUDir ".local/state/nix" m755)
(mkUDir ".local/state/nvim" m755) (mkUDir ".local/state/nvim" m755)
(mkUDir ".local/state/waypaper" m755)
(mkUDir ".local/state/wireplumber" m755) (mkUDir ".local/state/wireplumber" m755)
]; ];
}; };