How to read value of an attribute in command chain? #1468
-
Point of interest: store something on a temporary variable and reference its value next time. Subshell doesn't work, as subshell is evaluated at the time of register of keybind. All subshells aren't doing what we want. Example: # Swap tags
hc keybind "$Mod-Control-Shift-$key" chain , \
attr tags.focus.index "$i" , \ # swap tags index
mktemp string swap_store , attr swap_store "$(hc attr tags.focus.name)" , \ # trying to swap names
attr tags.focus.name "$(hc attr "tags.by-name.$i")" , \
attr "tags.by-name.$i" "$(hc attr swap_store)" # unable to reference swap_store here |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Probably, you are looking for the you can create a custom variable with
and you can copy another attribute's value into it via:
I fear that the rest of your command chain also does not make much sense (unless you really want to rename a tag via a keybinding). |
Beta Was this translation helpful? Give feedback.
Probably, you are looking for the
use_previous
command.you can create a custom variable with
and you can copy another attribute's value into it via:
I fear that the rest of your command chain also does not make much sense (unless you really want to rename a tag via a keybinding).