Skip to content

Instantly share code, notes, and snippets.

View yvon's full-sized avatar

Yvon Cognard yvon

  • Drivencode
  • Paris, France
View GitHub Profile
@yvon
yvon / CONFIGURE THINKPAD USB KEYBOARD.md
Last active August 23, 2018 07:56
Automatically configure trackpoint speed of Lenovo ThinkPad Compact USB Keyboard when plugged in

Automatically configure trackpoint speed of Lenovo ThinkPad Compact USB Keyboard when plugged in.

  1. Install and enable atd service

  2. Add an udev rule. /ect/udev/rules.d/10-trackpoint.rules:

ACTION=="add", ATTR{idVendor}=="17ef", ATTR{idProduct}=="6047", RUN+="/home/yvon/configure-lenovo-thinkpad-usb-keyboard-trackpoint/udev-receiver.sh"
@yvon
yvon / rc.lua
Created December 15, 2011 11:43
Awesome (window manager) configuration opening terminal in focused client working directory
awful.key({ modkey, }, "Return",
function ()
pid = client.focus.pid
cpid = string.gsub(awful.util.pread('pgrep -P ' .. pid), "[\r\n]+$", "")
cwd = string.gsub(awful.util.pread('readlink /proc/' .. cpid .. '/cwd'), "[\r\n]+$", "")
if string.len(cwd) > 0 then
awful.util.spawn(terminal .. ' -cd ' .. cwd)
else
awful.util.spawn(terminal)
end