mirror of
https://github.com/tumillanino/miasma-os.git
synced 2026-04-11 07:15:31 +00:00
move to new repo
This commit is contained in:
30
files/system/etc/skel/.tmux/plugins/tmux/tests/helpers.sh
Normal file
30
files/system/etc/skel/.tmux/plugins/tmux/tests/helpers.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Returns the value of given tmux option.
|
||||
# First argument is the option name, e.g. @catppuccin_flavor.
|
||||
#
|
||||
# Usage: `get_option @catppuccin_flavor`
|
||||
# Would return: `mocha`
|
||||
#
|
||||
# The option is given as a format string.
|
||||
get_option() {
|
||||
local option
|
||||
option=$1
|
||||
|
||||
tmux display-message -p "#{${option}}"
|
||||
}
|
||||
|
||||
# Prints the given tmux option to stdout.
|
||||
# First argument is the option name, e.g. @catppuccin_flavor.
|
||||
#
|
||||
# Usage: `print_option @catppuccin_flavor`
|
||||
# Would print: `@catppuccin_flavor mocha`
|
||||
#
|
||||
# The option is given as a format string.
|
||||
print_option() {
|
||||
local option
|
||||
option=$1
|
||||
|
||||
printf "\n%s " "${option}"
|
||||
get_option "$option"
|
||||
}
|
||||
Reference in New Issue
Block a user