Guide to getting niri working properly as a session manager with screen recording support.
sudo apt install pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk| #!/bin/bash | |
| # Live audio metrics from the Yeti Nano mic | |
| # Usage: mic-monitor.sh [duration_seconds] (default: 10) | |
| DURATION="${1:-10}" | |
| SOURCE="alsa_input.usb-Blue_Microphones_Yeti_Nano_2538SQ903SB8_888-000476140506-00.analog-stereo" | |
| echo "Recording $DURATION seconds from Yeti Nano..." | |
| echo |
| #!/usr/bin/env python3 | |
| """GPU RGB monitor - maps GPU utilization to cool-to-hot RGB colors via OpenRGB CLI.""" | |
| # Gist: https://gist.github.com/DuaneNielsen/422ae928f49afffc85def4beb4c1a0bb | |
| import subprocess | |
| import time | |
| import signal | |
| import sys | |
| import logging | |
| import re |
| # Fixing Waybar Not Starting with Niri Compositor | |
| ## Problem | |
| Waybar fails to start when launched by niri, with errors like: | |
| ``` | |
| Error calling StartServiceByName for org.freedesktop.portal.Desktop: Failed to activate service 'org.freedesktop.portal.Desktop': timed out | |
| ``` |
A clean Spotify integration for niri that gives you a floating, toggle-able Spotify window controlled from waybar.
| function convertToDropdowns() { | |
| // Get the selected range | |
| var range = SpreadsheetApp.getActiveRange(); | |
| var values = range.getValues(); | |
| // Loop through each cell in the selection | |
| for (var i = 0; i < values.length; i++) { | |
| for (var j = 0; j < values[i].length; j++) { | |
| var cellValue = values[i][j]; | |
| import jax | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import mujoco | |
| from mujoco import mjx | |
| import mediapy as media | |
| from math import sin, cos | |
| from tqdm import trange |
| import gymnax | |
| import flax.linen as nn | |
| from argparse import ArgumentParser | |
| import functools | |
| from typing import Any, Callable, Sequence, Tuple, Optional, Sequence, Dict, Union, Iterable | |
| import mctx | |
| import warnings | |
| from typing import Tuple, Optional, Union | |
| import jax | |
| import jax.numpy as jnp |
| from typing import Optional | |
| import torch | |
| from torch import tensor | |
| from tensordict import TensorDict | |
| from torchrl.data import CompositeSpec, BoundedTensorSpec, UnboundedContinuousTensorSpec, UnboundedDiscreteTensorSpec, DiscreteTensorSpec, \ | |
| UnboundedContinuousTensorSpec | |
| from torchrl.envs import ( | |
| EnvBase, | |
| Transform, |
| import torch | |
| import torch.nn.functional as F | |
| import pytorch_lightning as pl | |
| from pytorch_lightning.callbacks import ModelCheckpoint, LearningRateMonitor, EarlyStopping | |
| from pytorch_lightning.plugins import DDPPlugin | |
| from pl_bolts.datamodules import MNISTDataModule | |
| class LightningMNISTClassifier(pl.LightningModule): |