pulseaudio
黒したことシリーズ
再起動時にdefault-sinkの変更
How do the PulseAudio libraries decide where to connect to?
The following rule applies: (see Server Strings for an explanation of the format of server specifications)
- If the the application using the library specifies a server to connect to it is used. If the connection fails, the library fails too.
- If the environment variable
$PULSE_SERVER
is defined the library connects to that server. If the connection fails, the library fails too. - If
$DISPLAY
is set, the library tries to connect to that server and looks for the root window propertyPULSE_SERVER
for the host to connect to. IfPULSE_COOKIE
is set it is used as the path to the authentication cookie. - If the client configuration file (
~/.pulse/client.conf
or/etc/pulse/client.conf
) sets the server address, the library connects to that server. If the connection fails, the library fails too. - The library tries to connect to the default local UNIX socket for PulseAudio servers. If the connection fails, it proceeds with the next item.
- The library tries to connect to the default local TCP socket for PulseAudio servers. If the connection fails, it proceeds with the next item.
- If
$DISPLAY
is set, the library tries to connect to the default TCP port of that host. If the connection fails, it proceeds with the next item. - The connection fails.
ccs811
http://blog.akanumahiroaki.com/entry/2018/06/12/080000
我が家
#include <SparkFunCCS811.h>
#define CCS811_ADDR 0x5A
CCS811 mySensor(CCS811_ADDR);
void setup() {
Serial.begin(115200);
Serial.println("CCS811 Basic Example");
CCS811Core::status returnCode = mySensor.begin();
if (returnCode != CCS811Core::SENSOR_SUCCESS)
{
Serial.println(".begin() returned with an error.");
while (1);
}
}
void loop() {
if (mySensor.dataAvailable())
{
mySensor.readAlgorithmResults();
Serial.print("CO2[");
Serial.print(mySensor.getCO2());
Serial.print("] tVOC[");
Serial.print(mySensor.getTVOC());
Serial.print("] millis[");
Serial.print(millis());
Serial.print("]");
Serial.println();
}
delay(10);
}
xrandr 2枚の設定
--portで場所決める必要あり。
最終的には、wqhdを1.5倍にscalingして、dpiを1.5倍にすることでちょうど。
xrandr --output DisplayPort-0 --panning 3840x2160+3840+0 --scale 1.5x1.5 --fb 7680x2160 --pos 3840x0
https://www.ncaq.net/2018/12/12/23/31/21/
Screen 0: minimum 320 x 200, current 7680 x 2160, maximum 16384 x 16384
DisplayPort-0 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 597mm x 336mm panning 3840x2160+3840+0
Screen 0: minimum 320 x 200, current 7680 x 2160, maximum 16384 x 16384
DisplayPort-0 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 597mm x 336mm panning 3840x2160+3840+0