Skip to content

Instantly share code, notes, and snippets.

@rustysys-dev
rustysys-dev / 20-3rdbutton.conf
Created Mar 14, 2019
/etc/X11/xorg.conf.d/20-3rdbutton.conf
View 20-3rdbutton.conf
Section "InputClass"
Identifier "middle button"
MatchIsPointer "on"
MatchDriver "libinput"
Option "MiddleEmulation" "off"
EndSection
@rustysys-dev
rustysys-dev / pathfinder.go
Last active Mar 6, 2019
Find all dirs in given directory.
View pathfinder.go
package main
import (
"flag"
"fmt"
"os"
"path/filepath"
"regexp"
)
@rustysys-dev
rustysys-dev / bklight.sh
Last active Mar 5, 2019
Change backlight settings in Fedora 29 MATE
View bklight.sh
#!/usr/bin/env bash
CURRENT_LEVEL=$(pkexec --user root mate-power-backlight-helper --get-brightness)
if [ $1 == "get" ]; then
echo -e "\nCurrent Level: $CURRENT_LEVEL\n"
exit 0
elif [ -z $1 ] || [ -z $2 ]; then
echo -e "\nUSAGE: change-backlight <inc|dec|set|get> [<val>]\n"
exit 0
fi
@rustysys-dev
rustysys-dev / dnf-history-search.sh
Created Mar 4, 2019
Searches your dnf history entries that changed $term
View dnf-history-search.sh
function dnf-history-search () {
if [ -z $1 ]; then
echo -e "\nSpecify search term\n"
return 0
fi
HISTORY=$(sudo dnf history | awk 'NR<=2 { next } { print $1 }')
for item in $HISTORY
do
ITEM=$(sudo dnf history info $item | grep $1)
if ! [ -z "$ITEM" ]; then