Skip to content

Instantly share code, notes, and snippets.

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

John Mifsud imabuddha

👨‍💻
Looking for work
  • Miyazaki, Japan
  • 13:53 (UTC +09:00)
View GitHub Profile
@imabuddha
imabuddha / dbus-action.conf
Last active November 17, 2021 08:12
Configure dbus-action for magic trackpad gestures after bluetooth or usb connect [Raspberry Pi OS: not an ideal solution as the dm doesn't emit useful events, especially when connecting via usb]
# Configuration file for dbus-action. Mark Blakeney, Apr 2020
#
# The default configuration file exists at /etc/dbus-action.conf. A user
# can create a personal custom configuration file by copying that to
# ~/.config/dbus-action.conf and adding entries. This file is YAML
# format, see https://en.wikipedia.org/wiki/YAML.
# List of trigger definitions. Each trigger must define:
# bus: Must be "session" or "system".
# interface: Interface name, e.g. org.freedesktop.DBus.
@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 / 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 / 50-system-apple.quirks
Created December 10, 2020 13:50
Apple Magic Trackpad 2 configuration for Raspberry Pi (& linux generally) — Properly configures the pressure sensitivity, natural scrolling, and the left/right/middle (1/2/3 finger) clicks.
# add this to /usr/share/libinput/50-system-apple.quirks (create if doesn't exist)
[Apple Magic Trackpad v2]
MatchName=*Magic Trackpad 2
AttrSizeHint=162x115
AttrTouchSizeRange=20:10
AttrPressureRange=2:0
AttrPalmSizeThreshold=900
AttrThumbSizeThreshold=700
@imabuddha
imabuddha / .bashrc
Created December 9, 2020 06:14
Add this line to your ~/.bashrc file (probably at the end) to get the terminal app to use the system keychain. This will eliminate the need to enter your ssh passphrase if not using autologin && you've got ssh-agent configured.
export $(gnome-keyring-daemon --daemonize --start)
@imabuddha
imabuddha / Start ssh-agent on login.md
Created December 8, 2020 09:14
Start ssh-agent on login, still need to enter passphrase once when used

On Arch Linux, the following works really great (should work on all systemd-based distros):

Create a systemd user service, by putting the following to ~/.config/systemd/user/ssh-agent.service:

[Unit]
Description=SSH key agent

[Service]
Type=simple

Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket

@imabuddha
imabuddha / Natural Scrolling [Raspberry Pi].md
Last active December 8, 2020 08:28 — forked from eli9000/bookworm.md
Change your Raspberry Pi scrolling to Natural Scrolling (like iOS)

How to invert mouse wheel to NaturalScrolling in Linux for Raspberry Pi

Via the Terminal, type the following

cd /usr/share/X11/xorg.conf.d
sudo nano 40-libinput.conf

Add to following line to the BOTTOM of the FIRST Section "InputClass"

@imabuddha
imabuddha / setxkbmap-config-options.txt
Last active December 7, 2020 17:25 — forked from jatcwang/gist:ae3b7019f219b8cdc6798329108c9aee
List of all setxkbmap configuration options (including models/layout/etc)
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro
@imabuddha
imabuddha / splatmoji — [Raspberry Pi]
Created December 6, 2020 18:23
GUI Emoji chooser popup
https://github.com/cspeterson/splatmoji
@imabuddha
imabuddha / lxde-pi-rc.xml
Last active January 10, 2021 05:55
[Raspberry Pi] — File in .config/openbox/ Lots of changes to hotkeys for: screen grab dir, file manager, browser, htop, DeaDBeeF, splatmoji, lock screen, vs code, pulseaudio volume, etc.
<?xml version="1.0" encoding="UTF-8"?>
<openbox_config xmlns="http://openbox.org/3.4/rc">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
<!-- always try to focus new windows when they appear. other rules do
apply -->