Skip to content

Instantly share code, notes, and snippets.

View BobSynfig's full-sized avatar
🇬🇷

BobSynfig BobSynfig

🇬🇷
View GitHub Profile
@BobSynfig
BobSynfig / JogDial_Synfig.py
Last active May 4, 2026 10:03
A Jog Dial dedicated to SynfigStudio (PoC for fun, around the center of the trackpad)
#!/usr/bin/python3
# Virtual Jog Dial for Synfig (X11)
# Simulates pressing on COMMA and DOT to change active frame
# requires evdev
# run as sudo for access to /dev/input and /dev/uinput
import sys, math
from evdev import list_devices, InputDevice, ecodes, UInput
# Configuration
@BobSynfig
BobSynfig / gist:9f3acd3acd7e9ceb979594737e2583a4
Created April 2, 2025 23:33
libsemanage.semanage_direct_remove_key: Unable to remove module XXXXXXXXXX at priority 400. (No such file or directory).
In case you would have an issue with APT after install a .deb (in my case Epson Printer Utility for Ubuntu)
There was a failure due to the presence of the "semodule" binary in the post install script.
You can temporarily remove it from your system (backup!) and reinstall the .deb with dpkg
which semodule
> /usr/sbin/semodule
(rename it temporarily or move it)
@BobSynfig
BobSynfig / synfig-broadway.sh
Last active April 26, 2022 22:14
Run Synfig in a Web Browser!
#!/bin/bash
# Access SynfigStudio from your web browser at the address http://IP:PORT
# You can use for example a Tablet with a BlueTooth mouse
# Note: You may have to open the port in your firewall to access it from another device
IP=192.168.0.21 # The Ip of your interface
PORT=3131 # The Port
B_DISPLAY=:5 # A display number, 5 should be fine
# You can select a theme or let it empty for the default theme
@BobSynfig
BobSynfig / set_loops.py
Last active March 18, 2022 17:22
Set GIF animation loops number
#!/usr/bin/python3
# https://en.wikipedia.org/wiki/GIF#Animated_GIF
# The number of loops (0..65535) is located 3 bytes after the string "NETSCAPE2.0"
import sys
sys.argc = property(lambda self: len(self.argv)).__get__(sys, sys.__class__)
if ( (sys.argc == 1) or
((sys.argc == 2) and (sys.argv[1] == '--help'))):
print("Set GIF animation loops number")
@BobSynfig
BobSynfig / PatchEnveManjaroFedora.sh
Last active December 7, 2022 09:44
Patch for enve in Manjaro and Fedora - Solves libgio-2.0.so.0 error
#!/bin/bash
#
# Patch for enve in Manjaro and Fedora
#
# Solves libgio-2.0.so.0 error by removing embedded libstdc++.so.6 and libgmodule-2.0.so.0
# See https://github.com/MaurycyLiebner/enve/issues/289
# https://github.com/MaurycyLiebner/enve/issues/301
#
# Based on:
# https://github.com/AppImage/AppImageKit/issues/1162
@BobSynfig
BobSynfig / ext-keyb
Created June 8, 2019 17:24
External keyboard with a different layout under Linux
#!/bin/bash
# String identifying the keyboard (under "Virtual core keyboard" with xinput list)
EXT_KEYB_STR="NOVATEK USB Keyboard"
# Taken from Command line
EXT_KEYB_LANG=$1
EXT_KEYB_ID=`xinput list|grep "$EXT_KEYB_STR"|awk -F" " '{print $5}'|awk -F= '{if($2!="") print $2}'|head -n 1`
# This is field #5 because (Word count of EXT_KEYB_STR + 2) --^