Improve hyprlock stuff
Some checks failed
pre-commit / pre-commit (push) Failing after 17s

This commit is contained in:
Torjus Håkestad 2024-06-10 02:26:51 +02:00
parent f67b65245b
commit 8ab6181448
6 changed files with 27 additions and 2 deletions

View File

@ -63,6 +63,7 @@
nixpkgs.overlays = [
overlay-stable
ghettoptt.overlays.default
huecli.overlays.default
];
})
./hosts/magicman

View File

@ -2,7 +2,7 @@ source = ~/.cache/wal/colors-hyprland.conf
# BACKGROUND
background {
monitor =
path = ~/wallpapers/current
path = /tmp/lock.png
blur_passes = 3
contrast = 0.8916
brightness = 0.8172

View File

@ -1,4 +1,7 @@
{ pkgs, config, ... }: {
imports = [
./lockhelper.nix
];
home.file.".local/bin/hl-no-opacity" = {
source = ./hl-no-opacity.sh;
executable = true;

View File

@ -0,0 +1,15 @@
{ pkgs, ... }:
let
lockhelper = pkgs.writeShellApplication {
name = "lockhelper";
runtimeInputs = with pkgs; [
grimblast
];
text = (builtins.readFile ./lockhelper.sh);
};
in
{
home.packages = [
lockhelper
];
}

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail
grimblast save output /tmp/lock.png || true
hyprlock

View File

@ -40,7 +40,7 @@ if command -v wal &> /dev/null; then
fi
unlink "$WALLPAPER_DIR/current" || true
ln -s "$wallpaper_path" "$WALLPAPER_DIR/current"
ln -s "$wallpaper_path" "$WALLPAPER_DIR/current.png"
for monitor in $(hyprctl monitors | grep 'Monitor' | awk '{ print $2 }'); do
hyprctl hyprpaper wallpaper "$monitor,$wallpaper_path"