Live data from Hacker News

AnyBar: OS X menubar status indicator

github.com

31–40 of 64 posts

Re: AnyBar: OS X menubar status indicator

#31
post #30
post #22

Earlier quoted context omitted.

Looks really interesting, thanks. Does anyone know if there is anything similar to Hammerspoon out there?

> Does anyone know if there is anything similar to Hammerspoon out there? Did you forget to include some extra constraint? As written, it looks like the answer to your question is "Yes, Hammerspoon."

Sorry, I realize that is unclear. What I was getting at is just if there are any other similar scripting/automation apps out there, perhaps with a different scripting language or other application integrations. I am a newbie in the automation space so I was wondering what other types of apps people may be using.

Re: AnyBar: OS X menubar status indicator

#33

Bitbar feels much better imo and allowing not just dots - any stuff https://github.com/matryer/bitbar

My BitBar script to display my current free drive space:

    #!/bin/bash
    df -h | awk '{print $4}' | head -n2 | tail -n1
(There has to be a neater way to do this...)

Re: AnyBar: OS X menubar status indicator

#34
post #24

Earlier quoted context omitted.

And I will be that guy on this thread pointing out Keyboard Maestro ; https://www.keyboardmaestro.com/main/ One thing i couldn't replicate yet in hammerspoon (among other things) is clicking: https://wiki.keyboardmaestro.com/action/Find_Image_on_Screen incredibly useful

What is an example of something you would use that feature for?

I use it to (random incomplete list):

  - switch recipients in Franz.app
  - click on menubar items
  - import current page into devonthink (requires a click on  a toolbar item to start the automation)
  - toggle flux (click on menubar item and go down etc)
  - adding tags in delibar (click on the Nth suggested tag)
  - click on toolbar items  in all possible apps when there is no keyboard shortcut/menu item available

Re: AnyBar: OS X menubar status indicator

#35

Bitbar feels much better imo and allowing not just dots - any stuff https://github.com/matryer/bitbar

My BitBar script to display my current free drive space: #!/bin/bash df -h | awk '{print $4}' | head -n2 | tail -n1 (There has to be a neater way to do this...)

There is, of course. :)

    df -h | awk 'NR==2 {print $4}'

Re: AnyBar: OS X menubar status indicator

#36
post #29
post #27

Earlier quoted context omitted.

And -- incidentally -- any other computer on your network. But hey, security schemurity.

Listening on 127.0.0.1 will not make it available it in the network.

This app is not listening on 127.0.0.1 — it binds to all interfaces (and on both IPv4 and IPv6 too), and the parent's comment is completely valid. Anyone who can get a UDP packet to your machine can control this.

  AnyBar  32770 ---   14u    IPv4 0x----------------       0t0      UDP *:1738
  AnyBar  32770 ---   15u    IPv6 0x----------------       0t0      UDP *:1738
(The `nc` command in the example is directed at localhost, but that doesn't imply that the app is bound to localhost only, just that it's bound to at least that.)

Unix sockets are a better fit for this sort of thing, as they can be by default restricted to your user, and optionally opened up to others. (i.e., Unix sockets are authenticated) You can always do both (implement Unix sockets and Internet sockets).

Even binding to localhost in general is not completely safe, if a webpage or other apps can be fooled into making the right request. (I think UDP is safe here, but who knows.)

Re: AnyBar: OS X menubar status indicator

#38
post #10

Earlier quoted context omitted.

Care to share your implementation of your favorite feature? I'm finding it hard to picture what the workflow/result will be like.

If one likes being cheap, it's fun to mute Spotify if there's an Ad. Yeah... function muteSpotifyOnAd() if (hs.spotify.isRunning()) then if (hs.spotify.getCurrentTrack():lower() == 'spotify') then hs.spotify.setVolume(0) else hs.spotify.setVolume(100) end end end hs.timer.doEvery(10, muteSpotifyOnAd)

No thanks, one likes earning a few cents from their published music.

Re: AnyBar: OS X menubar status indicator

#39
post #7

Is there anything similar for Linux? Closest I can find is https://github.com/abgoyal/ShellToolsApplet

This https://github.com/LemonBoy/bar and a few hundreds of its clone and frameworks.

I recommand getting the polybar clone by jaagr

https://github.com/jaagr/polybar

Post reply on HN