niri: configure wallpaper and wlsunset
This commit is contained in:
@@ -2,12 +2,17 @@
|
||||
wrappers,
|
||||
pkgs,
|
||||
lib,
|
||||
screenshotPath ? "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png",
|
||||
screenshotPath ? null,
|
||||
fileManager ? lib.getExe pkgs.pcmanfm,
|
||||
browser ? lib.getExe pkgs.firefox,
|
||||
terminal ? lib.getExe pkgs.alacritty,
|
||||
runnerCommand ? "${lib.getExe pkgs.rofi} -show run",
|
||||
locker ? lib.getExe pkgs.swaylock,
|
||||
wallpaperPath ? null,
|
||||
geolocation ? [
|
||||
52.5244
|
||||
13.4105
|
||||
],
|
||||
}:
|
||||
let
|
||||
colors = {
|
||||
@@ -18,12 +23,18 @@ let
|
||||
|
||||
niri = wrappers.wrapperModules.niri.apply {
|
||||
inherit pkgs;
|
||||
settings = {
|
||||
settings = builtins.foldl' lib.recursiveUpdate { } (
|
||||
[
|
||||
{
|
||||
input = {
|
||||
keyboard = {
|
||||
xkb.layout = "de";
|
||||
numlock = null;
|
||||
};
|
||||
touchpad = {
|
||||
tap = null;
|
||||
drag = true;
|
||||
};
|
||||
mouse = null;
|
||||
trackpoint = null;
|
||||
warp-mouse-to-focus = null;
|
||||
@@ -55,10 +66,29 @@ let
|
||||
};
|
||||
spawn-at-startup = [
|
||||
(lib.getExe pkgs.ashell-kmein)
|
||||
];
|
||||
]
|
||||
++ lib.optional (wallpaperPath != null) [
|
||||
(lib.getExe pkgs.swaybg)
|
||||
"--mode"
|
||||
"fill"
|
||||
"--image"
|
||||
wallpaperPath
|
||||
]
|
||||
++ lib.optional (geolocation != null) (
|
||||
let
|
||||
latitude = builtins.elemAt geolocation 0;
|
||||
longitude = builtins.elemAt geolocation 1;
|
||||
in
|
||||
[
|
||||
(lib.getExe pkgs.wlsunset)
|
||||
"-l"
|
||||
(toString latitude)
|
||||
"-L"
|
||||
(toString longitude)
|
||||
]
|
||||
);
|
||||
hotkey-overlay.skip-at-startup = null;
|
||||
prefer-no-csd = null;
|
||||
screenshot-path = screenshotPath;
|
||||
animations.slowdown = 0.5; # twice as fast
|
||||
binds =
|
||||
let
|
||||
@@ -143,17 +173,25 @@ let
|
||||
"Mod+V".toggle-window-floating = null;
|
||||
"Mod+Shift+V".switch-focus-between-floating-and-tiling = null;
|
||||
|
||||
"Print".screenshot = null;
|
||||
"Ctrl+Print".screenshot-screen = null;
|
||||
"Alt+Print".screenshot-window = null;
|
||||
|
||||
# allow-inhibiting=false
|
||||
"Mod+Escape".toggle-keyboard-shortcuts-inhibit = null;
|
||||
|
||||
"Mod+Shift+E".quit = null;
|
||||
"Ctrl+Alt+Delete".quit = null;
|
||||
};
|
||||
}
|
||||
]
|
||||
++ lib.optional (screenshotPath != null) [
|
||||
{
|
||||
screenshot-path = screenshotPath;
|
||||
binds = {
|
||||
"Print".screenshot = null;
|
||||
"Ctrl+Print".screenshot-screen = null;
|
||||
"Alt+Print".screenshot-window = null;
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
};
|
||||
in
|
||||
niri.wrapper
|
||||
|
||||
Reference in New Issue
Block a user