Revert "update"

This reverts commit afc39aef83b4376cdb90e462386cc43dd558d17e.

Ryan Gibb c87109e4 babb1877

Changed files
+4 -111
home
modules
gui
pkgs
-1
flake.nix
···
inherit system;
config = nixpkgsConfig;
}).sonarr;
-
swaylock-plugin = prev.callPackage ./pkgs/swaylock-plugin.nix { };
})
inputs.nur.overlays.default
];
+1 -1
home/gui/sway.nix
···
'';
locked = "--locked";
polkit_gnome = "${pkgs.polkit_gnome}";
-
locker = ''swaylock-plugin -f --command "timewall set --daemon"'';
+
locker = "swaylock -f -i ~/.cache/timewall/last_image";
enable_output = "swaymsg output $laptop_output enable";
disable_output = "swaymsg output $laptop_output disable";
drun = "wofi -i --show drun --allow-images -a";
+1 -18
home/gui/timewall.toml
···
lon = 0
[setter]
-
# TODO something better
-
command = [
-
"sh",
-
"-c",
-
"""
-
ln -fs %f ~/.cache/timewall/last_image
-
pid_file=~/.cache/timewall/pid-$(ps -o ppid= -p $(ps -o ppid= -p $$ | tr -d " ") | tr -d " ")
-
if [ -f "$pid_file" ]; then
-
old_pid=$(cat "$pid_file")
-
fi;
-
(setsid sh -c 'swaybg -i %f -c 282828 -m fill >/dev/null 2>&1 & echo $! > '"$pid_file"' && disown')
-
sleep 1
-
if kill -0 $old_pid 2>/dev/null; then
-
kill $old_pid &&
-
echo "Killed old swaybg process with PID $old_pid" >&2;
-
fi
-
"""
-
]
+
command = [ "sh", "-c", "ln -fs %f ~/.cache/timewall/last_image && (setsid swaybg -i %f -c 282828 -m fill >/dev/null 2>&1 &) && (sleep 1; (grep -v $(pgrep -nf ^swaybg) <(pgrep -f ^swaybg) | tee ~/x | xargs kill)) && exit 0" ]
+1
home/gui/wm/scripts/swayidle_suspend.sh
···
timeout 240 'loginctl lock-session'\
timeout 300 'systemctl suspend-then-hibernate'\
before-sleep 'playerctl -a pause; loginctl lock-session'\
+
after-resume 'pkill -x swaylock; timewall set; loginctl lock-session' # for timewall
+1 -3
modules/gui/sway.nix
···
wrapperFeatures.gtk = true; # so that gtk works properly
extraPackages = with pkgs; [
jq
-
swaylock-plugin
+
swaylock
swayidle
wl-clipboard
clipman
···
isAllowed = true;
isSystem = false;
};
-
-
security.pam.services.swaylock-plugin = {};
};
}
-88
pkgs/swaylock-plugin.nix
···
-
{
-
lib,
-
stdenv,
-
cairo,
-
fetchFromGitHub,
-
fetchpatch,
-
gdk-pixbuf,
-
libxcrypt,
-
libxkbcommon,
-
meson,
-
ninja,
-
nix-update-script,
-
pam,
-
pkg-config,
-
scdoc,
-
versionCheckHook,
-
wayland,
-
wayland-protocols,
-
wayland-scanner,
-
}:
-
-
stdenv.mkDerivation (finalAttrs: {
-
pname = "swaylock-plugin";
-
version = "1.8.0";
-
src = fetchFromGitHub {
-
owner = "mstoeckl";
-
repo = "swaylock-plugin";
-
rev = "refs/tags/v${finalAttrs.version}";
-
hash = "sha256-Kd6Gqs+YnQu3qKfEeqW5CG38bU2gH2hqjoFEojWa8a4=";
-
};
-
-
strictDeps = true;
-
depsBuildBuild = [ pkg-config ];
-
nativeInstallCheckInputs = [
-
versionCheckHook
-
];
-
nativeBuildInputs = [
-
meson
-
ninja
-
pkg-config
-
scdoc
-
wayland-scanner
-
];
-
buildInputs = [
-
cairo
-
libxcrypt
-
gdk-pixbuf
-
libxkbcommon
-
pam
-
wayland
-
wayland-protocols
-
];
-
-
patches = [
-
# To remove for release > 1.8.0
-
(fetchpatch {
-
url = "https://github.com/mstoeckl/swaylock-plugin/commit/337a6a31dc354426ebf32e31ded56a7e5d350c7a.patch";
-
hash = "sha256-r1BSubdnd0HzXvNDJm1qhdEltL27dHjPR1WlxaraHlc=";
-
})
-
];
-
-
mesonFlags = [
-
"-Dpam=enabled"
-
"-Dgdk-pixbuf=enabled"
-
"-Dman-pages=enabled"
-
];
-
-
passthru = {
-
updateScript = nix-update-script { };
-
};
-
-
meta = {
-
description = "Screen locker for Wayland, forked from swaylock";
-
longDescription = ''
-
swaylock-pulgins is a fork of swaylock, a screen locking utility for Wayland compositors.
-
On top of the usual swaylock features, it allow you to use a
-
subcommand to generate the lockscreen background.
-
-
Important note: You need to set "security.pam.services.swaylock-plugin = {};" manually.
-
'';
-
homepage = "https://github.com/mstoeckl/swaylock-plugin";
-
mainProgram = "swaylock-plugin";
-
license = lib.licenses.mit;
-
platforms = lib.platforms.linux;
-
maintainers = with lib.maintainers; [ picnoir ];
-
};
-
})
-