mirror of
https://github.com/imomaliev/tmux-keyboard-layout.git
synced 2026-09-10 07:06:19 -04:00
config variables rename
This commit is contained in:
parent
b78d2eea9d
commit
d6156ae6ff
|
|
@ -7,8 +7,8 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||
# Place holder for status left/right
|
||||
place_holder="\#{keyboard_layout}"
|
||||
|
||||
keyboard_layout_option_scope='@keyboard_layout:option_scope'
|
||||
keyboard_layout_length='@keyboard_layout:length'
|
||||
option_scope_config='@keyboard_layout:option_scope'
|
||||
length_config='@keyboard_layout:length'
|
||||
get_keyboard_layout="$CURRENT_DIR/scripts/get_keyboard_layout.sh"
|
||||
|
||||
interpolate() {
|
||||
|
|
@ -20,8 +20,8 @@ interpolate() {
|
|||
}
|
||||
|
||||
main() {
|
||||
local -r option_scope=$(tmux show-option -gqv "${keyboard_layout_option_scope}")
|
||||
local -r length=$(tmux show-option -gqv "${keyboard_layout_length}")
|
||||
local -r option_scope=$(tmux show-option -gqv "${option_scope_config}")
|
||||
local -r length=$(tmux show-option -gqv "${length_config}")
|
||||
# https://unix.stackexchange.com/a/3455
|
||||
local -r keyboard_layout="#($get_keyboard_layout | cut -c1-${length:-16})"
|
||||
interpolate "status-left" "$keyboard_layout" "${option_scope:-g}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue