| Input name | ID |
|---|---|
| DisplayPort | 15 |
| HDMI 1 | 17 |
| HDMI 2 | 18 |
For example: m1ddc display CCDF4573-4E2D-413F-9633-CFFDDAD9153B set input 15
| #!/usr/bin/env bash | |
| # based on https://github.com/NixOS/nixpkgs/issues/163936#issuecomment-1069797072 | |
| resolvesTo=`cat /proc/cmdline | sed -n 's/^.*init=\(.*\)\/init.*$/\1/p'` | |
| directory="/nix/var/nix/profiles/" | |
| for symlink in "$directory"/*; do | |
| if [ -L "$symlink" ]; then | |
| resolved_path=$(readlink -f "$symlink") | |
| if [ "$resolved_path" == "$resolvesTo" ]; then |
I owe my very rapid learning journey in the world of ConfigFs to several key sources which aren't necessarily relevant to this result, but I feel deserve a mention anyway.
| # note to self: packages for building on fedora(ish) are | |
| # autoconf automake libtool glib2-devel json-glib-devel systemd-devel libus1-devel libX11-devel libXrandr-devel jansson-devel | |
| # read. worth noting that no registers ever changed between input swapping HDMI1 and DP. also maybe worth noting that i dont think --i1 x50 would do anything here, but im no expect i literally discovered ddc existed today | |
| $ ddcutil getvcp scan --i1 x50 | |
| VCP code 0x02 (New control value ): One or more new control values have been saved (0x02) | |
| VCP code 0x0b (Color temperature increment ): Invalid value: 0 | |
| VCP code 0x0c (Color temperature request ): 3000 + 35 * (feature 0B color temp increment) degree(s) Kelvin | |
| VCP code 0x0e (Clock ): current value = 50, max value = 100 |
| function generateRandomColour () { | |
| return '#'+(Math.random() * 0xffffff | 0).toString(16).padStart(6, '0') | |
| } |
| // use nodejs to load location history.json from your google takeout folder -b | |
| var data=require('./Location History') | |
| var times=data.locations.map(d=>parseInt(d.timestampMs)) | |
| var between=times.map((t,i) => times[i-1] ? t-times[i-1] : 0 ) | |
| var mean=between.reduce((a,v)=>a+v)/between.length | |
| var meanInMinutes=mean/1000/60 | |
| console.log("Google location data reported every " + meanInMinutes + " minutes.") |
| #!/bin/bash | |
| # open | |
| # macOS open command for WSL (Windows Subsystem for Linux) | |
| # written by benjamin gwynn (https://benjamingwynn.com) | |
| # get latest version here: https://gist.github.com/benjamingwynn/a778aa6cf2dd461dc18978f245bd90c1 | |
| # | |
| # You can run this on WSL wuth no prior setup or changes to host Windows. | |
| # | |
| # See: * https://docs.microsoft.com/en-us/windows/wsl/interop#run-windows-tools-from-linux | |
| # * https://stackoverflow.com/a/501295 |
| # Actually gets Google Home's bluetooth to connect reliably on Windows 10. | |
| # Unpairs Windows AND Google Home using MAC address, then sets everything up for a one-click connection. | |
| # * Prevents Google Home from getting stuck paried using bttool, which is apparently the only way to fix that? | |
| # * Uses some code from Stack Overflow to get the IP from the MAC address so you don't have to dick around with static IP's | |
| # * Connects reliably by repairing bluetooth on Google Home using the "secret" REST API (https://rithvikvibhu.github.io/GHLocalApi) | |
| # * Opens control legacy panel after setting up Google for pairing | |
| # | |
| # Needs btpair installed first, get it from http://bluetoothinstaller.com/bluetooth-command-line-tools/ |
| /** Image object for WebAppManifest */ | |
| declare interface WebAppManifestIcon { | |
| /** A string containing space-separated image dimensions. */ | |
| sizes: string, | |
| /** The path to the image file. If src is a relative URL, the base URL will be the URL of the manifest. */ | |
| src: string, | |
| /** A hint as to the media type of the image. The purpose of this member is to allow a user agent to quickly ignore images of media types it does not support. */ | |
| type: string, | |
| } |
| /** | |
| White modern theme for ProtonMail | |
| Work-in-progress (v2) - Copyright Benjamin Gwynn, 2017 (http://benj.pw) | |
| */ | |
| body { | |
| --font: "Roboto", "Cantarell", "Segoe UI", "Ubuntu", sans-serif; | |
| font-family: var(--font); | |
| } |