-
-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom module update interval #101
Comments
is there a way to refresh it when the window changes? |
Currently you can not set a specific refresh interval per module. The interval is set globally using: set -g status-interval 1 Where "1" means 1 second. |
-g status-interval was set to 2. The problem is the the variable apparently. local text="$(get_tmux_option "@catppuccin_test_text" "#(date +%s)")" works fine - updated every two seconds. I am now trying to figure out how to pass the command directly into local text. Thank you. @peterkracik You could maybe try to re-source the conf when you switch windows via key-bindings. There's like a 0.3-0.5 delay when re-sourcing on my machine. Could you share it if you make it work? :) |
@lucky7xz did you find a solution? I'm facing the same issue |
When building my own module, I also often encountered the issue of a "stale" value: the module wouldn't update automatically. I would recommend to create a small companion script to take care of the |
Closing as original question seems to have been answered. |
Hi. The .sh module below works fine, except that I cannot figure out how to have it update itself.
show_mem() {
local index=$1
local icon="$(get_tmux_option "@catppuccin_test_icon" "")"
local color="$(get_tmux_option "@catppuccin_test_color" "$thm_blue")"
var=$(free --giga | awk '/^Mem:/ {print $3 "/" $7 "/" $2 "GB"}')
local text="$(get_tmux_option "@catppuccin_test_text" $var)"
local module=$( build_status_module "$index" "$icon" "$color" "$text" )
echo "$module"
}
I also have the battery module which is updated frequently. My guess is that custom modules work a little different in this regard. I appreciate your time. Thank you.
The text was updated successfully, but these errors were encountered: