Skip to content

Instantly share code, notes, and snippets.

View imabuddha's full-sized avatar
👨‍💻
Looking for work

John Mifsud imabuddha

👨‍💻
Looking for work
View GitHub Profile
@imabuddha
imabuddha / Bind mouse middle button to BACK — [Raspberry Pi]
Last active December 10, 2020 13:41
Put in .xbindkeysrc (common suggestions using xte didn't work for Chromium on Raspberry Pi OS)
# make sure to: sudo apt-get install xvkbd
# map mouse middle button to BACK in browsers, etc.
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:2
@imabuddha
imabuddha / Fix slow usb trackpad or mouse pointer — [Raspberry Pi]
Last active December 10, 2020 14:52
The 0 value means automatic selection which usually results in 8~10ms poll rate. Values of 1, 2, 4, 8, or 10 (ms) may also be used to set the polling rate.
Add the following to the end of the line in /boot/cmdline.txt (separated with a space)
`usbhid.mousepoll=0`
@imabuddha
imabuddha / libinput-gestures.conf
Last active December 14, 2020 15:24
My libinput-gestures config. Similar trackpad gesture mapping to my MacBook.
# Configuration file for libinput-gestures.
# JDM — 12/11/2020
# Thanks to: Mark Blakeney, Sep 2015
#
# The default configuration file exists at /etc/libinput-gestures.conf
# but a user can create a personal custom configuration file at
# ~/.config/libinput-gestures.conf.
#
# Each gesture line has 3 [or 4] arguments separated by whitespace:
#
@imabuddha
imabuddha / .lightdm-cleanup.sh
Last active December 17, 2020 04:19
Make sure certain processes are terminated on logout — [Raspberry Pi] Requires two script files: one for the user & one for lightdm. This is because it should only kill when the user's session actually ends (not lock screen, etc.).
#! /bin/bash
# This script is for Raspberry pi os (current as of 16 Dec 2020)
# Location for this script: ~/.lightdm-cleanup.sh
#
# Make sure the following user processes are terminated on logout.
# If not terminated cleanly then their services won't operate
# properly when user logs in again (without rebooting).
#
# shairport-sync: with pulseaudio backend can't run shairport-sync as service
# touchegg: gestures won't work after logout/login unless client is killed on logout
@imabuddha
imabuddha / us
Created December 28, 2020 06:54
Change Linux X11 US Colemak layout to make caps lock⇒control [Raspberry OS]
// file path: /usr/share/X11/xkb/symbols/us
// Change Linux X11 US Colemak layout to make capslock ⇒ control [Raspberry OS]
default partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {
name[Group1]= "English (US)";
key <TLDE> { [ grave, asciitilde ] };
key <AE01> { [ 1, exclam ] };
@imabuddha
imabuddha / Change caps-lock key to control — [Raspberry Pi]
Created December 6, 2020 18:04
Add this line to /etc/xdg/lxsession/LXDE-pi/autostart
@setxkbmap -option ctrl:nocaps
@imabuddha
imabuddha / org.deadbeef.desktop
Created January 1, 2021 09:23
DeaDBeeF music player, put in: /usr/local/share/applications
[Desktop Entry]
Version=devel-jdm
Name=DeaDBeeF
Comment=Play your music collection
TryExec=deadbeef
Exec=deadbeef %U
Terminal=false
Type=Application
Icon=deadbeef
Categories=Qt;Audio;Music;Player;AudioVideo;
@imabuddha
imabuddha / org.freedesktop.Notifications.service
Created January 1, 2021 10:44
`sudo apt install notification-daemon` then copy this file into: `/usr/share/dbus-1/services/`
[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib/notification-daemon/notification-daemon
@imabuddha
imabuddha / config
Last active January 8, 2021 05:46
Put in: ~/.config/deadbeef/
ape.write_apev2 1
artwork.cache.period 48
artwork.cache_reset_time 1609588504
artwork.enable_albumartorg 1
artwork.enable_embedded 1
artwork.enable_lastfm 1
artwork.enable_localfolder 1
artwork.enable_musicbrainz 1
artwork.enable_wos 1
artwork.filemask *cover*.jpg;*front*.jpg;*folder*.jpg;*cover*.png;*front*.png;*folder*.png
@imabuddha
imabuddha / dunstrc
Last active January 8, 2021 05:47
Put in: ~/.config/dunst/ Configures the position, colors, font, timeouts, etc.
[global]
### Display ###
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything