Skip to content

Instantly share code, notes, and snippets.

View strycore's full-sized avatar
:shipit:
Founder of Lutris, the open gaming platform for Linux.

Mathieu Comandon strycore

:shipit:
Founder of Lutris, the open gaming platform for Linux.
View GitHub Profile
@strycore
strycore / dbusrr.py
Created November 11, 2019 16:37
DBus resolution switch for Mutter
"""DBus backed display management for Mutter"""
from collections import defaultdict
import dbus
class DisplayMode:
def __init__(self, mode_info):
self.mode_info = mode_info
@strycore
strycore / shortcuts.vdf
Created March 5, 2023 01:22
Shortcuts vdf strings
shortcuts
appid
AppName
Google Chrome
"/usr/bin/flatpak"
StartDir
"/usr/bin/"
icon
ShortcutPath
/var/lib/flatpak/app/com.google.Chrome/current/active/export/share/applications/com.google.Chrome.desktop
@strycore
strycore / vdf_parser.py
Created June 8, 2013 15:18
Parser for Steam VDF files
import os
import json
def vdf_parse(steam_config_file, config):
line = " "
while line:
line = steam_config_file.readline()
if not line or line.strip() == "}":
return config
@strycore
strycore / wayland-stories.txt
Created January 28, 2021 21:39
Wayland user stories
* As a command line user, I want to be able to switch resolutions from a terminal.
* As an owner of a Hi-DPI laptop, I want to be able to create new screen modes to have access to Lo-DPI modes.
* As a Linux gamer, I want to play old Linux games that don't support my native resolution in full screen mode. Bonus point if there are ways to keep the aspect ratio.
* As a Linux gamer, I want to get sure I get the best performance out of my computer.
* As an application developer, I want to fetch the list of connected monitors and their resolutions. The resolution can be changed and displays can be turned on and off with an API.
@strycore
strycore / lutris-cla.md
Last active January 25, 2021 13:21
Lutris CLA

In order to contribute to Lutris, you have to agree with the terms of this document.

This Contributor License Agreement is not a typical one and doesn't cover legislative aspects of the project. This CLA is intented to keep the project running smoothly and staying in focus with our goals.

Lutris is a large project run by a small team. Contributions that don't follow certain rules can slow down development and cause major breakages. The code base has accumutated some technical debt over the years and it is extremely important not to add any.

By sending a patch to the lutris repository, you agree to the following rules:

  • No breakage of any of our oldest supported distributions. This means no introduction of unsupported Gtk or Python features.
  • The code should pass automatic QA tests. Docstrings for all newly created functions, methods and modules must be provided.
@strycore
strycore / setup.sh
Last active November 28, 2020 05:59
Setup script for installing Terraria on Ubuntu
#!/bin/bash
# installing dependencies
dependencies="libmonogame-cil ffmpeg mmv libopenal1 zenity"
install_deps=0
for package in $dependencies; do
echo $package
dpkg -s $package | grep installed
if [ $? == 0 ]; then
install_deps=1
@strycore
strycore / radar.html
Created March 22, 2017 16:38
Canvas radar
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Index</title>
<style type="text/css" media="screen">
body {
background-color: #333;
text-align: center;
@strycore
strycore / dxvk
Last active January 24, 2018 08:35
DXVK helper script
#!/bin/bash
### USER DEFINED VARIABLES
steam_path="/media/data/games/Steam"
# The Witness
# game_path="/media/data/games/Steam/steamapps/common/The Witness"
# game_exe="witness64_d3d11.exe"
# game_name="The Witness"
@strycore
strycore / chairs.py
Created April 23, 2017 03:59
The least efficient algorithm on earth
import itertools
from decimal import Decimal
from collections import Counter
NUM_REVIEWERS = 3
NUM_SEGMENTS = 4
# Compute all possible scores for one segment
segment_scores_outcomes = []
for c in itertools.product(range(1, 5), repeat=NUM_REVIEWERS):
@strycore
strycore / discourse.conf
Created April 11, 2017 03:07
Discourse example config
upstream discourse {
server 172.17.0.1:81;
}
server {
listen 62.210.136.153:80;
listen [::]:80;
server_name forums.lutris.net;
return 301 https://$host$request_uri;
}