Replace hyprpaper with wpaperd and get rid of hyprland

This commit is contained in:
Jimbo 2024-12-25 00:53:30 -05:00
parent 4565265f6e
commit c13f95df8f
22 changed files with 23 additions and 503 deletions

View file

@ -2,21 +2,24 @@
{
imports = [
./grimedit
./hyprpaper
./mako
./swappy
./swaylock
./waybar
./wlpicker
./wpaperd
];
home.packages = with pkgs; [
brightnessctl
clipman
grim
hyprpicker
libnotify
rot8
slurp
wdisplays
wl-clipboard
wlsunset
wdisplays
];
}

View file

@ -3,17 +3,17 @@
home.packages = with pkgs; [
(pkgs.writeScriptBin "grimedit" ''
# Freeze the screen using hyprpicker
${pkgs.hyprpicker}/bin/hyprpicker -r -z &
hyprpicker -r -z &
HYPRPICKER_PID=$!
sleep 0.1
# Select area
GEOM=$(${pkgs.slurp}/bin/slurp -w 3 -c ${config.look.colors.prime} -B 00000066 -b 00000099)
GEOM=$(slurp -w 3 -c ${config.look.colors.prime} -B 00000066 -b 00000099)
# Check selection is canceled
if [ -z "$GEOM" ]; then
kill $HYPRPICKER_PID 2>/dev/null
notify-send -t 3000 -a grimblast "Error" "No area selected."
notify-send -t 3000 -a grim "Error" "No area selected."
exit 1
fi

View file

@ -1,21 +0,0 @@
{ pkgs, config, ... }:
{
home.packages = with pkgs; [ hyprpaper ];
services.hyprpaper = {
enable = true;
settings = {
splash = false;
preload = [
"~/.assets/wallpapers/1.png"
"~/.assets/wallpapers/2.png"
"~/.assets/wallpapers/3.png"
];
wallpaper = [
",~/.assets/wallpapers/1.png"
"${config.displays.d2},~/.assets/wallpapers/2.png"
"${config.displays.d3},~/.assets/wallpapers/3.png"
];
};
};
}

View file

@ -2,18 +2,15 @@
{
home.packages = with pkgs; [
(pkgs.writeScriptBin "makotoggle" ''
# Run makoctl mode and store the output in a variable
mode_output=$(makoctl mode)
# Extract the second line after "default"
mode_line=$(echo "$mode_output" | sed -n '/default/{n;p}')
if [[ "$mode_line" == "do-not-disturb" ]]; then
# Notifications are disabled, so we enable them
makoctl mode -r do-not-disturb
notify-send 'Notifications Enabled'
else
# Notifications are enabled, so we disable them
notify-send 'Notifications Disabled'
sleep 2
makoctl mode -a do-not-disturb

View file

@ -9,7 +9,7 @@
sleep 1
# Store the hex color value using imagemagick
grim -g "$position" -t png - | convert - -format '%[pixel:p{0,0}]' txt:- | tail -n 1 | cut -d ' ' -f 4 | wl-copy -n
grim -g "$position" -t png - | magick - -format '%[pixel:p{0,0}]' txt:- | tail -n 1 | cut -d ' ' -f 4 | wl-copy -n
'')
];
}

View file

@ -0,0 +1,11 @@
{ config, ... }:
{
programs.wpaperd = {
enable = true;
settings = {
any.path = "~/.assets/wallpapers/1.png";
"${config.displays.d2}".path = "~/.assets/wallpapers/2.png";
"${config.displays.d3}".path = "~/.assets/wallpapers/3.png";
};
};
}