Setting : Add popup timeout setting.

This commit is contained in:
Dmitry Voronin 2024-04-24 18:32:14 +03:00
parent 29ae818127
commit 434c9625b1
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
4 changed files with 9 additions and 8 deletions

View file

@ -1,4 +1,4 @@
{ ... }: {
{ setting, ... }: {
text = ''
### Input configuration
#
@ -38,6 +38,6 @@
}
# Hide mouse cursor after a period of inactivity.
seat seat0 hide_cursor 5000
seat seat0 hide_cursor ${setting.popup.timeout.ms}
'';
}

View file

@ -52,7 +52,8 @@
};
};
top.refresh = "2000";
top.refresh.ms = "2000";
popup.timeout.ms = "5000";
brightness.step = "5";
volume.step = "5";

View file

@ -1,10 +1,10 @@
{ style, util, ... }: {
{ style, util, setting, ... }: {
config = util.trimTabs ''
anchor=top-center
default-timeout=5000
default-timeout=${setting.popup.timeout.ms}
font=${style.font.serif.name} ${toString(style.font.size.popup)}
background-color=#${style.color.bg.regular}
border-color=#${style.color.bg.regular}
background-color=#${style.color.bg.dark}
border-color=#${style.color.bg.dark}
text-color=#${style.color.fg.light}
height=120
icons=0

View file

@ -55,7 +55,7 @@
shown_boxes = "cpu mem net proc"
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = ${setting.top.refresh}
update_ms = ${setting.top.refresh.ms}
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.