Skip to content

Instantly share code, notes, and snippets.

Axel-Erfurt /
Created October 4, 2023 19:20
Play Video using the new Gtk.Video
#!/usr/bin/env python3
import sys
import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Gdk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Gdk, Adw, Gio, GLib
CSS = """
Axel-Erfurt /
Created August 23, 2023 17:51
set pipewire buffer and sample rate from systray icon
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import gi
gi.require_versions({'Gtk': '3.0', 'AyatanaAppIndicator3': '0.1', 'GLib': '2.0'})
from gi.repository import Gtk, GLib
from gi.repository import AyatanaAppIndicator3 as appindicator
from subprocess import check_output
buffer_sizes = [32, 64, 128, 256, 512, 1024, 2048, 4096]
Axel-Erfurt /
Created May 21, 2022 18:56
View PDF in python Gtk3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import gi
gi.require_version('EvinceView', '3.0')
gi.require_version('EvinceDocument', '3.0')
gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0')
from gi.repository import Gtk, Gdk
from gi.repository import EvinceDocument
from gi.repository import EvinceView
Axel-Erfurt /
Created March 26, 2022 20:33
Show PDF with PyQt6 QWebengineView
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from PyQt6.QtCore import QUrl
from PyQt6.QtWidgets import QApplication, QMainWindow, QWidget
from PyQt6.QtWebEngineWidgets import QWebEngineView #, QWebEngineSettings
from os import path
class MainWindow(QMainWindow):
def __init__(self):
View hypnotix.m3u
#EXTINF:-1 tvg-name="Canal 26" tvg-logo="" group-title="Argentina",Canal 26
#EXTINF:-1 tvg-name="LN+ Ⓨ" tvg-logo="" group-title="Argentina",LN+ Ⓨ
#EXTINF:-1 tvg-name="ABC" tvg-logo="" group-title="Australia",ABC
#EXTINF:-1 tvg-name="TVSN" tvg-logo="" group-title="Australia",TVSN
#EXTINF:-1 tvg-name="ABC Me" tvg-logo="" group-title="Australia",ABC Me
View olympia.m3u
#EXTINF:1,NDR Olympia 1
#EXTINF:2,NDR Olympia 2
#EXTINF:3,NDR Olympia 3
#EXTINF:4,NDR Olympia 4
#EXTINF:5,NDR Olympia 5
View wilsberg.m3u
#EXTINF:0,Aus heiterem Himmel - Der Samstagskrimi [ZDF]
#EXTINF:0,Überwachen und belohnen - Der Samstagskrimi [ZDF]
#EXTINF:0,Wilsberg - Unser tägliches Brot - Der Samstagskrimi [ZDF]
#EXTINF:0,Alles Lüge - Der Samstagskrimi [ZDF]
#EXTINF:0,Vaterfreuden - Der Samstagskrimi [ZDF]
Axel-Erfurt / PlutoTV_aktuell.m3u
Last active November 20, 2023 19:28
Pluto TV german Channels
View PlutoTV_aktuell.m3u
#EXTINF:-1 tvg-name="Kids" group-title="Kids" tvg-logo="" tvg-id="",Kids
#EXTINF:-1 tvg-name="Animals+" group-title="Samsung" tvg-logo="" tvg-id="",Animals+
#EXTINF:-1 tvg-name="Scienc
View myTVList.m3u
#EXTINF:-1,Das Erste
#EXTINF:-1,ZDF neo
Axel-Erfurt / audioplayer
Created October 18, 2021 21:33
PyQt5 Audio Player
View audioplayer
from PyQt5.QtCore import (pyqtSignal, QAbstractItemModel,
QFileInfo, QModelIndex, Qt, QTime, QUrl, QSettings)
from PyQt5.QtGui import QIcon
from PyQt5.QtMultimedia import (QMediaContent, QMediaMetaData, QMediaPlayer, QMediaPlaylist)
from PyQt5.QtWidgets import (QApplication, QFileDialog,
QHBoxLayout, QLabel, QListView, QMessageBox, QPushButton,
QSlider, QStyle, QToolButton, QVBoxLayout, QWidget, QStatusBar)
import os