mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 14:09:48 +01:00
hyprctl completions: Use only awk rather than grep + awk
Using "awk '/<exp>/{ print $n }'" is more minimal and slightly faster than using "grep '<exp>' | awk '{ print $n }'". Signed-off-by: Lincoln Yuji <lincolnyuji@hotmail.com>
This commit is contained in:
parent
6247a6b537
commit
8bb75a223d
3 changed files with 9 additions and 9 deletions
|
@ -1,13 +1,13 @@
|
|||
_hyprctl_cmd_2 () {
|
||||
hyprctl monitors | grep Monitor | awk '{ print $2 }'
|
||||
hyprctl monitors | awk '/Monitor/{ print $2 }'
|
||||
}
|
||||
|
||||
_hyprctl_cmd_3 () {
|
||||
hyprpm list | grep "Plugin" | awk '{print $4}'
|
||||
hyprpm list | awk '/Plugin/{ print $4 }'
|
||||
}
|
||||
|
||||
_hyprctl_cmd_0 () {
|
||||
hyprctl clients | grep class | awk '{print $2}'
|
||||
hyprctl clients | awk '/class/{ print $2 }'
|
||||
}
|
||||
|
||||
_hyprctl_cmd_1 () {
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
function _hyprctl_3
|
||||
set 1 $argv[1]
|
||||
hyprctl monitors | grep Monitor | awk '{ print $2 }'
|
||||
hyprctl monitors | awk '/Monitor/{ print $2 }'
|
||||
end
|
||||
|
||||
function _hyprctl_4
|
||||
set 1 $argv[1]
|
||||
hyprpm list | grep "Plugin" | awk '{print $4}'
|
||||
hyprpm list | awk '/Plugin/{ print $4 }'
|
||||
end
|
||||
|
||||
function _hyprctl_1
|
||||
set 1 $argv[1]
|
||||
hyprctl clients | grep class | awk '{print $2}'
|
||||
hyprctl clients | awk '/class/{ print $2 }'
|
||||
end
|
||||
|
||||
function _hyprctl_2
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#compdef hyprctl
|
||||
|
||||
_hyprctl_cmd_2 () {
|
||||
hyprctl monitors | grep Monitor | awk '{ print $2 }'
|
||||
hyprctl monitors | awk '/Monitor/{ print $2 }'
|
||||
}
|
||||
|
||||
_hyprctl_cmd_3 () {
|
||||
hyprpm list | grep "Plugin" | awk '{print $4}'
|
||||
hyprpm list | awk '/Plugin/{ print $4 }'
|
||||
}
|
||||
|
||||
_hyprctl_cmd_0 () {
|
||||
hyprctl clients | grep class | awk '{print $2}'
|
||||
hyprctl clients | awk '/class/{ print $2 }'
|
||||
}
|
||||
|
||||
_hyprctl_cmd_1 () {
|
||||
|
|
Loading…
Reference in a new issue