Revert "timewall background processes"

This reverts commit 285502e527817287da639801206026c927d874e5.

Ryan Gibb babb1877 285502e5

Changed files
+20 -49
home
modules
+1 -44
flake.lock
···
"nixpkgs-flaresolverr": "nixpkgs-flaresolverr",
"nixpkgs-sonarr": "nixpkgs-sonarr",
"nixpkgs-unstable": "nixpkgs-unstable",
-
"nur": "nur",
-
"timewall": "timewall"
-
}
-
},
-
"rust-overlay": {
-
"inputs": {
-
"nixpkgs": [
-
"timewall",
-
"nixpkgs"
-
]
-
},
-
"locked": {
-
"lastModified": 1734230139,
-
"narHash": "sha256-zsp0Mz8VgyIAnU8UhP/YT1g+zlsl+NIJTBMAbY+RifQ=",
-
"owner": "oxalica",
-
"repo": "rust-overlay",
-
"rev": "150fbc8aa2bc501041810bbc1dbfe73694a861be",
-
"type": "github"
-
},
-
"original": {
-
"owner": "oxalica",
-
"repo": "rust-overlay",
-
"type": "github"
+
"nur": "nur"
},
"scss-reset": {
···
"original": {
"owner": "nix-systems",
"repo": "default",
-
"type": "github"
-
}
-
},
-
"timewall": {
-
"inputs": {
-
"nixpkgs": [
-
"nixpkgs"
-
],
-
"rust-overlay": "rust-overlay"
-
},
-
"locked": {
-
"lastModified": 1737283895,
-
"narHash": "sha256-Ec+jlOQMnPcabN5fSep1KFfCcRl3FCE68zoNwpFwAS8=",
-
"owner": "RyanGibb",
-
"repo": "timewall",
-
"rev": "ff67aafa70dd8f6e1858e8ac2e64851664af235e",
-
"type": "github"
-
},
-
"original": {
-
"owner": "RyanGibb",
-
"repo": "timewall",
"type": "github"
},
-3
flake.nix
···
hyperbib-eeg.url = "github:RyanGibb/hyperbib?ref=nixify";
nix-rpi5.url = "gitlab:vriska/nix-rpi5?ref=main";
nur.url = "github:nix-community/NUR/e9e77b7985ef9bdeca12a38523c63d47555cc89b";
-
timewall.url = "github:RyanGibb/timewall";
# deduplicate flake inputs
eilean.inputs.nixpkgs.follows = "nixpkgs";
···
hyperbib-eeg.inputs.nixpkgs.follows = "nixpkgs";
nix-rpi5.inputs.nixpkgs.follows = "nixpkgs";
nur.inputs.nixpkgs.follows = "nixpkgs";
-
timewall.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
···
config = nixpkgsConfig;
}).sonarr;
swaylock-plugin = prev.callPackage ./pkgs/swaylock-plugin.nix { };
-
timewall = inputs.timewall.packages.${system}.default;
})
inputs.nur.overlays.default
];
+18 -1
home/gui/timewall.toml
···
lon = 0
[setter]
-
command = [ "swaybg", "-i", "%f", "-c", "282828", "-m", "fill" ]
+
# 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
+
"""
+
]
+1 -1
modules/gui/default.nix
···
pulseaudio
tridactyl-native
vlc
-
timewall
+
overlay-unstable.timewall
swaybg
]
++ desktopEntries;