some more refinement
This commit is contained in:
@@ -15,14 +15,16 @@
|
||||
settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$browser" = "firefox";
|
||||
"$launcher-cmd" = "wofi --show drun -n";
|
||||
"$ide" = "code";
|
||||
|
||||
# Global bindings
|
||||
bind = [
|
||||
# Launch applications
|
||||
"$mod, space, exec, walker"
|
||||
"$mod, space, exec, $launcher-cmd"
|
||||
"$mod, return, exec, kitty"
|
||||
"$mod, b, exec, $browser"
|
||||
"$mod, s, exec, code"
|
||||
"$mod, s, exec, $ide"
|
||||
"$mod, e, exec, nautilus"
|
||||
|
||||
|
||||
@@ -51,7 +53,8 @@
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"${pkgs.hyprpaper}/bin/hyprpaper"
|
||||
# "${pkgs.hyprpaper}/bin/hyprpaper"
|
||||
# hyprpaper is handled as its own service
|
||||
"${pkgs.waybar}/bin/waybar"
|
||||
];
|
||||
|
||||
@@ -70,7 +73,7 @@
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
kb_options = "caps:control";
|
||||
kb_options = "caps:escape";
|
||||
numlock_by_default = true;
|
||||
# mouse input should be unchanged
|
||||
natural_scroll = false;
|
||||
@@ -98,14 +101,7 @@
|
||||
# color = "#000000";
|
||||
};
|
||||
|
||||
# set this on a per-program basis
|
||||
# blur = {
|
||||
# enabled = true;
|
||||
# size = 4;
|
||||
# passes = 2;
|
||||
# new_optimizations = true;
|
||||
# ignore_opacity = true;
|
||||
# };
|
||||
# blur is set on a per-program basis
|
||||
layerrule = [
|
||||
"blur, wofi"
|
||||
"ignorezero, wofi"
|
||||
@@ -130,22 +126,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
programs.walker = {
|
||||
enable = true;
|
||||
runAsService = true;
|
||||
|
||||
# All options from the config.json can be used here.
|
||||
config = {
|
||||
search.placeholder = "Search";
|
||||
ui.fullscreen = true;
|
||||
list = {
|
||||
height = 200;
|
||||
};
|
||||
websearch.prefix = "?";
|
||||
switcher.prefix = "/";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,15 +1,60 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
with lib; let
|
||||
wallpapers = builtins.path { path = ../../../wallpapers; };
|
||||
|
||||
wallpaperBashArray = "(\"${strings.concatStrings (strings.intersperse "\" \"" (map (wallpaper: "${wallpaper}") wallpapers))}\")";
|
||||
wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" ''
|
||||
wallpapers=${wallpaperBashArray}
|
||||
rand=$[$RANDOM % ''${#wallpapers[@]}]
|
||||
wallpaper=''${wallpapers[$rand]}
|
||||
|
||||
monitor=(`hyprctl monitors | grep Monitor | awk '{print $2}'`)
|
||||
hyprctl hyprpaper unload all
|
||||
hyprctl hyprpaper preload $wallpaper
|
||||
for m in ''${monitor[@]}; do
|
||||
hyprctl hyprpaper wallpaper "$m,$wallpaper"
|
||||
done
|
||||
'';
|
||||
in {
|
||||
home.packages = [wallpaperRandomizer];
|
||||
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# TODO: implement this correctly
|
||||
# preload = builtins.attrValues (builtins.readFile ../../../wallpapers/luke-chesser-eICUFSeirc0-unsplash.jpg);
|
||||
# wallpaper = [
|
||||
# ", ${builtins.attrValues (builtins.readFile ../../../wallpapers/luke-chesser-eICUFSeirc0-unsplash.jpg)}"
|
||||
# ];
|
||||
|
||||
# settings = {
|
||||
# ipc = "on";
|
||||
# splash = false;
|
||||
# splash_offset = 2.0;
|
||||
# };
|
||||
};
|
||||
|
||||
systemd.user = {
|
||||
services.wallpaperRandomizer = {
|
||||
Install = {WantedBy = ["graphical-session.target"];};
|
||||
|
||||
Unit = {
|
||||
Description = "Set random desktop background using hyprpaper";
|
||||
After = ["graphical-session-pre.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer";
|
||||
IOSchedulingClass = "idle";
|
||||
};
|
||||
};
|
||||
|
||||
timers.wallpaperRandomizer = {
|
||||
Unit = {Description = "Set random desktop background using hyprpaper on an interval";};
|
||||
|
||||
Timer = {OnUnitActiveSec = "6h";};
|
||||
|
||||
Install = {WantedBy = ["timers.target"];};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user