Skip to content

Improve performance of hotkey #1228

Closed Answered by ManuelSchneid3r
Gr3q asked this question in Q&A
Discussion options

You must be logged in to vote

You could use netcat to pipe show into the albert socket in your cache dir. nc should be way faster than the albert IPC

echo -n toggle | nc -U $HOME/.cache/albert_socket
# since 0.21
echo -n toggle | nc -U $HOME/.cache/albert/ipc_socket

Some details

manuel::mint ~ /usr/bin/time -v sh -c 'echo -n toggle | nc -U $HOME/.cache/albert_socket'
Albert visibility toggled.	Command being timed: "sh -c echo -n toggle | nc -U $HOME/.cache/albert_socket"
	User time (seconds): 0.00
	System time (seconds): 0.00
	Percent of CPU this job got: 50%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.00
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes):…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@Gr3q
Comment options

@ManuelSchneid3r
Comment options

@Gr3q
Comment options

@ManuelSchneid3r
Comment options

@ManuelSchneid3r
Comment options

Answer selected by ManuelSchneid3r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1227 on May 03, 2023 19:20.