Try to make river shutdown gracefully

This commit is contained in:
2024-07-10 11:52:23 +07:00
parent 69c14309af
commit 3a1825a93b
5 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
};
initial_session = {
# zsh -c is to give river access to profile variables
command = "zsh -c river";
command = "river";
user = "zoriya";
};
};
+7
View File
@@ -152,6 +152,13 @@ in {
StopWhenUnneeded = true;
Conflicts = ["graphical-session.target" "graphical-session-pre.target" "river-session.target"];
After = ["graphical-session.target" "graphical-session-pre.target" "river-session.target"];
Before = ["shutdown.target"];
};
Service = {
ExecStart = "${pkgs.procps}/bin/pidof river && ${pkgs.river}/bin/riverctl exit";
};
Install = {
WantedBy = ["shutdown.target"];
};
};
+1 -1
View File
@@ -44,7 +44,7 @@ function init() {
const conf = GLib.get_user_config_dir();
Utils.execAsync(
`bash -c 'ln -sf ${conf}/kitty/${theme.value}.conf ${conf}/kitty/theme.conf && pkill -USR1 kitty'`,
`/bin/sh -c 'ln -sf ${conf}/kitty/${theme.value}.conf ${conf}/kitty/theme.conf && pkill -USR1 kitty'`,
).catch(print);
});
}
+1 -1
View File
@@ -1,5 +1,5 @@
const screen = await Utils.execAsync(
"bash -c 'ls -w1 /sys/class/backlight | head -n 1'",
"/bin/sh -c 'ls -w1 /sys/class/backlight | head -n 1'",
);
const max = Number(await Utils.execAsync("brightnessctl m"));
-3
View File
@@ -34,7 +34,6 @@ in {
size = "250, 50";
outline_thickness = 0;
dots_size = 0.26;
inner_color = "rgb(255, 0, 0)";
dots_spacing = 0.64;
dots_center = true;
fade_on_empty = true;
@@ -49,7 +48,6 @@ in {
{
monitor = "";
text = ''cmd[update:1000] echo "<b><big> $(${pkgs.coreutils}/bin/date +"%H:%M") </big></b>"'';
color = "rgb(255, 0, 0)";
font_size = 64;
font_family = "monospace";
@@ -62,7 +60,6 @@ in {
{
monitor = "";
text = ''cmd[update:18000000] echo "<b> "$(${pkgs.coreutils}/bin/date +'%A, %-d %B %Y')" </b>"'';
color = "rgb(255, 0, 0)";
font_size = 24;
font_family = "monospace";