-
Notifications
You must be signed in to change notification settings - Fork 0
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
detecting cell size #26
Comments
@xaizek to loop you in |
I tried this from the bash bible again and this time it work. I must have done something wrong the last time I tried using it... get_window_size() {
# Usage: get_window_size
printf '%b' "${TMUX:+\\ePtmux;\\e}\\e[14t${TMUX:+\\e\\\\}"
IFS=';t' read -d t -t 0.05 -sra term_size
printf '%s\n' "${term_size[1]}x${term_size[2]}"
} |
it looks like the above function only returns a valid value interrmittently $ resolution_window_get
469x696
$ resolution_window_get
^[[4;469;696t469x696
$ resolution_window_get
469x696
$ resolution_window_get
469x696
$ resolution_window_get
^[[4;469;696t469x696
$ resolution_window_get
^[[4;469;696t469x696
$ resolution_window_get
^[[4;469;696t469x696
$ resolution_window_get
^[[4;469;696t469x696
$ resolution_window_get
469x696 |
the script still needs to be updated to use terminal-reported cell size but a separate/new issue and PR can be created for that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
per vifm/vifm#419 (comment)
google-searching shows that this returns rows and columns
stty size
and this does work here in foot terminal and xterm. There is also $LINES and $COLUMNS env vars.But how should window resolution should be detected
update: the function above does not return resolution from vifm-spawned script call :(
The text was updated successfully, but these errors were encountered: