~wiki
~wiki
  • Tools
    • User Tools
    • Log In
    • Site Tools
    • Media Manager
    • Sitemap
    • Page Tools
    • Show pagesource
    • Back to top
  • Translations of this page
    • English (en)
    • Deutsch (de)
  • Log In

  1. You are here
  2. Home
  3. admin
  4. linux
  5. scripts
  1. Trace
  2. powershell
  3. storage
  4. matrix
  5. compression
  6. scripts

admin:linux:scripts

  • Show pagesource
  • Back to top
  • Share via
    • Share via...
    • Twitter
    • LinkedIn
    • Telegram
    • Yammer
    • Reddit
  • Recent Changes
  • Send via e-Mail
  • Print
  • Permalink

Script snippets

Switch Monitor

switch-monitors.sh
CURRENT_OUTPUT=`ddccontrol -r 0x60 dev:/dev/i2c-5 | sed -n 's|.*0x60: +/\([0-9]\+\)/15.*|\1|p'`
 
if [ $CURRENT_OUTPUT = 3 ]
then
  # switch to first input
  ddccontrol -r 0x60 -w 15 dev:/dev/i2c-5
else
  # switch to second input
  ddccontrol -r 0x60 -w 3 dev:/dev/i2c-5
fi
  • Last modified: 2024-07-05 14:31

cc by sa

Except where otherwise noted, content on this wiki is licensed under the following license:
CC Attribution-Share Alike 4.0 International