Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python3
"""
Usage:
plasmasetconfig # List all widget namespaces
plasmasetconfig org.kde.plasma.digitalclock # List all config groups+keys
plasmasetconfig org.kde.plasma.digitalclock Appearance showSeconds true
Install:
chmod +x ~/Downloads/plasmasetconfig.py
sudo cp ~/Downloads/plasmasetconfig.py /usr/local/bin/plasmasetconfig
Uninstall:
@rickybrent
rickybrent / evsieve.sh
Last active May 2, 2024 17:48
tex shura + laptop right-shift + esc to tilde, caps to ctrl for evsieve
#!/bin/bash
# https://github.com/KarsMulder/evsieve
if [[ ! -z "$1" ]]; then
if [[ "${1:0:4}" == "pci-" || "${1:0:9}" == "platform-" ]]; then
input="/dev/input/by-path/$1"
else
input="/dev/input/by-id/$1"
fi
elif [[ -e "/dev/input/by-id/usb-04d9_USB-HID_Keyboard_000000000407-event-kbd" ]]; then
input="/dev/input/by-id/usb-04d9_USB-HID_Keyboard_000000000407-event-kbd"
@rickybrent
rickybrent / activate-touch-hack.service
Last active May 4, 2021 18:58
X1 Yoga 3 touch screen after suspend hack
[Unit]
Description=Touch wake Thinkpad X1 Yoga 3rd gen hack
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target sleep.target
[Service]
ExecStart=/bin/sh -c "modprobe acpi_call && echo '\\_SB.PCI0.LPCB.EC._Q2A' > /proc/acpi/call"
[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target sleep.target
@rickybrent
rickybrent / pipewire-groovy.sh
Last active April 11, 2021 19:39
build a more recent pipewire and use it for pulse on groovy
systemctl --user stop pulseaudio.service
systemctl --user stop pulseaudio.socket
sudo systemctl disable --global pulseaudio
pkill pulseaudio
echo "deb-src http://archive.ubuntu.com/ubuntu hirsute main universe restricted multiverse" | sudo tee /etc/apt/sources.list.d/hirsute-src.list
echo "deb-src http://security.ubuntu.com/ubuntu/ hirsute-security restricted universe main multiverse" | sudo tee /etc/apt/sources.list.d/hirsute-src.list
echo "deb-src http://archive.ubuntu.com/ubuntu hirsute-updates restricted universe main multiverse" | sudo tee /etc/apt/sources.list.d/hirsute-src.list
sudo apt update
@rickybrent
rickybrent / vivaldi-notrash.css
Created November 25, 2020 01:12
Remove trash icon and padding for vivaldi.
#tabs-container .toggle-trash {
display: none !important;
}
#tabs-container.top {
padding-top: 0px !important;
}
/* Yaru-esque version of https://forum.vivaldi.net/topic/18677/solved-changing-the-button-on-linux-to-look-like-windows-10/5 */
#browser.linux .window-buttongroup {
right: 0px !important;
top: 0px !important;
}
#browser .window-buttongroup {
height: 32px !important;
margin-top: 0px !important;
margin-right: 0px !important;
}
# Adopted from https://menno.io/posts/pulseaudio_monitoring/ for a very different purpose.
# Needs: pacmd, xdotool, setting up .alsoftrc as below and changing Minecraft to the new output.
from signal import signal, SIGINT
import os
import sys
import time
from Queue import Queue
from ctypes import POINTER, c_ubyte, c_void_p, c_ulong, cast
# First download https://github.com/Valodim/python-pulseaudio
/* ==UserStyle==
@name J-Novel Forum More Prominent Upvoted Chevron
@namespace github.com/rickybrent
@version 1.0.1
@license unlicense
@updateURL https://gist.github.com/rickybrent/bdc444f51f8d9b0e4262d679ff09dbe9/raw/j-novel.user.css
==/UserStyle== */
@-moz-document domain("forums.j-novel.club") {
.topic [component="post/upvote"].upvoted {
@rickybrent
rickybrent / google-meet-thin.user.css
Created April 14, 2020 17:05
Invert and shrink the giant white bottom bar on Google Meet
@-moz-document domain("meet.google.com") {
div.rG0ybd,
div.LCXT6 {
max-height: 42px;
filter: invert(100%);
}
}
@rickybrent
rickybrent / minimal-scrollbar.user.css
Last active March 27, 2020 20:03
Minimal scrollbar for Vivaldi
/* ==UserStyle==
@name minimal-scrollbar
@version 1.0.0
@description Minimal scrollbar for Vivaldi.
@namespace rickybrent
@author rickybrent
@license BSD-2-clause
@updateURL https://gist.githubusercontent.com/rickybrent/fa28b17e77adb20ca744160a7ad7d334/raw/minimal-scrollbar.user.css
==/UserStyle== */
::-webkit-scrollbar-track {