Skip to content

Instantly share code, notes, and snippets.

View joshuaboud's full-sized avatar

Josh Boudreau joshuaboud

View GitHub Profile
@joshuaboud
joshuaboud / ModalPrompt.js
Last active July 22, 2021 19:13
ModalPrompt - A Custom Prompt Module for Cockpit Plugins.
/*
ModalPrompt - A Custom Prompt Module for Cockpit Plugins.
Copyright (C) 2021 Josh Boudreau <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the Lesser GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@joshuaboud
joshuaboud / :etc:X11:xorg.conf.d:10-evdev.conf
Last active December 3, 2021 14:15
Logitech M570 Config
Section "InputClass"
Identifier "Logitech M570"
MatchProduct "Logitech M570"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "9"
Option "AccelProfile" "adaptive"
Option "AccelSpeed" "1"
EndSection
@joshuaboud
joshuaboud / colorize_stderr.sh
Last active May 24, 2022 15:20
Colorize stderr
# Colorize stderr output for any bash script
# to use, put the following line at the top of your script (after the shebang):
# source <(curl -s https://gist.githubusercontent.com/joshuaboud/956991c04e45b211f40e6da84b2e049e/raw/colorize_stderr.sh) && exec 2> >(colour_errors >&2)
# or to avoid pulling remotely, copy the following functions into your script followed by:
# exec 2> >(colour_errors >&2)
print_red() {
printf "\e[31;1m$1\e[0m"
}
@joshuaboud
joshuaboud / nightmode_rgb.py
Last active August 31, 2023 17:07
OpenRGB auto update color profile based on KDE color temperature
#!/usr/bin/env python3
"""
Watch org.kde.KWin/ColorCorrect.PropertiesChanged signal and set OpenRGB profile accordingly
Author: Joshua Boudreau 2023
# How to
1. Save nightmode_rgb.py anywhere (e.g. `/usr/local/bin`)
@joshuaboud
joshuaboud / batch-fix-cbz.sh
Created January 26, 2024 03:43
Normalize images in CBZ file for e-Reader. Fixes contrast issues for manga.
#!/usr/bin/env bash
# usage:
# batch-fix-cbz.sh comic1.cbz [comic2.cbz ...]
# WARNING: overwrites original file
die() {
EXIT_CODE=$?
echo "$*" >&2