attempt 1
This commit is contained in:
parent
3874d7b1b0
commit
46c552076e
3 changed files with 113 additions and 34 deletions
|
|
@ -155,30 +155,23 @@
|
||||||
) automapaper-configs;
|
) automapaper-configs;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# "autostart/spotify.desktop".source = config.lib.file.mkOutOfStoreSymlink "";
|
"niri/config.kdl".source = import ../../packages/niri-config/default.nix {
|
||||||
"niri/config.kdl".source = pkgs.substituteAll {
|
pkgs = pkgs;
|
||||||
src = ../../extra/niri.kdl;
|
self-pkgs = spkgs;
|
||||||
env = {
|
inputs = inputs;
|
||||||
kitty = "${pkgs.kitty}/bin/kitty";
|
displays = [
|
||||||
launcher = "${spkgs.fuzzel-launch}/bin/fuzzel-launch";
|
{
|
||||||
powermenu = "${spkgs.fuzzel-power}/bin/fuzzel-power";
|
name = "eDP-1";
|
||||||
swaylock = "${pkgs.swaylock}/bin/swaylock";
|
horizontal-resolution = 2256;
|
||||||
automapaper = automapaper;
|
horizontal-position = 0;
|
||||||
spotify = "spotify";
|
vertical-resolution = 1504;
|
||||||
keepass = "keepassxc";
|
framerate = "59.999";
|
||||||
thunderbird = "thunderbird";
|
}
|
||||||
appbar = "${pkgs.waybar}/bin/waybar";
|
|
||||||
extra =
|
|
||||||
"spawn-at-startup \""
|
|
||||||
+ lib.strings.concatStringsSep "\nspawn-at-startup \"" [
|
|
||||||
"${pkgs.dunst}/bin/dunst\""
|
|
||||||
"${pkgs.xwayland-satellite}/bin/xwayland-satellite\""
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
"root" = import ./root.nix;
|
"root" = import ./root.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
95
packages/niri-config/default.nix
Normal file
95
packages/niri-config/default.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
self-pkgs,
|
||||||
|
inputs,
|
||||||
|
displays,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
terminal = "${pkgs.kitty}/bin/kitty";
|
||||||
|
launcher = "${self-pkgs.fuzzel-launch}/bin/fuzzel-launch";
|
||||||
|
power-menu = "${self-pkgs.fuzzel-power}/bin/fuzzel-power";
|
||||||
|
lockscreen = "${pkgs.swaylock}/bin/swaylock";
|
||||||
|
wallpapers =
|
||||||
|
let
|
||||||
|
automapaper-configs = builtins.map (
|
||||||
|
{
|
||||||
|
name,
|
||||||
|
horizontal-resolution,
|
||||||
|
vertical-resolution,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
display-shader = pkgs.substituteAll {
|
||||||
|
src = ../../modules/automapaper/display-with_vars.glsl;
|
||||||
|
background = inputs.nix-colors.lib.conversions.hexToGLSLVec "101012";
|
||||||
|
foreground = inputs.nix-colors.lib.conversions.hexToGLSLVec "192291";
|
||||||
|
};
|
||||||
|
state-shader = ../../modules/automapaper/state-game_of_life.glsl;
|
||||||
|
init-shader = ../../modules/automapaper/init.glsl;
|
||||||
|
|
||||||
|
# General configurations
|
||||||
|
cycles = 2000;
|
||||||
|
tps = 30;
|
||||||
|
horizontal-dot-size = 10;
|
||||||
|
vertical-dot-size = 10;
|
||||||
|
in
|
||||||
|
(import ../../modules/automapaper/config.nix {
|
||||||
|
inherit (pkgs) writeTextFile;
|
||||||
|
inherit
|
||||||
|
init-shader
|
||||||
|
state-shader
|
||||||
|
display-shader
|
||||||
|
name
|
||||||
|
tps
|
||||||
|
cycles
|
||||||
|
;
|
||||||
|
horizontal = builtins.div horizontal-resolution horizontal-dot-size;
|
||||||
|
vertical = builtins.div vertical-resolution vertical-dot-size;
|
||||||
|
})
|
||||||
|
) displays;
|
||||||
|
in
|
||||||
|
pkgs.lib.strings.concatMapStringsSep "\n" (
|
||||||
|
file:
|
||||||
|
''spawn-at-startup "${
|
||||||
|
inputs.automapaper.packages.${pkgs.system}.automapaper
|
||||||
|
}/bin/automapaper" "-C" "${file}/config.toml"''
|
||||||
|
) automapaper-configs;
|
||||||
|
autostart-string =
|
||||||
|
"spawn-at-startup \""
|
||||||
|
+ pkgs.lib.strings.concatStringsSep "\nspawn-at-startup \"" [
|
||||||
|
"${pkgs.dunst}/bin/dunst\""
|
||||||
|
"${pkgs.xwayland-satellite}/bin/xwayland-satellite\""
|
||||||
|
"spotify\""
|
||||||
|
"keepassxc\""
|
||||||
|
"thunderbird\""
|
||||||
|
"${pkgs.waybar}/bin/waybar\""
|
||||||
|
];
|
||||||
|
|
||||||
|
displays-string = pkgs.lib.strings.concatMapStringsSep "\n" (
|
||||||
|
{
|
||||||
|
name,
|
||||||
|
horizontal-resolution,
|
||||||
|
vertical-resolution,
|
||||||
|
framerate,
|
||||||
|
horizontal-position,
|
||||||
|
}:
|
||||||
|
''
|
||||||
|
output "${name}" {
|
||||||
|
mode "${builtins.toString horizontal-resolution}x${builtins.toString vertical-resolution}@${framerate}"
|
||||||
|
scale 1
|
||||||
|
transform "normal"
|
||||||
|
position x=${builtins.toString horizontal-position} y=0
|
||||||
|
}
|
||||||
|
''
|
||||||
|
) displays;
|
||||||
|
in
|
||||||
|
pkgs.substituteAll {
|
||||||
|
src = ./template.kdl;
|
||||||
|
terminal = terminal;
|
||||||
|
launcher = launcher;
|
||||||
|
power_menu = power-menu;
|
||||||
|
lockscreen = lockscreen;
|
||||||
|
wallpapers = wallpapers;
|
||||||
|
|
||||||
|
displays = displays-string;
|
||||||
|
autostart = autostart-string;
|
||||||
|
}
|
||||||
|
|
@ -23,12 +23,7 @@ input {
|
||||||
focus-follows-mouse max-scroll-amount="40%"
|
focus-follows-mouse max-scroll-amount="40%"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "eDP-1" {
|
@displays@
|
||||||
mode "2256x1504@59.999"
|
|
||||||
scale 1
|
|
||||||
transform "normal"
|
|
||||||
position x=0 y=0
|
|
||||||
}
|
|
||||||
|
|
||||||
layout {
|
layout {
|
||||||
// Set gaps around windows in logical pixels.
|
// Set gaps around windows in logical pixels.
|
||||||
|
|
@ -120,11 +115,7 @@ layout {
|
||||||
// which may be more convenient to use.
|
// which may be more convenient to use.
|
||||||
// See the binds section below for more spawn examples.
|
// See the binds section below for more spawn examples.
|
||||||
// spawn-at-startup "alacritty" "-e" "fish"
|
// spawn-at-startup "alacritty" "-e" "fish"
|
||||||
@automapaper@
|
@wallpapers@
|
||||||
spawn-at-startup "@spotify@"
|
|
||||||
spawn-at-startup "@keepass@"
|
|
||||||
spawn-at-startup "@thunderbird@"
|
|
||||||
spawn-at-startup "@appbar@"
|
|
||||||
|
|
||||||
@extra@
|
@extra@
|
||||||
|
|
||||||
|
|
@ -226,10 +217,10 @@ binds {
|
||||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||||
|
|
||||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||||
Mod+Return { spawn "@kitty@"; }
|
Mod+Return { spawn "@terminal@"; }
|
||||||
Mod+Space { spawn "@launcher@"; }
|
Mod+Space { spawn "@launcher@"; }
|
||||||
Mod+P { spawn "@powermenu@"; }
|
Mod+P { spawn "@power_menu@"; }
|
||||||
Super+Alt+L { spawn "@swaylock@"; }
|
Super+Alt+L { spawn "@lockscreen@"; }
|
||||||
|
|
||||||
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
||||||
// Note: the entire command goes as a single argument in the end.
|
// Note: the entire command goes as a single argument in the end.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue