question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Toggle via commandline

See original GitHub issue

I’d like a way to toggle cerebro on via the commandline, instead of via a hotkey. The reason is that I use my window manager to do all my other keyboard remapping, and it would be nice to have it all in one place. The idea is that calling a new command cerebro-toggle from the commandline would be the equivalent of hitting the hot-key. Oh, and providing a way to disable the hotkey would be nice too. If running and in the tray it’s still available via right-click, after all.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AXGKlcommented, Jun 12, 2018

ok, I’m not a big javascripter but listening on a udp sock was simple enough for one funny hack for getting cerebro working in gnome/wayland:

In the git version go to /app/main/createWindow.js

+ function listen_udp() {
+     const dgram = require('dgram');
+     const server = dgram.createSocket('udp4');
+
+     server.on('error', (err) => {
+           server.close();
+     });
+
+     server.on('message', (msg, rinfo) => {
+           showMainWindow()
+     });
+
+     server.on('listening', () => {
+           const address = server.address();
+           console.log(`server listening ${address.address}:${address.port}`);
+     });
+
+     server.bind(41234);
+ }
+    listen_udp()

so that you can toggle it via an echo "a" > /dev/udp/127.0.0.1/41234 which you put into a script and bind that to the Ctrl-Space gnome hotkey.

1reaction
infokillercommented, Mar 20, 2017

Thanks @maximbaz ! For my use cases starting it is enough (no need for the hiding of a toggle functionality).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: command line to switch profile #1165 - GitHub
Karabiner-Elements allows several profiles, but it needs to switch manually. If it can provide a command to switch profile, then it can be...
Read more >
Enable or Disable Windows Features Using DISM
You can use DISM's Features commands to enable or disable Windows features directly from the command prompt, or by applying an answer file ......
Read more >
Find and toggle any on/off setting from the Command Palette
Open the settings from the command palette and then look for the setting you want. Might even have to touch the mouse and...
Read more >
Command line options - AWS Documentation
Specifies the URL to send the request to. For most commands, the AWS CLI automatically determines the URL based on the selected service...
Read more >
Feature flags - GitLab Docs
GitLab uses Unleash, a feature toggle service. By enabling or disabling a flag in GitLab, your application can determine which features to enable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found