Skip Navigation

User banner
Posts
11
Comments
525
Joined
2 yr. ago

  • NEW METHOD which avoids the udev 'event storm' caused by docking/undocking the keyboard


    [/usr/local/bin/asusUX8406_kbdwatch]

     
            #!/bin/bash
        
        me=$(basename "$0")
        laststate=2
        
        while true; do
          sleep 3
          output=$(lsusb -d 0b05:1b2c)
          stat=$?
          if [ $stat == 1 ] && [ $laststate != 1 ]; then
            ## kbd removed, enable lower display
            laststate=1
            logger -p user.info "${me} KEYBOARD REMOVED"
            xrandr --auto && xrandr --output eDP-2 --below eDP-1
          elif [ $stat == 0 ] && [ $laststate != 0 ]; then
            ## kbd replaced, disable lower display
            laststate=0
            logger -p user.info "${me} KEYBOARD DOCKED"
            xrandr --output eDP-2 --off
          fi
        done
    
    
    
      

    Hook this up to your init system, or run from a nohup session redirected to /dev/null on login or session startup ... for example, on my system I am member of group video, so installing it to /usr/local/bin and setting ownership to root:video and sudo chmod ug+rx allows it to be run on session login automatically.

  • That sounds like a great way to end up with a few "forgotten" bolts. Oopsie.

  • Not quite on-topic, but since there are others responding here... has anyone experienced issues with the xbox 360 for PC wireless controller not passing its D-pad to games in WINE/Proton? For example, Skyrim. I cannot use the 'favorites' weapon selection as a result. The D-pad is seen in the Wine/Windows DX joystick diags so I'm stumped. Any tips would be greatly appreciated.

  • Neat!

    I'm old enough to remember the PXL2000, always wanted one but was too poor as a teenager. (Not the tech used in OP's video link from what I can tell but reminded me of that device).

  • Can't SIGTERM be observed to react to a poweroff?

  • Hmm, I will have to check that out. Thanks.

  • Anton Petrov ("Hello, Wonderful Person!") is quite good IMO.

    PBS Space Time and Eons (and as others have already said, Journey to the Microcosmos).

    Kurzgesagt is fun and AFAIK always tries to be accurate (they've been quick to publish correction videos when necessary).

    I'll second other's recommendation for CuriosityStream and Standup Maths. Matt's also part of at least one good podcast, "A Podcast of Unnecessary Detail" which is informative and entertaining.

  • Except for that one billionaire's son who was likely coerced into going with Dad and didn't fully understand the risks ... :( but otherwise, - yup -

  • :( Please tell me they aren't all headed for the dump :(

    It's hard to find homes for old pianos since so many people live in smaller spaces now, and yes, they're so big and heavy. But the beautiful workmanship on old ones... seems a shame.

  • True, forgot about them. Want a nice hot cup of tea? :p

  • China and Turkey pioneered harassing their own and other citizens on foreign soil; now India is normalizing it further. These tactics need to get slapped down and HARD otherwise it'll just start happening everywhere. FFS western nations, kick out their diplomats and charge these foreign agents with terrorism or something!

  • Evil

    Jump
  • Hmm, hard to argue with that :P

  • Vote only for candidates who promise to fight for maximum age limits for all Congressional, executive and judicial positions. End the gerontocracy.

  • Permanently Deleted

    Jump
  • Can't someone at this point charge him with Barratry -- abuse of the legal system? Bar his fat arse from filing any more suits for at least his term of office this time around.

    Ah, who am I kidding, the US legal system has no teeth (for some), it's all reliant on 'customs' and 'norms' at its base, as we have seen recently.

  • Evil

    Jump
  • How does one address the paradox that, as JSON itself is evil, one cannot use it for evil?

    (opinions may vary on the above; but it's mine, so nyah nyah.)

  • Now retired huh?

    I can think of a good penalty... a number of years in prison equal to the years since they committed this crime. "Disgorgement" is a common legal mechanism, forcing convicted to give up their ill-gotten gains. In this case, time as free persons.

  • Quick, someone tell his lawyer to help him run for office! ... Somewhere.

    Apparently that stops the clock entirely on these things, right??

  • Mine too

  • Why all the downvotes? Haven't visited the links yet but this doesn't sound like a corpo ad; and I didn't think the lemmyverse was against outside linking -- after all we're against walled gardens right? (OK OK discord.. but they also are on libera)

    I like the idea of code-as-craft and this interests me.