-
Notifications
You must be signed in to change notification settings - Fork 0
/
overlay.nix
executable file
·55 lines (47 loc) · 1.65 KB
/
overlay.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{inputs, system}:
[
(final: prev: {
picom = prev.picom.overrideAttrs (old: {
src = prev.fetchFromGitHub {
owner = "yshui";
repo = "picom";
rev = "0fe4e0a1d4e2c77efac632b15f9a911e47fbadf3";
sha256 = "sha256-daLb7ebMVeL+f8WydH4DONkUA+0D6d+v+pohJb2qjOo=";
};
});
waybar = prev.waybar.overrideAttrs (old: {
mesonFlags = old.mesonFlags ++ [ "-Dexperimental=true" ];
});
sway-unwrapped = inputs.nixpkgs-wayland.packages.${system}.sway-unwrapped;
save-clipboard-to = prev.writeShellScriptBin "save-clipboard-to" ''
wl-paste > $HOME/Pictures/screenshot/$(date +'shot_%Y-%m-%d-%H%M%S.png')
'';
screen-recorder-toggle = prev.writeShellScriptBin "screen-recorder-toggle" ''
pid=`${prev.procps}/bin/pgrep wf-recorder`
status=$?
if [ $status != 0 ]
then
${prev.wf-recorder}/bin/wf-recorder -g "$(${prev.slurp}/bin/slurp)" -f $HOME/Videos/record/$(date +'recording_%Y-%m-%d-%H%M%S.mp4') --pixel-format yuv420p -t;
else
${prev.procps}/bin/pkill --signal SIGINT wf-recorder
fi;
'';
systemd-run-app = prev.writeShellApplication {
name = "systemd-run-app";
text = ''
name=$(${prev.coreutils}/bin/basename "$1")
id=$(${prev.openssl}/bin/openssl rand -hex 4)
exec systemd-run \
--user \
--scope \
--unit "$name-$id" \
--slice=app \
--same-dir \
--collect \
--property PartOf=graphical-session.target \
--property After=graphical-session.target \
-- "$@"
'';
};
})
]