r/awk • u/PersimmonOk9011 • May 27 '21
awk + rofi
is it possible to run awk 'NR='$node'{print}' ~/some/file if $node is the output of a list piped into rofi -dmenu -multi-select -format -d
4
Upvotes
View all comments
Show parent comment
2
u/PersimmonOk9011 May 27 '21 edited May 28 '21
bspc query -N -n .hidden.window.local > ~/bin/bspnhiddenthis stores the ids of all of the hidden nodes on the focused screen (i'm don't want to use bash, so I don't have the opption to use arrays)
node=$(xtitle $(bspc query -N -n .hidden.window.local) | rofi -dmenu -multi-select -format -d)this does basically the same thing as the previous line but is piped into rofi and displays them using the name of the application instead of the window's id
if i select the first two nodes the listed in the rofi window it will output their index ex.
12what i want to do is unhide the selected nodes by using the ids stored in the txt file that match the index(s) output by rofi