fix reload not working properly
This commit is contained in:
parent
70771bbac3
commit
9905b46153
1 changed files with 30 additions and 30 deletions
|
|
@ -86,38 +86,38 @@ let
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session-programs = lib.getExe (
|
session-programs = pkgs.writeShellApplication {
|
||||||
pkgs.writeShellApplication {
|
name = "session-programs";
|
||||||
name = "session-programs";
|
runtimeInputs = with pkgs; [
|
||||||
runtimeInputs = with pkgs; [
|
procps
|
||||||
procps
|
util-linux
|
||||||
util-linux
|
];
|
||||||
];
|
text = ''
|
||||||
text = ''
|
restart() {
|
||||||
restart() {
|
pattern=$1
|
||||||
pattern=$1
|
shift
|
||||||
shift
|
pkill -f "$pattern" || true
|
||||||
pkill -f "$pattern" || true
|
for _ in $(seq 50); do
|
||||||
for _ in $(seq 50); do
|
pgrep -f "$pattern" >/dev/null || break
|
||||||
pgrep -f "$pattern" >/dev/null || break
|
sleep 0.1
|
||||||
sleep 0.1
|
done
|
||||||
done
|
setsid "$@" >/dev/null 2>&1 </dev/null &
|
||||||
setsid "$@" >/dev/null 2>&1 </dev/null &
|
}
|
||||||
}
|
|
||||||
|
|
||||||
restart '/bin/elephant$' systemd-cat -t elephant ${lib.getExe pkgs.elephant}
|
restart '/bin/elephant$' systemd-cat -t elephant ${lib.getExe pkgs.elephant}
|
||||||
restart 'walker.* --gapplication-service' walker --gapplication-service
|
restart 'walker.* --gapplication-service' walker --gapplication-service
|
||||||
restart 'gaypanel-wrapped_' systemd-cat -t gaypanel gaypanel
|
restart 'gaypanel-wrapped_' systemd-cat -t gaypanel gaypanel
|
||||||
restart 'bin/swaybg ' ${lib.getExe pkgs.swaybg} -i ${../../../background.jpg} -m fill
|
restart 'bin/swaybg ' ${lib.getExe pkgs.swaybg} -i ${../../../background.jpg} -m fill
|
||||||
restart 'bin/swayosd-server ' ${lib.getExe' pkgs.swayosd "swayosd-server"} --style ${osd-style}
|
restart 'bin/swayosd-server ' ${lib.getExe' pkgs.swayosd "swayosd-server"} --style ${osd-style}
|
||||||
restart 'bin/swaync ' ${lib.getExe' swaync "swaync"} --style ${swaync-style} --config ${swaync-config}
|
restart 'bin/swaync ' ${lib.getExe' swaync "swaync"} --style ${swaync-style} --config ${swaync-config}
|
||||||
'';
|
'';
|
||||||
}
|
};
|
||||||
);
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ inputs.fht-compositor.nixosModules.default ];
|
imports = [ inputs.fht-compositor.nixosModules.default ];
|
||||||
|
|
||||||
|
environment.systemPackages = [ session-programs ];
|
||||||
|
|
||||||
# Prefer the GNOME portal (e.g. Nautilus as the file picker), falling back to GTK. This replaces
|
# Prefer the GNOME portal (e.g. Nautilus as the file picker), falling back to GTK. This replaces
|
||||||
# the portal config fht-compositor ships.
|
# the portal config fht-compositor ships.
|
||||||
xdg.portal.config.fht-compositor = {
|
xdg.portal.config.fht-compositor = {
|
||||||
|
|
@ -195,7 +195,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment.etc.${filename}.source = (pkgs.formats.toml { }).generate "config.toml" {
|
environment.etc.${filename}.source = (pkgs.formats.toml { }).generate "config.toml" {
|
||||||
autostart = [ session-programs ];
|
autostart = [ "session-programs" ];
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
focus-follows-mouse = true;
|
focus-follows-mouse = true;
|
||||||
|
|
@ -217,7 +217,7 @@ in
|
||||||
Super-Ctrl-q = "quit";
|
Super-Ctrl-q = "quit";
|
||||||
Super-Ctrl-r = {
|
Super-Ctrl-r = {
|
||||||
action = "run-command";
|
action = "run-command";
|
||||||
arg = "fht-compositor ipc action reload-config; ${session-programs}";
|
arg = "fht-compositor ipc action reload-config; session-programs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Runs when Super is tapped on its own (patched in, see lone-modifier.patch)
|
# Runs when Super is tapped on its own (patched in, see lone-modifier.patch)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue