Compare commits
2 Commits
8b07a2c595
...
6a5afb5e35
| Author | SHA1 | Date | |
|---|---|---|---|
|
6a5afb5e35
|
|||
|
6d77b3a944
|
@@ -5,6 +5,9 @@
|
|||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
invert_image_avg = pkgs.callPackage ../util/inverse_color.nix;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.niri.homeModules.config
|
inputs.niri.homeModules.config
|
||||||
@@ -51,7 +54,9 @@
|
|||||||
focus-ring = {
|
focus-ring = {
|
||||||
enable = true;
|
enable = true;
|
||||||
active = {
|
active = {
|
||||||
color = "#bf7778";
|
color = builtins.readFile (invert_image_avg {
|
||||||
|
src = ../wallpaper.png;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -59,7 +64,7 @@
|
|||||||
spawn-at-startup = [
|
spawn-at-startup = [
|
||||||
{
|
{
|
||||||
command = [
|
command = [
|
||||||
"${lib.getExe config.programs.eww.package}"
|
(lib.getExe config.programs.eww.package)
|
||||||
"-c"
|
"-c"
|
||||||
"${config.programs.eww.configDir}"
|
"${config.programs.eww.configDir}"
|
||||||
"open"
|
"open"
|
||||||
@@ -70,7 +75,7 @@
|
|||||||
# swaybg works on more than just sway (sets a wallpaper)
|
# swaybg works on more than just sway (sets a wallpaper)
|
||||||
{
|
{
|
||||||
command = [
|
command = [
|
||||||
"${lib.getExe pkgs.swaybg}"
|
(lib.getExe pkgs.swaybg)
|
||||||
"-i"
|
"-i"
|
||||||
"${../wallpaper.png}"
|
"${../wallpaper.png}"
|
||||||
];
|
];
|
||||||
@@ -79,7 +84,7 @@
|
|||||||
# Xwayland on niri via xwayland-satellite
|
# Xwayland on niri via xwayland-satellite
|
||||||
{
|
{
|
||||||
command = [
|
command = [
|
||||||
"${lib.getExe pkgs.xwayland-satellite}"
|
(lib.getExe pkgs.xwayland-satellite)
|
||||||
config.programs.niri.settings.environment.DISPLAY
|
config.programs.niri.settings.environment.DISPLAY
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -125,14 +130,12 @@
|
|||||||
|
|
||||||
# https://github.com/sodiboo/niri-flake/issues/591
|
# https://github.com/sodiboo/niri-flake/issues/591
|
||||||
switch-events = with config.lib.niri.actions; {
|
switch-events = with config.lib.niri.actions; {
|
||||||
"lid-close".action = spawn "${pkgs.swaylock}/bin/swaylock";
|
"lid-close".action = spawn (lib.getExe pkgs.swaylock);
|
||||||
};
|
};
|
||||||
|
|
||||||
binds = with config.lib.niri.actions; {
|
binds = with config.lib.niri.actions; {
|
||||||
# Application launcher
|
# Application launcher
|
||||||
"Mod+Space".action = spawn [
|
"Mod+Space".action = spawn (lib.getExe pkgs.fuzzel);
|
||||||
"${pkgs.fuzzel}/bin/fuzzel"
|
|
||||||
];
|
|
||||||
|
|
||||||
"Mod+O".action = toggle-overview;
|
"Mod+O".action = toggle-overview;
|
||||||
|
|
||||||
@@ -140,7 +143,7 @@
|
|||||||
"Mod+T".action = spawn config.home.sessionVariables.TERMINAL;
|
"Mod+T".action = spawn config.home.sessionVariables.TERMINAL;
|
||||||
|
|
||||||
# lock the screen
|
# lock the screen
|
||||||
"Mod+X".action = spawn "${pkgs.swaylock}/bin/swaylock";
|
"Mod+X".action = spawn (lib.getExe pkgs.swaylock);
|
||||||
|
|
||||||
# screenshotting
|
# screenshotting
|
||||||
"Print".action = screenshot;
|
"Print".action = screenshot;
|
||||||
@@ -180,7 +183,7 @@
|
|||||||
|
|
||||||
# color picker and copies to clipboard
|
# color picker and copies to clipboard
|
||||||
"Mod+Ctrl+Alt+C".action = spawn [
|
"Mod+Ctrl+Alt+C".action = spawn [
|
||||||
"${pkgs.hyprpicker}/bin/hyprpicker"
|
(lib.getExe pkgs.hyprpicker)
|
||||||
"-za"
|
"-za"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
26
home-manager/util/inverse_color.nix
Normal file
26
home-manager/util/inverse_color.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
imagemagick,
|
||||||
|
gawk,
|
||||||
|
src,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "invert-image-avg";
|
||||||
|
version = "1.0";
|
||||||
|
|
||||||
|
inherit src;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
imagemagick
|
||||||
|
gawk
|
||||||
|
];
|
||||||
|
|
||||||
|
# input is a file, not a directory, skip unpackPhase
|
||||||
|
unpackPhase = "true";
|
||||||
|
|
||||||
|
# command taken from: https://old.reddit.com/r/swaywm/comments/oz3t7v/setting_a_blurred_background_with_swaylock_and/
|
||||||
|
buildPhase = ''
|
||||||
|
rm -fr $out
|
||||||
|
magick ${src} -channel RGB -negate -resize 1x1 txt: | awk 'FNR == 2 {print $3}' > $out
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user