Skip to content

Instantly share code, notes, and snippets.

@dd-han
dd-han / 10-libinput.conf
Created March 14, 2017 09:20
ELECOM M-DT1URBK Driver for ArchLinux
## copy or attach this file to /etc/X11/xorg.conf.d/10-libinput.conf
Section "InputClass"
Identifier ""
MatchProduct "ELECOM ELECOM TrackBall Mouse"
Driver "libinput"
# remap button 7 and 8 to middle-click
Option "ButtonMapping" "1 2 3 4 5 6 7 2 2"
EndSection
@dd-han
dd-han / watchingVPN.sh
Created December 26, 2016 06:07
small watchdog
#!/bin/sh
failLog='/opt/vpnfail.log'
sleep 60
while [ 1 ]; do
if curl -k https://127.0.0.1/ > /dev/null;then
date
echo 'vpnserver fine'
@dd-han
dd-han / screen-setup.sh
Last active December 17, 2016 12:08
lightDM moniter setup
#!/bin/sh
DEFAULT="LVDS1"
moniters=`xrandr | grep connected | sed 's/ted.*/ted/g' | sed 's/ /-/g'`
for monit in $moniters; do
if grep $DEFAULT <<< $monit > /dev/null; then
if grep "disconnected" <<< $monit > /dev/null; then
echo "LVDS not connect, big problem, skip setting" >> /tmp/dm.log
exit 0