Compare commits

..

1 Commits

Author SHA1 Message Date
68c3f4008a feat: restore rofi instead of wofi 2025-11-02 04:23:00 +01:00
3 changed files with 15 additions and 94 deletions

View File

@@ -12,7 +12,6 @@ in {
./swaync.nix
./waybar.nix
./wlsunset.nix
./hyprpaper.nix
];
options.home.desktop.hyprland = {
@@ -34,7 +33,6 @@ in {
config = mkIf cfg.enable {
home.desktop = {
hyprpaper.enable = true;
rofi.enable = mkDefault true;
swaync.enable = mkDefault true;
waybar = {
@@ -43,7 +41,6 @@ in {
};
wlsunset.enable = mkDefault true;
};
services.blueman-applet.enable = true;
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
@@ -161,8 +158,6 @@ in {
bind = , escape, submap, reset
bind = CTRL, g, submap, reset
submap = rofi
bind = , b, exec, rofi-bluetooth
bind = , b, submap, reset
bind = , e, exec, rofi -show emoji
bind = , e, submap, reset
bind = , r, exec, $menu
@@ -277,5 +272,19 @@ in {
bind = SUPER_SHIFT, asterisk, movetoworkspace, 10
'';
};
services = {
blueman-applet.enable = true;
hyprpaper = let
img = "/home/phundrak/Pictures/Wallpapers/nord/Nordic6.jpg";
in {
enable = true;
settings = {
ipc = "on";
splash = false;
preload = img;
wallpaper = ", ${img}";
};
};
};
};
}

View File

@@ -1,88 +0,0 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.home.desktop.hyprpaper;
in {
options.home.desktop.hyprpaper = {
enable = mkEnableOption "Enables Hyprpaper";
default = mkOption {
type = types.str;
default = "/home/phundrak/Pictures/Wallpapers/nord/Nordic6.jpg";
example = "/home/user/image.jpg";
};
wallpapers-dir = mkOption {
type = types.str;
default = "/home/phundrak/Pictures/Wallpapers/nord/";
example = "/home/user/Pictures/";
};
rotation-interval = mkOption {
type = types.str;
default = "5m";
example = "10m";
description = "Interval between wallpaper rotations";
};
};
config = mkIf cfg.enable {
services.hyprpaper = {
inherit (cfg) enable;
settings = {
ipc = "on";
splash = false;
preload = cfg.default;
wallpaper = ", ${cfg.default}";
};
};
systemd.user = {
services.hyprpaper-rotation = {
Unit = {
Description = "Rotate Hyprpaper wallpaper";
After = "graphical-session.target";
};
Service = {
Type = "oneshot";
ExecCondition = "pidof Hyprland";
ExecStart = "${config.home.homeDirectory}/.config/hypr/hyprpaper-rotate.sh";
};
};
timers.hyprpaper-rotation = {
Unit = {
Description = "Timer for rotating Hyprpaper wallpaper";
};
Timer = {
OnBootSec = cfg.rotation-interval;
OnUnitActiveSec = cfg.rotation-interval;
};
Install = {
WantedBy = ["timers.target"];
};
};
};
home.file.".config/hypr/hyprpaper-rotate.sh" = {
text = ''
#!/usr/bin/env bash
set -euo pipefail
WALLPAPER_DIR="${cfg.wallpapers-dir}"
# Find a random wallpaper
WP=$(find "$WALLPAPER_DIR" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) | shuf -n 1)
if [ -z "$WP" ]; then
echo "No wallpapers found in $WALLPAPER_DIR"
exit 1
fi
echo "Setting wallpaper to: $WP"
# Load and set the wallpaper
hyprctl hyprpaper preload "$WP" && hyprctl hyprpaper wallpaper ",$WP"
'';
executable = true;
};
};
}

View File

@@ -12,7 +12,7 @@ in {
enable = mkEnableOption "Enable Rofi";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [rofi-bluetooth];
home.packages = with pkgs; [rofi-bluetooth rofi-systemd rofi-mpd];
programs.rofi = {
enable = true;
plugins = with pkgs; [