Open a terminal. (Ctrl+Alt+T)
Become root:
sudo -i
Install the Python package:
Open a terminal. (Ctrl+Alt+T)
Become root:
sudo -i
Install the Python package:
{ config, pkgs, lib, ... }: | |
{ | |
# IOMMU configuration | |
boot.kernelParams = [ "amd_iommu=on" "pcie_aspm=off" ]; | |
boot.kernelModules = [ "kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ]; | |
boot.extraModprobeConfig = '' | |
options vfio-pci ids=10de:13c2,10de:0fbb | |
options kvm ignore_msrs=1 | |
''; |
I've run into a strange problem where sometimes, my monitors are forced to DPMS off and moving the cursor or pressing keys does not free it. I suspect this is a bug in my SwayWM configuration or a bug in Swaylock, but it resolves itself if I wait until the device again locks, which causes a second Swaylock instance to appear.
In any case, if you get yourself stuck and need to recover, you might want to be able to run swaymsg
remotely. If you do, you might run into strange issues. swaymsg
calls sway --get-socketpath
to get the IPC socket, which... just returns the value of the SWAYSOCK
environment variable. In my case, this also has the funny side-effect of starting a dbus session and SSH agent each time its invoked, because it is calling the NixOS-wrapped SwayWM binary. Probably should patch the NixOS version to explicitly call the unwrapped binary!
In order to recover the SWAYSOCK
, one approach that should be relatively easy and does not requ
diff --git a/bsnes/target-bsnes/settings/input.cpp b/bsnes/target-bsnes/settings/input.cpp | |
index 13b04b7a..fd76ac78 100644 | |
--- a/bsnes/target-bsnes/settings/input.cpp | |
+++ b/bsnes/target-bsnes/settings/input.cpp | |
@@ -68,12 +68,11 @@ auto InputSettings::updateControls() -> void { | |
assignMouse3.setVisible(false); | |
if(activeMapping) { | |
- auto& input = activeDevice().mappings[batched.left().offset()]; | |
- if(input.isDigital()) { |
#!/bin/sh | |
set -e | |
if [ "$1" = "inside-nix-shell" ]; then | |
echo "Clearing clangd cache." | |
rm -f "compile_commands.json" | |
rm -rf ".clangd" | |
LIBEAR32="$(nix-build "<nixpkgs>" -A bear --argstr system i686-linux)/lib/bear/libear.so" | |
LIBEAR64="$(nix-build "<nixpkgs>" -A bear --argstr system x86_64-linux)/lib/bear/libear.so" |
#0 0x00007faa9909d563 in wl_list_insert () from /nix/store/641prxh0dppg0d0cd1hkhcs83sq75g7b-wayland-1.17.0/lib/libwayland-server.so.0 | |
No symbol table info available. | |
#1 0x00007faa9970b5cd in wl_signal_add (signal=0x11e7d10, listener=0x15b4ff0) at /nix/store/641prxh0dppg0d0cd1hkhcs83sq75g7b-wayland-1.17.0/include/wayland-server-core.h:435 | |
No locals. | |
#2 xwm_set_seat (xwm=0x15b4c50, seat=0x11e7a10) at ../subprojects/wlroots/xwayland/selection/selection.c:309 | |
No locals. | |
#3 0x00007faa9970c95a in wlr_xwayland_set_seat (xwayland=0x1235690, seat=0x11e7a10) at ../subprojects/wlroots/xwayland/xwayland.c:473 | |
No locals. | |
#4 0x000000000044fd26 in unmanaged_handle_map (listener=<optimized out>, data=<optimized out>) at ../sway/desktop/xwayland.c:81 | |
seat = 0x11e78c0 |
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c | |
index fe3d4a8ff4..68c35e68e4 100644 | |
--- a/dlls/winex11.drv/wintab.c | |
+++ b/dlls/winex11.drv/wintab.c | |
@@ -304,6 +304,8 @@ static WTPACKET last_packet; | |
* FIXME: we don't support more than 4 regular tablets or 2 multimode tablets */ | |
#define CURSORMAX 12 | |
static INT button_state[CURSORMAX]; | |
+static INT gCursorX[CURSORMAX]; | |
+static INT gCursorY[CURSORMAX]; |
/* | |
* NchanSubscriber | |
*/ | |
// https://github.com/yanatan16/nanoajax | |
!function(t,e){function n(t){return t&&e.XDomainRequest&&!/MSIE 1/.test(navigator.userAgent)?new XDomainRequest:e.XMLHttpRequest?new XMLHttpRequest:void 0}function o(t,e,n){t[e]=t[e]||n}var r=["responseType","withCredentials","timeout","onprogress"];t.ajax=function(t,a){function s(t,e){return function(){c||(a(void 0===f.status?t:f.status,0===f.status?"Error":f.response||f.responseText||e,f),c=!0)}}var u=t.headers||{},i=t.body,d=t.method||(i?"POST":"GET"),c=!1,f=n(t.cors);f.open(d,t.url,!0);var l=f.onload=s(200);f.onreadystatechange=function(){4===f.readyState&&l()},f.onerror=s(null,"Error"),f.ontimeout=s(null,"Timeout"),f.onabort=s(null,"Abort"),i&&(o(u,"X-Requested-With","XMLHttpRequest"),e.FormData&&i instanceof e.FormData||o(u,"Content-Type","application/x-www-form-urlencoded"));for(var p,m=0,v=r.length;v>m;m++)p=r[m],void 0!==t[p]&&(f[p]=t[p]);for(var p in u)f.setRequestHeader(p,u[p]);return f.send(i),f},e.nanoajax=t}({},function(){return |
#!/usr/bin/python | |
# Simple MySQL + S3 backup script | |
# By John <johnwchadwick@gmail.com> | |
from __future__ import print_function | |
import sys | |
import boto3 | |
import argparse | |
from boto3.s3.transfer import S3Transfer | |
from tempfile import NamedTemporaryFile |
# UUIDField - a strictly binary, filterable, efficient UUID field that works with MySQL, PostgreSQL, SQLite3 | |
# Needs a lot more testing. Current version not tested on PostgreSQL. Partially based on David Cramer's | |
# UUIDField, with ideas taken from django-extensions, django's BinaryField and some other places. | |
import uuid | |
from django import forms | |
from django.db.models import Field, SubfieldBase | |
# Enable native UUIDs in PostgreSQL (from dcramer/django-uuidfield) | |
try: |