-credit to nedroid for strange art

  • 1 Post
  • 5 Comments
Joined 2 years ago
cake
Cake day: June 10th, 2023

help-circle


  • 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.




  • 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.