Skip to content

Instantly share code, notes, and snippets.

View ananace's full-sized avatar

Alexander "Ananace" Olofsson ananace

  • Linköping University
  • Sweden
View GitHub Profile
@ananace
ananace / run-in-slice.sh
Last active October 12, 2023 14:13
Small script to launch a process in a slice/cgroup
#!/bin/bash
set -euo pipefail
# Drop in /usr/local/bin/run-in-slice
#
# Requires system to be running systemd and cgroupsv2
SLICE="$1"
shift
@ananace
ananace / LAYER_fakefullscreen.cpp
Last active March 28, 2024 20:49
Stub for VK_EXT_full_screen_exclusive
#include <vkroots.h>
#include <cstdint>
#include <algorithm>
#include <ranges>
#include <string_view>
#define VK_EXT_FULL_SCREEN_EXTENSION_NAME "VK_EXT_full_screen_exclusive"
#define VK_EXT_FULL_SCREEN_SPEC_VERSION 4
@ananace
ananace / Gemfile
Created November 26, 2024 19:51
Mumble wayland workaround
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'ruby-dbus'
@ananace
ananace / libinput.rb
Created May 16, 2026 19:57
Simple D-Bus wrapper for Mumble
# frozen_string_literal: true
require 'open3'
class Libinput
Event = Struct.new('Event', :device, :type, :time, :data)
class DeviceEvent < Event
def name
data.first
end
@ananace
ananace / mumble.rb
Created June 26, 2026 10:22
XDG Global Shortcuts example - Mumble push-to-talk
#!/bin/env ruby
# frozen_string_literal: true
require 'bundler/setup'
require 'dbus'
require_relative 'xdg_globalshortcuts'
class MumbleProxy
PTT_SHORTCUT = 'xdg-ptt'