Skip to content

Instantly share code, notes, and snippets.

@Zren
Zren / DarkSolarized.qss
Last active August 28, 2022 14:22
Dark Solarized - Quassel Theme (qss)
/**
** ______ _ _____ _ _ _
** | _ \ | | / ___| | | (_) | |
** | | | |__ _ _ __| | __ \ `--. ___ | | __ _ _ __ _ _______ __| |
** | | | / _` | '__| |/ / `--. \/ _ \| |/ _` | '__| |_ / _ \/ _` |
** | |/ / (_| | | | < /\__/ / (_) | | (_| | | | |/ / __/ (_| |
** |___/ \__,_|_| |_|\_\ \____/ \___/|_|\__,_|_| |_/___\___|\__,_|
**
** Quassel Theme
**

SoundCloud Theme for Foobar2000 Waveform Seekbar

Installation

  • Install the Waveform Seekbar for foobar2000.
  • Right click the Waveform Seekbar widget > Configure
  • Under Downmix Display choose Mix-down to mono.
  • Colors

Custom URL Schemes

This will tell you how to have browsers run command line commands when visiting urls with custom schemes custom://.

Steps

  1. Tell the browser how to handle the url scheme
  2. Tell the OS how to handle the url scheme
  3. Parse the url
  4. Run your command
#!/bin/python3
import os
import os.path
import re
import argparse
def formatSplitFilepath(filepath, splitIndex):
splitQtdFormat = filepath.replace('.qtd', '-{}{}.qtd')
assert splitIndex <= 26*26
a1 = chr(ord('a') + (splitIndex // 26))
#!/bin/bash
# To run anywhere with "git lsdir"
# sudo mv ./git-lsdir.sh /usr/local/bin/git-lsdir
# sudo chmod +x /usr/local/bin/git-lsdir
Red='\033[0;31m'
Orange='\033[0;33m'
LightRed='\033[91m'
LightGreen='\033[92m'
Yellow='\033[93m'
@-moz-document domain("hckrnews.com") {
html, body {
color: #c1c2c3; /* #333333 */
background-color: #111213; /* #ffffff */
}
a {
color: #aaaaaa; /* #333333 */
}
a:hover {
local assdraw = require 'mp.assdraw'
local msg = require 'mp.msg'
local opt = require 'mp.options'
local utils = require 'mp.utils'
print("get_script_name: ".. mp.get_script_name())
--
-- Parameters
--
@Zren
Zren / kmake.sh
Last active December 12, 2021 20:09
#!/bin/bash
# To install this script, save to /usr/local/bin/kmake
# Don't forget to make it executable with:
# sudo chmod +x /usr/local/bin/kmake
#---
doClean=false
doTests=false
doInstall=false
import sys
from PyQt5 import QtCore, QtGui, QtWidgets, Qt
from Xlib import X, Xatom
from Xlib.display import Display
from Xlib.error import CatchError, BadAtom
def enable_blur(widget: QtWidgets.QWidget):
ec = CatchError(BadAtom)
display = Display()
print('ec', ec)
function pa_defaultsink_name () { pacmd stat | awk -F": " '/^Default sink name: /{print $2}'; };
function pa_defaultsink_getvolume () { pacmd list-sinks | grep -A10 "$(pa_defaultsink_name)" | grep "volume: front-left:" | sed 's/\tvolume: front-left: // ; s/,\s*front-right:.*//'; };
function pa_defaultsink_setvolume () { pactl set-sink-volume "$(pa_defaultsink_name)" "$1"; pa_defaultsink_getvolume; };
for i in $(seq 0 150); do pa_defaultsink_setvolume "${i}%"; sleep 1; done > ~/Desktop/PAVolumeSteps.txt