Live data from Hacker News

Show HN: Universal Pause Button

github.com

131–140 of 174 posts

Re: Show HN: Universal Pause Button

#131

This is nice! On OSX, processes can be paused and continued too (by name via killall, and by PID via kill): kill -STOP 1234 kill -CONT 1234 killall -STOP -c "Pandora" killall -CONT -c "Pandora" A more nuanced control is to throttle down the CPU, via cputhrottle[1]. If I'm running a CPU-intensive calculation and don't want to bog down the rest of my system I will use it to give me enough cycles for Sublime Text to wor…

Here is a quick clone of this project for Linux using the STOP and CONT signals:

  #!/bin/bash
  
  currentProcess=$(xprop -id $(xprop -root | grep -F '_NET_ACTIVE_WINDOW(WINDOW)' | awk '{print $5}') | grep -F '_NET_WM_PID(CARDINAL)' | awk '{print $3}')
  
  state=$(grep 'State:' /proc/$currentProcess/status | awk '{print $2}')
  
  if [[ "$state" == "T" ]]
  then
      kill -CONT $currentProcess
  else
      kill -STOP $currentProcess
  fi

Re: Show HN: Universal Pause Button

#132

Indeed some deep nesting here. You made me remember a quickbasic program I wrote for a class back in early 90s, where I packed the whole program in a single do-loop with about 20 indent levels at it's deepest, and I loved it. But... the prof told me to never do that again :( Anyway, thanks a lot for the flashback :)

Alright, should be pretty much taken care of in version 1.0.1.

Re: Show HN: Universal Pause Button

#135

Earlier quoted context omitted.

As someone who just switched to Linux from OS X, it is really hard to migrate. I miss the subtleties of the apple ecosystem. Sure Linux is awesome, but I have been battling trackpad support issues, keymapping the super_key to CMD, and just general battling the UX. tl;dr a more powerful operating system with worse UI, which is the obvious trade. A less powerful system with a fantastic UI.

UI is subjective. I get mildly annoyed whenever I use a Mac. Little things like having to click on a window to give it focus, or having to use command instead of control in many programs, break my flow. I'd probably get used to those if I only used a Mac, but since I use Linux 95% of the time and Mac 5%, I never do.

Wait how else do you give windows focus?

You mean like with the keyboard? Like SHIFT+TAB? That's on OS X.

Re: Show HN: Universal Pause Button

#136

Earlier quoted context omitted.

UI is subjective. I get mildly annoyed whenever I use a Mac. Little things like having to click on a window to give it focus, or having to use command instead of control in many programs, break my flow. I'd probably get used to those if I only used a Mac, but since I use Linux 95% of the time and Mac 5%, I never do.

Wait how else do you give windows focus? You mean like with the keyboard? Like SHIFT+TAB? That's on OS X.

I believe some window managers give the option of automatically focusing to the window under the cursor.

Re: Show HN: Universal Pause Button

#137
post #25

This specific example is nice although not truly universal. An interesting startup idea would be a bluetooth thingy (kinda vague, maybe a necklace?) that when pushed becomes a TRUE universal pause button. Pauses my DVR, my car audio, my linux mythtv box, everything, silences my phone ringer, mutes the TV, shuts off the alarm clock, temp-mutes the smoke alarm if its currently going off, silence the oven timer, car ala…

years and years ago I had some thoughts tumbling around about how I'd design an automated system for muting/vibrate-mode only for phones in cinemas/libraries/quiet-zones, etc.

The security implications and UX involved in managing settings in a non-infuriating fashion rapidly sunk it though, and I daresay it would never have been practically deployable unless business/landowners/whatever could enforce its use as a condition of entry.

Also, you forgot the hollow tooth + airbag components + RF magic => remote operated ball-gag :P

Re: Show HN: Universal Pause Button

#138

Earlier quoted context omitted.

Wait how else do you give windows focus? You mean like with the keyboard? Like SHIFT+TAB? That's on OS X.

I believe some window managers give the option of automatically focusing to the window under the cursor.

And once you're used to it you'll never want to go back. All of my experiences with focus-follow-mouse on commercial OSes have been almost-but-not-quite right.

Re: Show HN: Universal Pause Button

#140

Wouldn't it be easier if your girlfriend would not expect that she can walk in and interrupt you any time she wants?

Well, maybe. But then maybe I wouldn't have a girlfriend. And more importantly, maybe I wouldn't be reminded that sometimes it's OK to peel myself away from a video game.
Post reply on HN